From bc0855048a7cd252137d7dc9b962ac93d50dbdae Mon Sep 17 00:00:00 2001 From: Benoit St-Pierre Date: Fri, 7 Dec 2018 09:31:10 -0500 Subject: [PATCH 01/34] Clean up FIRAuth bits from FIRApp (#2110) * Clean up FIRAuth bits from FIRApp --- Example/Auth/Tests/FIRAuthTests.m | 18 +------ Example/Core/Tests/FIRAppTest.m | 63 ------------------------- Firebase/Auth/Source/FIRAuth.m | 22 +-------- Firebase/Auth/Source/FIRAuth_Internal.h | 4 +- Firebase/Core/FIRApp.m | 18 ------- Firebase/Core/Private/FIRAppInternal.h | 42 ----------------- 6 files changed, 7 insertions(+), 160 deletions(-) diff --git a/Example/Auth/Tests/FIRAuthTests.m b/Example/Auth/Tests/FIRAuthTests.m index 74720a35d41..b3c6f1b979c 100644 --- a/Example/Auth/Tests/FIRAuthTests.m +++ b/Example/Auth/Tests/FIRAuthTests.m @@ -365,20 +365,6 @@ - (void)testLifeCycle { XCTAssertNil(auth); } -/** @fn testGetUID - @brief Verifies that FIRApp's getUIDImplementation is correctly set by FIRAuth. - */ -- (void)testGetUID { - // TODO: Remove this test once Firestore, Database, and Storage move over to the new Auth interop - // library. - FIRApp *app = [FIRApp defaultApp]; - XCTAssertNotNil(app.getUIDImplementation); - [[FIRAuth auth] signOut:NULL]; - XCTAssertNil(app.getUIDImplementation()); - [self waitForSignIn]; - XCTAssertEqualObjects(app.getUIDImplementation(), kLocalID); -} - #pragma mark - Server API Tests /** @fn testFetchProvidersForEmailSuccess @@ -2283,8 +2269,8 @@ - (void)mockSecureTokenResponseWithError:(nullable NSError *)error { */ - (void)enableAutoTokenRefresh { XCTestExpectation *expectation = [self expectationWithDescription:@"autoTokenRefreshcallback"]; - [[FIRAuth auth].app getTokenForcingRefresh:NO withCallback:^(NSString *_Nullable token, - NSError *_Nullable error) { + [[FIRAuth auth] getTokenForcingRefresh:NO withCallback:^(NSString *_Nullable token, + NSError *_Nullable error) { [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kExpectationTimeout handler:nil]; diff --git a/Example/Core/Tests/FIRAppTest.m b/Example/Core/Tests/FIRAppTest.m index bd98036d97d..d913c34b2db 100644 --- a/Example/Core/Tests/FIRAppTest.m +++ b/Example/Core/Tests/FIRAppTest.m @@ -267,59 +267,6 @@ - (void)testErrorForSubspecConfigurationFailure { XCTAssert([error.description containsString:@"Configuration failed for"]); } -- (void)testGetTokenWithCallback { - [FIRApp configure]; - FIRApp *app = [FIRApp defaultApp]; - - __block BOOL getTokenImplementationWasCalled = NO; - __block BOOL getTokenCallbackWasCalled = NO; - __block BOOL passedRefreshValue = NO; - - [app getTokenForcingRefresh:YES - withCallback:^(NSString *_Nullable token, NSError *_Nullable error) { - getTokenCallbackWasCalled = YES; - }]; - - XCTAssert(getTokenCallbackWasCalled, - @"The callback should be invoked by the base implementation when no block for " - "'getTokenImplementation' has been specified."); - - getTokenCallbackWasCalled = NO; - - app.getTokenImplementation = ^(BOOL refresh, FIRTokenCallback callback) { - getTokenImplementationWasCalled = YES; - passedRefreshValue = refresh; - callback(nil, nil); - }; - [app getTokenForcingRefresh:YES - withCallback:^(NSString *_Nullable token, NSError *_Nullable error) { - getTokenCallbackWasCalled = YES; - }]; - - XCTAssert(getTokenImplementationWasCalled, - @"The 'getTokenImplementation' block was never called."); - XCTAssert(passedRefreshValue, - @"The value for the 'refresh' parameter wasn't passed to the 'getTokenImplementation' " - "block correctly."); - XCTAssert(getTokenCallbackWasCalled, - @"The 'getTokenImplementation' should have invoked the callback. This could be an " - "error in this test, or the callback parameter may not have been passed to the " - "implementation correctly."); - - getTokenImplementationWasCalled = NO; - getTokenCallbackWasCalled = NO; - passedRefreshValue = NO; - - [app getTokenForcingRefresh:NO - withCallback:^(NSString *_Nullable token, NSError *_Nullable error) { - getTokenCallbackWasCalled = YES; - }]; - - XCTAssertFalse(passedRefreshValue, - @"The value for the 'refresh' parameter wasn't passed to the " - "'getTokenImplementation' block correctly."); -} - - (void)testOptionsLocking { FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; @@ -754,16 +701,6 @@ - (void)testAnalyticsNotSetByGlobalDataCollectionSwitch { #pragma mark - Internal Methods -// TODO: Remove this test once the `getUIDImplementation` block doesn't need to be set in Core. -- (void)testAuthGetUID { - [FIRApp configure]; - - [FIRApp defaultApp].getUIDImplementation = ^NSString * { - return @"highlander"; - }; - XCTAssertEqual([[FIRApp defaultApp] getUID], @"highlander"); -} - - (void)testIsDefaultAppConfigured { // Ensure it's false before anything is configured. XCTAssertFalse([FIRApp isDefaultAppConfigured]); diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m index d634b489138..0697026ed57 100644 --- a/Firebase/Auth/Source/FIRAuth.m +++ b/Firebase/Auth/Source/FIRAuth.m @@ -22,7 +22,6 @@ #import #endif -#import #import #import #import @@ -229,9 +228,9 @@ + (FIRActionCodeOperation)actionCodeOperationForRequestType:(NSString *)requestT #pragma mark - FIRAuth #if TARGET_OS_IOS -@interface FIRAuth () +@interface FIRAuth () #else -@interface FIRAuth () +@interface FIRAuth () #endif /** @property firebaseAppId @@ -344,23 +343,6 @@ - (instancetype)initWithApp:(FIRApp *)app { self = [self initWithAPIKey:app.options.APIKey appName:app.name]; if (self) { _app = app; - __weak FIRAuth *weakSelf = self; - - // TODO: Remove this block once Firestore, Database, and Storage move to the new interop API. - app.getTokenImplementation = ^(BOOL forceRefresh, FIRTokenCallback callback) { - // In the meantime, redirect call to the interop method that provides this functionality. - __weak FIRAuth *weakSelf = self; - [weakSelf getTokenForcingRefresh:forceRefresh withCallback:callback]; - }; - - // TODO: Remove this block once Firestore, Database, and Storage move to the new interop API. - app.getUIDImplementation = ^NSString *_Nullable() { - __block NSString *uid; - dispatch_sync(FIRAuthGlobalWorkQueue(), ^{ - uid = [weakSelf getUserID]; - }); - return uid; - }; #if TARGET_OS_IOS _authURLPresenter = [[FIRAuthURLPresenter alloc] init]; #endif diff --git a/Firebase/Auth/Source/FIRAuth_Internal.h b/Firebase/Auth/Source/FIRAuth_Internal.h index 519ece3effe..d4184f14c79 100644 --- a/Firebase/Auth/Source/FIRAuth_Internal.h +++ b/Firebase/Auth/Source/FIRAuth_Internal.h @@ -18,6 +18,8 @@ #import "FIRAuth.h" +#import + @class FIRAuthRequestConfiguration; #if TARGET_OS_IOS @@ -29,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface FIRAuth () +@interface FIRAuth () /** @property requestConfiguration @brief The configuration object comprising of paramters needed to make a request to Firebase diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index 3b352fa7d18..29570a89192 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -281,15 +281,6 @@ - (instancetype)initInstanceWithName:(NSString *)name options:(FIROptions *)opti return self; } -- (void)getTokenForcingRefresh:(BOOL)forceRefresh withCallback:(FIRTokenCallback)callback { - if (!_getTokenImplementation) { - callback(nil, nil); - return; - } - - _getTokenImplementation(forceRefresh, callback); -} - - (BOOL)configureCore { [self checkExpectedBundleID]; if (![self isAppIDValid]) { @@ -538,15 +529,6 @@ - (void)checkExpectedBundleID { } } -// TODO: Remove once SDKs transition to Auth interop library. -- (nullable NSString *)getUID { - if (!_getUIDImplementation) { - FIRLogWarning(kFIRLoggerCore, @"I-COR000025", @"FIRAuth getUID implementation wasn't set."); - return nil; - } - return _getUIDImplementation(); -} - #pragma mark - private - App ID Validation /** diff --git a/Firebase/Core/Private/FIRAppInternal.h b/Firebase/Core/Private/FIRAppInternal.h index e1aa65d0ba1..67cb33bc4c0 100644 --- a/Firebase/Core/Private/FIRAppInternal.h +++ b/Firebase/Core/Private/FIRAppInternal.h @@ -109,24 +109,6 @@ extern NSString *const FIRAuthStateDidChangeInternalNotificationAppKey; */ extern NSString *const FIRAuthStateDidChangeInternalNotificationUIDKey; -/** @typedef FIRTokenCallback - @brief The type of block which gets called when a token is ready. - */ -typedef void (^FIRTokenCallback)(NSString *_Nullable token, NSError *_Nullable error); - -/** @typedef FIRAppGetTokenImplementation - @brief The type of block which can provide an implementation for the @c getTokenWithCallback: - method. - @param forceRefresh Forces the token to be refreshed. - @param callback The block which should be invoked when the async call completes. - */ -typedef void (^FIRAppGetTokenImplementation)(BOOL forceRefresh, FIRTokenCallback callback); - -/** @typedef FIRAppGetUID - @brief The type of block which can provide an implementation for the @c getUID method. - */ -typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); - @interface FIRApp () /** @@ -134,17 +116,6 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); */ @property(nonatomic, readonly) BOOL isDefaultApp; -/** @property getTokenImplementation - @brief Gets or sets the block to use for the implementation of - @c getTokenForcingRefresh:withCallback: - */ -@property(nonatomic, copy) FIRAppGetTokenImplementation getTokenImplementation; - -/** @property getUIDImplementation - @brief Gets or sets the block to use for the implementation of @c getUID. - */ -@property(nonatomic, copy) FIRAppGetUIDImplementation getUIDImplementation; - /* * The container of interop SDKs for this app. */ @@ -204,19 +175,6 @@ typedef NSString *_Nullable (^FIRAppGetUIDImplementation)(void); */ - (instancetype)initInstanceWithName:(NSString *)name options:(FIROptions *)options; -/** @fn getTokenForcingRefresh:withCallback: - @brief Retrieves the Firebase authentication token, possibly refreshing it. - @param forceRefresh Forces a token refresh. Useful if the token becomes invalid for some reason - other than an expiration. - @param callback The block to invoke when the token is available. - */ -- (void)getTokenForcingRefresh:(BOOL)forceRefresh withCallback:(FIRTokenCallback)callback; - -/** - * Expose the UID of the current user for Firestore. - */ -- (nullable NSString *)getUID; - @end NS_ASSUME_NONNULL_END From fbc08976390f70b5cf8485ca1bd9ffed2dbb663e Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Mon, 10 Dec 2018 08:24:58 -0500 Subject: [PATCH 02/34] Fix tvOS sample's Auth APIs. (#2158) --- .../tvOSSample/EmailLoginViewController.swift | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Example/tvOSSample/tvOSSample/EmailLoginViewController.swift b/Example/tvOSSample/tvOSSample/EmailLoginViewController.swift index 38d5425a49e..f7b5a73315d 100644 --- a/Example/tvOSSample/tvOSSample/EmailLoginViewController.swift +++ b/Example/tvOSSample/tvOSSample/EmailLoginViewController.swift @@ -35,30 +35,30 @@ class EmailLoginViewController: UIViewController { @IBAction func logInButtonHit(_ sender: UIButton) { guard let (email, password) = validatedInputs() else { return } - Auth.auth().signIn(withEmail: email, password: password) { [unowned self] user, error in - guard let user = user else { + Auth.auth().signIn(withEmail: email, password: password) { [unowned self] result, error in + guard let result = result else { print("Error signing in: \(error!)") self.delegate?.emailLogin(self, failedWithError: error!) return } - print("Signed in as user: \(user.uid)!") - self.delegate?.emailLogin(self, signedInAs: user) + print("Signed in as user: \(result.user.uid)") + self.delegate?.emailLogin(self, signedInAs: result.user) } } @IBAction func signUpButtonHit(_ sender: UIButton) { guard let (email, password) = validatedInputs() else { return } - Auth.auth().createUser(withEmail: email, password: password) { [unowned self] user, error in - guard let user = user else { + Auth.auth().createUser(withEmail: email, password: password) { [unowned self] result, error in + guard let result = result else { print("Error signing up: \(error!)") self.delegate?.emailLogin(self, failedWithError: error!) return } - print("Created new user: \(user.uid)!") - self.delegate?.emailLogin(self, signedInAs: user) + print("Created new user: \(result.user.uid)!") + self.delegate?.emailLogin(self, signedInAs: result.user) } } From 4469b977add05691646eb0d9aca6dd0242167f4a Mon Sep 17 00:00:00 2001 From: Gil Date: Mon, 10 Dec 2018 09:29:18 -0800 Subject: [PATCH 03/34] Update CHANGELOG for Firestore v0.16.1 (#2164) --- Firestore/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 8d5bda7f76a..8ef61c3d2a6 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,5 +1,14 @@ # Unreleased +# v0.16.1 +- [fixed] Offline persistence now properly records schema downgrades. This is a + forward-looking change that allows versions past this one to safely downgrade + to this version. Downgrading to versions prior this one can be safe depending + on the source version. For example, downgrading from v0.16.1 to v0.15.0 is + safe because there have been no schema changes between these releases. +- [fixed] Fixed an issue where gRPC would crash if shut down multiple times + (#2146). + # v0.16.0 - [changed] Added a garbage collection process to on-disk persistence that removes older documents. This is enabled by default, and the SDK will attempt From c1c7506f947c64d2a7f9c324186fcca898fc7b9e Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Mon, 10 Dec 2018 10:18:04 -0800 Subject: [PATCH 04/34] Update the name of certificates bundle (#2171) To accommodate for release 5.14.0. --- Carthage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Carthage.md b/Carthage.md index ca5a7af7756..f8d401518a2 100644 --- a/Carthage.md +++ b/Carthage.md @@ -63,7 +63,7 @@ binary "https://dl.google.com/dl/firebase/ios/carthage/FirebaseStorageBinary.jso into the Xcode project and make sure they're added to the `Copy Bundle Resources` Build Phase : - For Firestore: - - ./Carthage/Build/iOS/FirebaseFirestore.framework/gRPCCertificates.bundle + - ./Carthage/Build/iOS/FirebaseFirestore.framework/gRPCCertificates-Firestore.bundle - For Invites: - ./Carthage/Build/iOS/FirebaseInvites.framework/GoogleSignIn.bundle - ./Carthage/Build/iOS/FirebaseInvites.framework/GPPACLPickerResources.bundle From 4dac884df1bda467f9fcc6aec6c9ca4c4e68191a Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Mon, 10 Dec 2018 11:02:39 -0800 Subject: [PATCH 05/34] Fix format string in FSTRemoteStore error logging (#2172) --- Firestore/Source/Remote/FSTRemoteStore.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firestore/Source/Remote/FSTRemoteStore.mm b/Firestore/Source/Remote/FSTRemoteStore.mm index 07818a25a4d..b12bd317622 100644 --- a/Firestore/Source/Remote/FSTRemoteStore.mm +++ b/Firestore/Source/Remote/FSTRemoteStore.mm @@ -195,7 +195,7 @@ - (void)disableNetworkInternal { _writeStream->Stop(); if (self.writePipeline.count > 0) { - LOG_DEBUG("Stopping write stream with %lu pending writes", + LOG_DEBUG("Stopping write stream with %s pending writes", (unsigned long)self.writePipeline.count); [self.writePipeline removeAllObjects]; } From 673b08592a11df2bf5fcaa351d116baec5ac3eb2 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Mon, 10 Dec 2018 11:57:08 -0800 Subject: [PATCH 06/34] C++: replace `FSTMaybeDocumentDictionary` with a C++ equivalent (#2139) Also eliminate most usages of `FSTDocumentKey`, remove most methods from the Objective-C class and make it just a wrapper over `DocumentKey`. The only usage that cannot be directly replaced by C++ `DocumentKey` is in `FSTFieldValue`. --- .../Benchmarks/FSTLevelDBBenchmarkTests.mm | 18 +-- Firestore/Example/Tests/API/FSTAPIHelpers.mm | 1 - Firestore/Example/Tests/Core/FSTQueryTests.mm | 1 - Firestore/Example/Tests/Core/FSTViewTests.mm | 1 - .../Tests/Integration/FSTDatastoreTests.mm | 5 +- .../Tests/Local/FSTLevelDBMigrationsTests.mm | 4 +- .../Tests/Local/FSTLocalSerializerTests.mm | 1 - .../Example/Tests/Local/FSTLocalStoreTests.mm | 90 ++++++++------- .../Tests/Local/FSTReferenceSetTests.mm | 13 ++- .../Local/FSTRemoteDocumentCacheTests.mm | 40 +++++-- .../Tests/Model/FSTDocumentKeyTests.mm | 40 ++----- .../Example/Tests/Model/FSTDocumentTests.mm | 2 +- .../Tests/Remote/FSTRemoteEventTests.mm | 1 - .../Example/Tests/SpecTests/FSTSpecTests.mm | 17 +-- .../Tests/SpecTests/FSTSyncEngineTestDriver.h | 10 +- .../SpecTests/FSTSyncEngineTestDriver.mm | 13 ++- Firestore/Example/Tests/Util/FSTHelpers.h | 29 +---- Firestore/Example/Tests/Util/FSTHelpers.mm | 14 +-- Firestore/Source/API/FIRDocumentSnapshot.mm | 4 +- Firestore/Source/Core/FSTFirestoreClient.mm | 7 +- Firestore/Source/Core/FSTQuery.mm | 6 +- Firestore/Source/Core/FSTSyncEngine.mm | 28 +++-- Firestore/Source/Core/FSTView.h | 13 +-- Firestore/Source/Core/FSTView.mm | 25 +++-- Firestore/Source/Core/FSTViewSnapshot.mm | 66 +++++------ .../Source/Local/FSTDocumentReference.mm | 4 +- .../Local/FSTLevelDBRemoteDocumentCache.mm | 10 +- .../Source/Local/FSTLocalDocumentsView.h | 7 +- .../Source/Local/FSTLocalDocumentsView.mm | 51 +++++---- Firestore/Source/Local/FSTLocalStore.h | 15 ++- Firestore/Source/Local/FSTLocalStore.mm | 30 ++--- Firestore/Source/Local/FSTLocalWriteResult.h | 8 +- Firestore/Source/Local/FSTLocalWriteResult.mm | 21 +++- .../Source/Local/FSTMemoryMutationQueue.mm | 4 +- .../Local/FSTMemoryRemoteDocumentCache.h | 2 - .../Local/FSTMemoryRemoteDocumentCache.mm | 75 +++++++------ Firestore/Source/Local/FSTPersistence.h | 1 - .../Source/Local/FSTRemoteDocumentCache.h | 8 +- Firestore/Source/Model/FSTDocument.mm | 2 +- .../Source/Model/FSTDocumentDictionary.h | 44 -------- .../Source/Model/FSTDocumentDictionary.mm | 42 ------- Firestore/Source/Model/FSTDocumentKey.h | 36 +----- Firestore/Source/Model/FSTDocumentKey.mm | 51 +-------- Firestore/Source/Model/FSTDocumentSet.h | 9 +- Firestore/Source/Model/FSTDocumentSet.mm | 62 +++++------ Firestore/Source/Model/FSTFieldValue.mm | 5 +- Firestore/Source/Remote/FSTRemoteEvent.h | 2 - Firestore/Source/Remote/FSTRemoteEvent.mm | 8 +- Firestore/Source/Remote/FSTSerializerBeta.mm | 3 +- Firestore/Source/Remote/FSTWatchChange.mm | 2 +- .../firebase/firestore/model/CMakeLists.txt | 2 + .../firebase/firestore/model/document_key.h | 20 +++- .../firebase/firestore/model/document_map.h | 103 ++++++++++++++++++ 53 files changed, 530 insertions(+), 546 deletions(-) delete mode 100644 Firestore/Source/Model/FSTDocumentDictionary.h delete mode 100644 Firestore/Source/Model/FSTDocumentDictionary.mm create mode 100644 Firestore/core/src/firebase/firestore/model/document_map.h diff --git a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm index 7fbf78ccd73..d7be928c9d6 100644 --- a/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm +++ b/Firestore/Example/Benchmarks/FSTLevelDBBenchmarkTests.mm @@ -22,19 +22,23 @@ #import "Firestore/Source/Local/FSTLevelDB.h" #import "Firestore/Source/Local/FSTLocalSerializer.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Remote/FSTSerializerBeta.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" +#include "Firestore/core/src/firebase/firestore/util/string_format.h" NS_ASSUME_NONNULL_BEGIN +using firebase::firestore::local::LevelDbRemoteDocumentKey; using firebase::firestore::local::LevelDbTargetDocumentKey; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::model::DatabaseId; +using firebase::firestore::model::DocumentKey; using firebase::firestore::model::TargetId; +using firebase::firestore::util::StringFormat; namespace { @@ -100,9 +104,8 @@ void FillDB() { LevelDbTransaction txn(db_.ptr, "benchmark"); for (int i = 0; i < numDocuments_; i++) { - FSTDocumentKey *docKey = - [FSTDocumentKey keyWithPathString:[NSString stringWithFormat:@"docs/doc_%i", i]]; - std::string docKeyString = [FSTLevelDBRemoteDocumentKey keyWithDocumentKey:docKey]; + auto docKey = DocumentKey::FromPathString(StringFormat("docs/doc_%i", i)); + std::string docKeyString = LevelDbRemoteDocumentKey::Key(docKey); txn.Put(docKeyString, DocumentData()); WriteIndex(txn, docKey); } @@ -112,7 +115,7 @@ void FillDB() { } protected: - void WriteIndex(LevelDbTransaction &txn, FSTDocumentKey *docKey) { + void WriteIndex(LevelDbTransaction &txn, const DocumentKey &docKey) { // Arbitrary target ID TargetId targetID = 1; txn.Put(LevelDbDocumentTargetKey::Key(docKey, targetID), emptyBuffer_); @@ -136,10 +139,9 @@ void WriteIndex(LevelDbTransaction &txn, FSTDocumentKey *docKey) { for (const auto &_ : state) { LevelDbTransaction txn(db_.ptr, "benchmark"); for (int i = 0; i < docsToUpdate; i++) { - FSTDocumentKey *docKey = - [FSTDocumentKey keyWithPathString:[NSString stringWithFormat:@"docs/doc_%i", i]]; + auto docKey = DocumentKey::FromPathString(StringFormat("docs/doc_%i", i)); if (writeIndexes) WriteIndex(txn, docKey); - std::string docKeyString = [FSTLevelDBRemoteDocumentKey keyWithDocumentKey:docKey]; + std::string docKeyString = LevelDbRemoteDocumentKey::Key(docKey); txn.Put(docKeyString, documentUpdate); } txn.Commit(); diff --git a/Firestore/Example/Tests/API/FSTAPIHelpers.mm b/Firestore/Example/Tests/API/FSTAPIHelpers.mm index 5e5c41314de..8e783c364b2 100644 --- a/Firestore/Example/Tests/API/FSTAPIHelpers.mm +++ b/Firestore/Example/Tests/API/FSTAPIHelpers.mm @@ -31,7 +31,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Core/FSTViewSnapshot.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" diff --git a/Firestore/Example/Tests/Core/FSTQueryTests.mm b/Firestore/Example/Tests/Core/FSTQueryTests.mm index 9ad357eb981..7e08d34581d 100644 --- a/Firestore/Example/Tests/Core/FSTQueryTests.mm +++ b/Firestore/Example/Tests/Core/FSTQueryTests.mm @@ -20,7 +20,6 @@ #import "Firestore/Source/API/FIRFirestore+Internal.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Example/Tests/Util/FSTHelpers.h" diff --git a/Firestore/Example/Tests/Core/FSTViewTests.mm b/Firestore/Example/Tests/Core/FSTViewTests.mm index 9ca3cea1a75..770028ffaeb 100644 --- a/Firestore/Example/Tests/Core/FSTViewTests.mm +++ b/Firestore/Example/Tests/Core/FSTViewTests.mm @@ -22,7 +22,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Core/FSTViewSnapshot.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Remote/FSTRemoteEvent.h" diff --git a/Firestore/Example/Tests/Integration/FSTDatastoreTests.mm b/Firestore/Example/Tests/Integration/FSTDatastoreTests.mm index b0140bb6b76..dbcb66d14c0 100644 --- a/Firestore/Example/Tests/Integration/FSTDatastoreTests.mm +++ b/Firestore/Example/Tests/Integration/FSTDatastoreTests.mm @@ -26,7 +26,6 @@ #import "Firestore/Source/Core/FSTFirestoreClient.h" #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" @@ -39,6 +38,7 @@ #include "Firestore/core/src/firebase/firestore/auth/empty_credentials_provider.h" #include "Firestore/core/src/firebase/firestore/core/database_info.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/precondition.h" #include "Firestore/core/src/firebase/firestore/util/async_queue.h" #include "Firestore/core/src/firebase/firestore/util/executor_libdispatch.h" @@ -51,6 +51,7 @@ using firebase::firestore::core::DatabaseInfo; using firebase::firestore::model::BatchId; using firebase::firestore::model::DatabaseId; +using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::Precondition; using firebase::firestore::model::TargetId; @@ -243,7 +244,7 @@ - (void)awaitExpectations { - (FSTSetMutation *)setMutation { return [[FSTSetMutation alloc] - initWithKey:[FSTDocumentKey keyWithPathString:@"rooms/eros"] + initWithKey:DocumentKey::FromPathString("rooms/eros") value:[[FSTObjectValue alloc] initWithDictionary:@{@"name" : [FSTStringValue stringValue:@"Eros"]}] precondition:Precondition::None()]; diff --git a/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm index 9ab838021aa..2ef0ed73018 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm @@ -124,8 +124,8 @@ - (void)testDropsTheQueryCache { BatchId batchID = 1; TargetId targetID = 2; - FSTDocumentKey *key1 = Key("documents/1"); - FSTDocumentKey *key2 = Key("documents/2"); + DocumentKey key1 = Key("documents/1"); + DocumentKey key2 = Key("documents/2"); std::string targetKeys[] = { LevelDbTargetKey::Key(targetID), diff --git a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm index 284bd2d12af..ca868f19397 100644 --- a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm @@ -31,7 +31,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" diff --git a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm index e5399fb8e31..5cff444f6bf 100644 --- a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm @@ -25,7 +25,6 @@ #import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" @@ -40,15 +39,27 @@ #import "Firestore/third_party/Immutable/Tests/FSTImmutableSortedSet+Testing.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" namespace testutil = firebase::firestore::testutil; using firebase::firestore::auth::User; +using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::ListenSequenceNumber; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::SnapshotVersion; using firebase::firestore::model::TargetId; +static NSArray *docMapToArray(const DocumentMap &docs) { + NSMutableArray *result = [NSMutableArray array]; + for (const auto &kv : docs.underlying_map()) { + [result addObject:static_cast(kv.second)]; + } + return result; +} + NS_ASSUME_NONNULL_BEGIN @interface FSTLocalStoreTests () @@ -57,12 +68,13 @@ @interface FSTLocalStoreTests () @property(nonatomic, strong, readwrite) FSTLocalStore *localStore; @property(nonatomic, strong, readonly) NSMutableArray *batches; -@property(nonatomic, strong, readwrite, nullable) FSTMaybeDocumentDictionary *lastChanges; @property(nonatomic, assign, readwrite) TargetId lastTargetID; @end -@implementation FSTLocalStoreTests +@implementation FSTLocalStoreTests { + MaybeDocumentMap _lastChanges; +} - (void)setUp { [super setUp]; @@ -78,7 +90,6 @@ - (void)setUp { [self.localStore start]; _batches = [NSMutableArray array]; - _lastChanges = nil; _lastTargetID = 0; } @@ -115,11 +126,11 @@ - (void)writeMutations:(NSArray *)mutations { [self.batches addObject:[[FSTMutationBatch alloc] initWithBatchID:result.batchID localWriteTime:[FIRTimestamp timestamp] mutations:mutations]]; - self.lastChanges = result.changes; + _lastChanges = result.changes; } - (void)applyRemoteEvent:(FSTRemoteEvent *)event { - self.lastChanges = [self.localStore applyRemoteEvent:event]; + _lastChanges = [self.localStore applyRemoteEvent:event]; } - (void)notifyLocalViewChanges:(FSTLocalViewChanges *)changes { @@ -137,13 +148,13 @@ - (void)acknowledgeMutationWithVersion:(FSTTestSnapshotVersion)documentVersion { commitVersion:version mutationResults:@[ mutationResult ] streamToken:nil]; - self.lastChanges = [self.localStore acknowledgeBatchWithResult:result]; + _lastChanges = [self.localStore acknowledgeBatchWithResult:result]; } - (void)rejectMutation { FSTMutationBatch *batch = [self.batches firstObject]; [self.batches removeObjectAtIndex:0]; - self.lastChanges = [self.localStore rejectBatchID:batch.batchID]; + _lastChanges = [self.localStore rejectBatchID:batch.batchID]; } - (TargetId)allocateQuery:(FSTQuery *)query { @@ -159,34 +170,31 @@ - (TargetId)allocateQuery:(FSTQuery *)query { } while (0) /** Asserts that a the lastChanges contain the docs in the given array. */ -#define FSTAssertChanged(documents) \ - XCTAssertNotNil(self.lastChanges); \ - do { \ - FSTMaybeDocumentDictionary *actual = self.lastChanges; \ - NSArray *expected = (documents); \ - XCTAssertEqual(actual.count, expected.count); \ - NSEnumerator *enumerator = expected.objectEnumerator; \ - [actual enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey * key, FSTMaybeDocument * value, \ - BOOL * stop) { \ - XCTAssertEqualObjects(value, [enumerator nextObject]); \ - }]; \ - self.lastChanges = nil; \ +#define FSTAssertChanged(documents) \ + do { \ + NSArray *expected = (documents); \ + XCTAssertEqual(_lastChanges.size(), expected.count); \ + NSEnumerator *enumerator = expected.objectEnumerator; \ + for (const auto &kv : _lastChanges) { \ + FSTMaybeDocument *value = kv.second; \ + XCTAssertEqualObjects(value, [enumerator nextObject]); \ + } \ + _lastChanges = MaybeDocumentMap{}; \ } while (0) /** Asserts that the given keys were removed. */ -#define FSTAssertRemoved(keyPaths) \ - XCTAssertNotNil(self.lastChanges); \ - do { \ - FSTMaybeDocumentDictionary *actual = self.lastChanges; \ - XCTAssertEqual(actual.count, keyPaths.count); \ - NSEnumerator *keyPathEnumerator = keyPaths.objectEnumerator; \ - [actual enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey * actualKey, \ - FSTMaybeDocument * value, BOOL * stop) { \ - FSTDocumentKey *expectedKey = FSTTestDocKey([keyPathEnumerator nextObject]); \ - XCTAssertEqualObjects(actualKey, expectedKey); \ - XCTAssertTrue([value isKindOfClass:[FSTDeletedDocument class]]); \ - }]; \ - self.lastChanges = nil; \ +#define FSTAssertRemoved(keyPaths) \ + do { \ + XCTAssertEqual(_lastChanges.size(), keyPaths.count); \ + NSEnumerator *keyPathEnumerator = keyPaths.objectEnumerator; \ + for (const auto &kv : _lastChanges) { \ + const DocumentKey &actualKey = kv.first; \ + FSTMaybeDocument *value = kv.second; \ + DocumentKey expectedKey = FSTTestDocKey([keyPathEnumerator nextObject]); \ + XCTAssertEqual(actualKey, expectedKey); \ + XCTAssertTrue([value isKindOfClass:[FSTDeletedDocument class]]); \ + } \ + _lastChanges = MaybeDocumentMap{}; \ } while (0) /** Asserts that the given local store contains the given document. */ @@ -200,7 +208,7 @@ - (TargetId)allocateQuery:(FSTQuery *)query { /** Asserts that the given local store does not contain the given document. */ #define FSTAssertNotContains(keyPathString) \ do { \ - FSTDocumentKey *key = FSTTestDocKey(keyPathString); \ + DocumentKey key = FSTTestDocKey(keyPathString); \ FSTMaybeDocument *actual = [self.localStore readDocument:key]; \ XCTAssertNil(actual); \ } while (0) @@ -834,9 +842,9 @@ - (void)testCanExecuteDocumentQueries { FSTTestSetMutation(@"foo/bar/Foo/Bar", @{@"Foo" : @"Bar"}) ]]; FSTQuery *query = FSTTestQuery("foo/bar"); - FSTDocumentDictionary *docs = [self.localStore executeQuery:query]; - XCTAssertEqualObjects([docs values], @[ FSTTestDoc("foo/bar", 0, @{@"foo" : @"bar"}, - FSTDocumentStateLocalMutations) ]); + DocumentMap docs = [self.localStore executeQuery:query]; + XCTAssertEqualObjects(docMapToArray(docs), @[ FSTTestDoc("foo/bar", 0, @{@"foo" : @"bar"}, + FSTDocumentStateLocalMutations) ]); } - (void)testCanExecuteCollectionQueries { @@ -850,9 +858,9 @@ - (void)testCanExecuteCollectionQueries { FSTTestSetMutation(@"fooo/blah", @{@"fooo" : @"blah"}) ]]; FSTQuery *query = FSTTestQuery("foo"); - FSTDocumentDictionary *docs = [self.localStore executeQuery:query]; + DocumentMap docs = [self.localStore executeQuery:query]; XCTAssertEqualObjects( - [docs values], (@[ + docMapToArray(docs), (@[ FSTTestDoc("foo/bar", 0, @{@"foo" : @"bar"}, FSTDocumentStateLocalMutations), FSTTestDoc("foo/baz", 0, @{@"foo" : @"baz"}, FSTDocumentStateLocalMutations) ])); @@ -874,8 +882,8 @@ - (void)testCanExecuteMixedCollectionQueries { [self.localStore locallyWriteMutations:@[ FSTTestSetMutation(@"foo/bonk", @{@"a" : @"b"}) ]]; - FSTDocumentDictionary *docs = [self.localStore executeQuery:query]; - XCTAssertEqualObjects([docs values], (@[ + DocumentMap docs = [self.localStore executeQuery:query]; + XCTAssertEqualObjects(docMapToArray(docs), (@[ FSTTestDoc("foo/bar", 20, @{@"a" : @"b"}, FSTDocumentStateSynced), FSTTestDoc("foo/baz", 10, @{@"a" : @"b"}, FSTDocumentStateSynced), FSTTestDoc("foo/bonk", 0, @{@"a" : @"b"}, FSTDocumentStateLocalMutations) diff --git a/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm b/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm index 802117a9eb7..c4e4f7cdbb5 100644 --- a/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm +++ b/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm @@ -19,7 +19,10 @@ #import #import "Firestore/Example/Tests/Util/FSTHelpers.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" + +using firebase::firestore::model::DocumentKey; NS_ASSUME_NONNULL_BEGIN @@ -29,7 +32,7 @@ @interface FSTReferenceSetTests : XCTestCase @implementation FSTReferenceSetTests - (void)testAddOrRemoveReferences { - FSTDocumentKey *key = FSTTestDocKey(@"foo/bar"); + DocumentKey key = FSTTestDocKey(@"foo/bar"); FSTReferenceSet *referenceSet = [[FSTReferenceSet alloc] init]; XCTAssertTrue([referenceSet isEmpty]); @@ -54,9 +57,9 @@ - (void)testAddOrRemoveReferences { } - (void)testRemoveAllReferencesForTargetID { - FSTDocumentKey *key1 = FSTTestDocKey(@"foo/bar"); - FSTDocumentKey *key2 = FSTTestDocKey(@"foo/baz"); - FSTDocumentKey *key3 = FSTTestDocKey(@"foo/blah"); + DocumentKey key1 = FSTTestDocKey(@"foo/bar"); + DocumentKey key2 = FSTTestDocKey(@"foo/baz"); + DocumentKey key3 = FSTTestDocKey(@"foo/blah"); FSTReferenceSet *referenceSet = [[FSTReferenceSet alloc] init]; [referenceSet addReferenceToKey:key1 forID:1]; diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm index 4714aa4c8dd..f7cf4bdb8ea 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm @@ -19,17 +19,23 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Example/Tests/Util/FSTHelpers.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/util/string_apple.h" #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" #include "absl/strings/string_view.h" namespace testutil = firebase::firestore::testutil; namespace util = firebase::firestore::util; +using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; NS_ASSUME_NONNULL_BEGIN @@ -137,15 +143,13 @@ - (void)testDocumentsMatchingQuery { [self setTestDocumentAtPath:"c/1"]; FSTQuery *query = FSTTestQuery("b"); - FSTDocumentDictionary *results = [self.remoteDocumentCache documentsMatchingQuery:query]; - NSArray *expected = @[ - FSTTestDoc("b/1", kVersion, _kDocData, FSTDocumentStateSynced), - FSTTestDoc("b/2", kVersion, _kDocData, FSTDocumentStateSynced) - ]; - XCTAssertEqual([results count], [expected count]); - for (FSTDocument *doc in expected) { - XCTAssertEqualObjects([results objectForKey:doc.key], doc); - } + DocumentMap results = [self.remoteDocumentCache documentsMatchingQuery:query]; + [self expectMap:results + hasDocsInArray:@[ + FSTTestDoc("b/1", kVersion, _kDocData, FSTDocumentStateSynced), + FSTTestDoc("b/2", kVersion, _kDocData, FSTDocumentStateSynced) + ] + exactly:YES]; }); } @@ -158,6 +162,22 @@ - (FSTDocument *)setTestDocumentAtPath:(const absl::string_view)path { return doc; } +- (void)expectMap:(const DocumentMap &)map + hasDocsInArray:(NSArray *)expected + exactly:(BOOL)exactly { + if (exactly) { + XCTAssertEqual(map.size(), [expected count]); + } + for (FSTDocument *doc in expected) { + FSTDocument *actual = nil; + auto found = map.underlying_map().find(doc.key); + if (found != map.underlying_map().end()) { + actual = static_cast(found->second); + } + XCTAssertEqualObjects(actual, doc); + } +} + @end NS_ASSUME_NONNULL_END diff --git a/Firestore/Example/Tests/Model/FSTDocumentKeyTests.mm b/Firestore/Example/Tests/Model/FSTDocumentKeyTests.mm index 5e465f796f1..013f008e491 100644 --- a/Firestore/Example/Tests/Model/FSTDocumentKeyTests.mm +++ b/Firestore/Example/Tests/Model/FSTDocumentKeyTests.mm @@ -20,7 +20,9 @@ #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" +#include "Firestore/core/test/firebase/firestore/testutil/testutil.h" +using firebase::firestore::testutil::Key; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::ResourcePath; @@ -31,40 +33,12 @@ @interface FSTDocumentKeyTests : XCTestCase @implementation FSTDocumentKeyTests -- (void)testConstructor { - ResourcePath path{"rooms", "firestore", "messages", "1"}; - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:path]; - XCTAssertEqual(path, key.path); -} - - (void)testComparison { - FSTDocumentKey *key1 = [FSTDocumentKey keyWithSegments:{"a", "b", "c", "d"}]; - FSTDocumentKey *key2 = [FSTDocumentKey keyWithSegments:{"a", "b", "c", "d"}]; - FSTDocumentKey *key3 = [FSTDocumentKey keyWithSegments:{"x", "y", "z", "w"}]; - XCTAssertTrue([key1 isEqualToKey:key2]); - XCTAssertFalse([key1 isEqualToKey:key3]); - - FSTDocumentKey *empty = [FSTDocumentKey keyWithSegments:{}]; - FSTDocumentKey *a = [FSTDocumentKey keyWithSegments:{"a", "a"}]; - FSTDocumentKey *b = [FSTDocumentKey keyWithSegments:{"b", "b"}]; - FSTDocumentKey *ab = [FSTDocumentKey keyWithSegments:{"a", "a", "b", "b"}]; - - XCTAssertEqual(NSOrderedAscending, [empty compare:a]); - XCTAssertEqual(NSOrderedAscending, [a compare:b]); - XCTAssertEqual(NSOrderedAscending, [a compare:ab]); - - XCTAssertEqual(NSOrderedDescending, [a compare:empty]); - XCTAssertEqual(NSOrderedDescending, [b compare:a]); - XCTAssertEqual(NSOrderedDescending, [ab compare:a]); -} - -- (void)testConverter { - const ResourcePath path{"rooms", "firestore", "messages", "1"}; - FSTDocumentKey *objcKey = [FSTDocumentKey keyWithPath:path]; - XCTAssertEqualObjects(objcKey, (FSTDocumentKey *)(DocumentKey{objcKey})); - - DocumentKey cpp_key{path}; - XCTAssertEqual(cpp_key, DocumentKey{(FSTDocumentKey *)(cpp_key)}); + FSTDocumentKey *key1 = [FSTDocumentKey keyWithDocumentKey:Key("a/b/c/d")]; + FSTDocumentKey *key2 = [FSTDocumentKey keyWithDocumentKey:Key("a/b/c/d")]; + FSTDocumentKey *key3 = [FSTDocumentKey keyWithDocumentKey:Key("x/y/z/w")]; + XCTAssertTrue([key1 isEqual:key2]); + XCTAssertFalse([key1 isEqual:key3]); } @end diff --git a/Firestore/Example/Tests/Model/FSTDocumentTests.mm b/Firestore/Example/Tests/Model/FSTDocumentTests.mm index 7867396c3a1..be919d8b08a 100644 --- a/Firestore/Example/Tests/Model/FSTDocumentTests.mm +++ b/Firestore/Example/Tests/Model/FSTDocumentTests.mm @@ -43,7 +43,7 @@ - (void)testConstructor { FSTDocument *doc = [FSTDocument documentWithData:data key:key version:version state:FSTDocumentStateSynced]; - XCTAssertEqualObjects(doc.key, FSTTestDocKey(@"messages/first")); + XCTAssertEqual(doc.key, FSTTestDocKey(@"messages/first")); XCTAssertEqual(doc.version, version); XCTAssertEqualObjects(doc.data, data); XCTAssertEqual(doc.hasLocalMutations, NO); diff --git a/Firestore/Example/Tests/Remote/FSTRemoteEventTests.mm b/Firestore/Example/Tests/Remote/FSTRemoteEventTests.mm index 948cafb8fd6..1e71ba8d144 100644 --- a/Firestore/Example/Tests/Remote/FSTRemoteEventTests.mm +++ b/Firestore/Example/Tests/Remote/FSTRemoteEventTests.mm @@ -21,7 +21,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Remote/FSTExistenceFilter.h" #import "Firestore/Source/Remote/FSTWatchChange.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" diff --git a/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm b/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm index a95d5c3e84d..acbb31c6b41 100644 --- a/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm +++ b/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm @@ -26,7 +26,6 @@ #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Remote/FSTExistenceFilter.h" @@ -39,6 +38,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/async_queue.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @@ -50,6 +50,7 @@ namespace util = firebase::firestore::util; using firebase::firestore::auth::User; using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::SnapshotVersion; using firebase::firestore::model::TargetId; using firebase::firestore::util::TimerId; @@ -272,7 +273,7 @@ - (void)doWatchEntity:(NSDictionary *)watchEntity { } } else if (watchEntity[@"doc"]) { NSDictionary *docSpec = watchEntity[@"doc"]; - FSTDocumentKey *key = FSTTestDocKey(docSpec[@"key"]); + DocumentKey key = FSTTestDocKey(docSpec[@"key"]); FSTObjectValue *_Nullable value = [docSpec[@"value"] isKindOfClass:[NSNull class]] ? nil : FSTTestObjectValue(docSpec[@"value"]); @@ -291,7 +292,7 @@ - (void)doWatchEntity:(NSDictionary *)watchEntity { document:doc]; [self.driver receiveWatchChange:change snapshotVersion:SnapshotVersion::None()]; } else if (watchEntity[@"key"]) { - FSTDocumentKey *docKey = FSTTestDocKey(watchEntity[@"key"]); + DocumentKey docKey = FSTTestDocKey(watchEntity[@"key"]); FSTWatchChange *change = [[FSTDocumentWatchChange alloc] initWithUpdatedTargetIDs:@[] removedTargetIDs:watchEntity[@"removedTargets"] @@ -574,13 +575,13 @@ - (void)validateStateExpectations:(nullable NSDictionary *)expected { [expected[@"watchStreamRequestCount"] intValue]); } if (expected[@"limboDocs"]) { - NSMutableSet *expectedLimboDocuments = [NSMutableSet set]; + DocumentKeySet expectedLimboDocuments; NSArray *docNames = expected[@"limboDocs"]; for (NSString *name in docNames) { - [expectedLimboDocuments addObject:FSTTestDocKey(name)]; + expectedLimboDocuments = expectedLimboDocuments.insert(FSTTestDocKey(name)); } // Update the expected limbo documents - self.driver.expectedLimboDocuments = expectedLimboDocuments; + [self.driver setExpectedLimboDocuments:std::move(expectedLimboDocuments)]; } if (expected[@"activeTargets"]) { NSMutableDictionary *expectedActiveTargets = [NSMutableDictionary dictionary]; @@ -638,9 +639,9 @@ - (void)validateLimboDocuments { @"Found limbo doc without an expected active target"); } - for (FSTDocumentKey *expectedLimboDoc in self.driver.expectedLimboDocuments) { + for (const DocumentKey &expectedLimboDoc : self.driver.expectedLimboDocuments) { XCTAssert(actualLimboDocs.find(expectedLimboDoc) != actualLimboDocs.end(), - @"Expected doc to be in limbo, but was not: %@", expectedLimboDoc); + @"Expected doc to be in limbo, but was not: %s", expectedLimboDoc.ToString().c_str()); actualLimboDocs.erase(expectedLimboDoc); } XCTAssertTrue(actualLimboDocs.empty(), "%lu Unexpected docs in limbo, the first one is <%s, %d>", diff --git a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.h b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.h index 548947aa23e..4ba4fa7192c 100644 --- a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.h +++ b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.h @@ -23,6 +23,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/model/types.h" #include "Firestore/core/src/firebase/firestore/util/async_queue.h" @@ -265,6 +266,12 @@ typedef std::unordered_map) currentLimboDocuments; +/** The expected set of documents in limbo. */ +- (const firebase::firestore::model::DocumentKeySet &)expectedLimboDocuments; + +/** Sets the expected set of documents in limbo. */ +- (void)setExpectedLimboDocuments:(firebase::firestore::model::DocumentKeySet)docs; + /** * The writes that have been sent to the FSTSyncEngine via writeUserMutation: but not yet * acknowledged by calling receiveWriteAck/Error:. They are tracked per-user. @@ -286,9 +293,6 @@ typedef std::unordered_map *expectedLimboDocuments; - /** The set of active targets as observed on the watch stream. */ @property(nonatomic, strong, readonly) NSDictionary *activeTargets; diff --git a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm index c6c63fe6f00..70d3307290c 100644 --- a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm +++ b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm @@ -21,6 +21,7 @@ #include #include #include +#include #import "Firestore/Source/Core/FSTEventManager.h" #import "Firestore/Source/Core/FSTQuery.h" @@ -51,6 +52,7 @@ using firebase::firestore::core::DatabaseInfo; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::OnlineState; using firebase::firestore::model::SnapshotVersion; using firebase::firestore::model::TargetId; @@ -108,6 +110,7 @@ @implementation FSTSyncEngineTestDriver { // ivar is declared as mutable. std::unordered_map *, HashUser> _outstandingWrites; + DocumentKeySet _expectedLimboDocuments; DatabaseInfo _databaseInfo; User _currentUser; @@ -164,8 +167,6 @@ - (instancetype)initWithPersistence:(id)persistence _queryListeners = [NSMutableDictionary dictionary]; - _expectedLimboDocuments = [NSSet set]; - _expectedActiveTargets = [NSDictionary dictionary]; _currentUser = initialUser; @@ -181,6 +182,14 @@ - (instancetype)initWithPersistence:(id)persistence return _outstandingWrites; } +- (const DocumentKeySet &)expectedLimboDocuments { + return _expectedLimboDocuments; +} + +- (void)setExpectedLimboDocuments:(DocumentKeySet)docs { + _expectedLimboDocuments = std::move(docs); +} + - (void)drainQueue { _workerQueue->EnqueueBlocking([] {}); } diff --git a/Firestore/Example/Tests/Util/FSTHelpers.h b/Firestore/Example/Tests/Util/FSTHelpers.h index faeafe8a352..679b59196f9 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.h +++ b/Firestore/Example/Tests/Util/FSTHelpers.h @@ -20,9 +20,9 @@ #include #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #import "Firestore/Source/Remote/FSTRemoteEvent.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" #include "Firestore/core/src/firebase/firestore/model/field_value.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" @@ -52,30 +52,11 @@ NS_ASSUME_NONNULL_BEGIN -#if __cplusplus -extern "C" { -#endif - #define FSTAssertIsKindOfClass(value, classType) \ do { \ XCTAssertEqualObjects([value class], [classType class]); \ } while (0); -/** - * Asserts that the given NSSet of FSTDocumentKeys contains exactly the given expected keys. - * This is a macro instead of a method so that the failure shows up on the right line. - * - * @param actualSet An NSSet of FSTDocumentKeys. - * @param expectedArray A sorted array of keys that actualSet must be equal to (after converting - * to an array and sorting). - */ -#define FSTAssertEqualSets(actualSet, expectedArray) \ - do { \ - NSArray *actual = [(actualSet)allObjects]; \ - actual = [actual sortedArrayUsingSelector:@selector(compare:)]; \ - XCTAssertEqualObjects(actual, (expectedArray)); \ - } while (0) - /** * Takes an array of "equality group" arrays and asserts that the compare: selector returns the * same as compare: on the indexes of the "equality groups" (NSOrderedSame for items in the same @@ -220,7 +201,7 @@ FSTFieldValue *FSTTestFieldValue(id _Nullable value); FSTObjectValue *FSTTestObjectValue(NSDictionary *data); /** A convenience method for creating document keys for tests. */ -FSTDocumentKey *FSTTestDocKey(NSString *path); +firebase::firestore::model::DocumentKey FSTTestDocKey(NSString *path); /** Allow tests to just use an int literal for versions. */ typedef int64_t FSTTestSnapshotVersion; @@ -292,7 +273,7 @@ FSTTransformMutation *FSTTestTransformMutation(NSString *path, NSDictionary *docs); +firebase::firestore::model::MaybeDocumentMap FSTTestDocUpdates(NSArray *docs); /** Creates a remote event that inserts a new document. */ FSTRemoteEvent *FSTTestAddedRemoteEvent(FSTMaybeDocument *doc, NSArray *addedToTargets); @@ -329,8 +310,4 @@ FSTTargetChange *FSTTestTargetChange(firebase::firestore::model::DocumentKeySet /** Creates a resume token to match the given snapshot version. */ NSData *_Nullable FSTTestResumeTokenFromSnapshotVersion(FSTTestSnapshotVersion watchSnapshot); -#if __cplusplus -} // extern "C" -#endif - NS_ASSUME_NONNULL_END diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index 965dc395aef..b9e6ca08050 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -34,7 +34,6 @@ #import "Firestore/Source/Local/FSTLocalViewChanges.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" @@ -64,6 +63,7 @@ using firebase::firestore::model::FieldPath; using firebase::firestore::model::FieldTransform; using firebase::firestore::model::FieldValue; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::Precondition; using firebase::firestore::model::ResourcePath; using firebase::firestore::model::ServerTimestampTransform; @@ -146,8 +146,8 @@ return (FSTObjectValue *)wrapped; } -FSTDocumentKey *FSTTestDocKey(NSString *path) { - return [FSTDocumentKey keyWithPathString:path]; +DocumentKey FSTTestDocKey(NSString *path) { + return DocumentKey::FromPathString(util::MakeString(path)); } FSTDocument *FSTTestDoc(const absl::string_view path, @@ -271,7 +271,7 @@ NSComparator FSTTestDocComparator(const absl::string_view fieldPath) { } FSTTransformMutation *FSTTestTransformMutation(NSString *path, NSDictionary *data) { - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:testutil::Resource(util::MakeString(path))]; + DocumentKey key{testutil::Resource(util::MakeString(path))}; FSTUserDataConverter *converter = FSTTestUserDataConverter(); ParsedUpdateData result = [converter parsedUpdateData:data]; HARD_ASSERT(result.data().value.count == 0, @@ -284,10 +284,10 @@ NSComparator FSTTestDocComparator(const absl::string_view fieldPath) { [[FSTDeleteMutation alloc] initWithKey:FSTTestDocKey(path) precondition:Precondition::None()]; } -FSTMaybeDocumentDictionary *FSTTestDocUpdates(NSArray *docs) { - FSTMaybeDocumentDictionary *updates = [FSTMaybeDocumentDictionary maybeDocumentDictionary]; +MaybeDocumentMap FSTTestDocUpdates(NSArray *docs) { + MaybeDocumentMap updates; for (FSTMaybeDocument *doc in docs) { - updates = [updates dictionaryBySettingObject:doc forKey:doc.key]; + updates = updates.insert(doc.key, doc); } return updates; } diff --git a/Firestore/Source/API/FIRDocumentSnapshot.mm b/Firestore/Source/API/FIRDocumentSnapshot.mm index 042c07161ed..18f8747b330 100644 --- a/Firestore/Source/API/FIRDocumentSnapshot.mm +++ b/Firestore/Source/API/FIRDocumentSnapshot.mm @@ -228,8 +228,8 @@ - (id)convertedValue:(FSTFieldValue *)value options:(FSTFieldValueOptions *)opti refDatabase->database_id().c_str(), database->project_id().c_str(), database->database_id().c_str()); } - return [FIRDocumentReference referenceWithKey:[ref valueWithOptions:options] - firestore:self.firestore]; + DocumentKey key = [[ref valueWithOptions:options] key]; + return [FIRDocumentReference referenceWithKey:key firestore:self.firestore]; } else { return [value valueWithOptions:options]; } diff --git a/Firestore/Source/Core/FSTFirestoreClient.mm b/Firestore/Source/Core/FSTFirestoreClient.mm index c72eae6cc18..acb16e3644c 100644 --- a/Firestore/Source/Core/FSTFirestoreClient.mm +++ b/Firestore/Source/Core/FSTFirestoreClient.mm @@ -60,6 +60,8 @@ using firebase::firestore::local::LruParams; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::OnlineState; using firebase::firestore::util::Path; using firebase::firestore::util::Status; @@ -362,10 +364,11 @@ - (void)getDocumentsFromLocalCache:(FIRQuery *)query completion:(void (^)(FIRQuerySnapshot *_Nullable query, NSError *_Nullable error))completion { _workerQueue->Enqueue([self, query, completion] { - FSTDocumentDictionary *docs = [self.localStore executeQuery:query.query]; + DocumentMap docs = [self.localStore executeQuery:query.query]; FSTView *view = [[FSTView alloc] initWithQuery:query.query remoteDocuments:DocumentKeySet{}]; - FSTViewDocumentChanges *viewDocChanges = [view computeChangesWithDocuments:docs]; + FSTViewDocumentChanges *viewDocChanges = + [view computeChangesWithDocuments:docs.underlying_map()]; FSTViewChange *viewChange = [view applyChangesToDocuments:viewDocChanges]; HARD_ASSERT(viewChange.limboChanges.count == 0, "View returned limbo documents during local-only query execution."); diff --git a/Firestore/Source/Core/FSTQuery.mm b/Firestore/Source/Core/FSTQuery.mm index e3b67217d62..f5f3e971652 100644 --- a/Firestore/Source/Core/FSTQuery.mm +++ b/Firestore/Source/Core/FSTQuery.mm @@ -188,7 +188,7 @@ - (BOOL)matchesDocument:(FSTDocument *)document { HARD_ASSERT(self.filterOperator != FSTRelationFilterOperatorArrayContains, "arrayContains queries don't make sense on document keys."); FSTReferenceValue *refValue = (FSTReferenceValue *)self.value; - NSComparisonResult comparison = FSTDocumentKeyComparator(document.key, refValue.value); + NSComparisonResult comparison = CompareKeys(document.key, refValue.value.key); return [self matchesComparison:comparison]; } else { return [self matchesValue:[document fieldForPath:self.field]]; @@ -381,7 +381,7 @@ - (instancetype)initWithFieldPath:(FieldPath)fieldPath ascending:(BOOL)ascending - (NSComparisonResult)compareDocument:(FSTDocument *)document1 toDocument:(FSTDocument *)document2 { NSComparisonResult result; if (_field == FieldPath::KeyFieldPath()) { - result = FSTDocumentKeyComparator(document1.key, document2.key); + result = CompareKeys(document1.key, document2.key); } else { FSTFieldValue *value1 = [document1 fieldForPath:self.field]; FSTFieldValue *value2 = [document2 fieldForPath:self.field]; @@ -475,7 +475,7 @@ - (BOOL)sortsBeforeDocument:(FSTDocument *)document HARD_ASSERT([fieldValue isKindOfClass:[FSTReferenceValue class]], "FSTBound has a non-key value where the key path is being used %s", fieldValue); FSTReferenceValue *refValue = (FSTReferenceValue *)fieldValue; - comparison = [refValue.value compare:document.key]; + comparison = CompareKeys(refValue.value.key, document.key); } else { FSTFieldValue *docValue = [document fieldForPath:sortOrderComponent.field]; HARD_ASSERT(docValue != nil, diff --git a/Firestore/Source/Core/FSTSyncEngine.mm b/Firestore/Source/Core/FSTSyncEngine.mm index c8b1d7fd4c2..69e2e6b2e87 100644 --- a/Firestore/Source/Core/FSTSyncEngine.mm +++ b/Firestore/Source/Core/FSTSyncEngine.mm @@ -39,6 +39,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" #include "Firestore/core/src/firebase/firestore/util/log.h" @@ -49,6 +50,8 @@ using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::ListenSequenceNumber; using firebase::firestore::model::OnlineState; using firebase::firestore::model::SnapshotVersion; @@ -212,12 +215,12 @@ - (TargetId)listenToQuery:(FSTQuery *)query { } - (FSTViewSnapshot *)initializeViewAndComputeSnapshotForQueryData:(FSTQueryData *)queryData { - FSTDocumentDictionary *docs = [self.localStore executeQuery:queryData.query]; + DocumentMap docs = [self.localStore executeQuery:queryData.query]; DocumentKeySet remoteKeys = [self.localStore remoteDocumentKeysForTarget:queryData.targetID]; FSTView *view = [[FSTView alloc] initWithQuery:queryData.query remoteDocuments:std::move(remoteKeys)]; - FSTViewDocumentChanges *viewDocChanges = [view computeChangesWithDocuments:docs]; + FSTViewDocumentChanges *viewDocChanges = [view computeChangesWithDocuments:docs.underlying_map()]; FSTViewChange *viewChange = [view applyChangesToDocuments:viewDocChanges]; HARD_ASSERT(viewChange.limboChanges.count == 0, "View returned limbo docs before target ack from the server."); @@ -349,7 +352,7 @@ - (void)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { } } - FSTMaybeDocumentDictionary *changes = [self.localStore applyRemoteEvent:remoteEvent]; + MaybeDocumentMap changes = [self.localStore applyRemoteEvent:remoteEvent]; [self emitNewSnapshotsAndNotifyLocalStoreWithChanges:changes remoteEvent:remoteEvent]; } @@ -419,17 +422,17 @@ - (void)applySuccessfulWriteWithResult:(FSTMutationBatchResult *)batchResult { // consistently happen before listen events. [self processUserCallbacksForBatchID:batchResult.batch.batchID error:nil]; - FSTMaybeDocumentDictionary *changes = [self.localStore acknowledgeBatchWithResult:batchResult]; + MaybeDocumentMap changes = [self.localStore acknowledgeBatchWithResult:batchResult]; [self emitNewSnapshotsAndNotifyLocalStoreWithChanges:changes remoteEvent:nil]; } - (void)rejectFailedWriteWithBatchID:(BatchId)batchID error:(NSError *)error { [self assertDelegateExistsForSelector:_cmd]; - FSTMaybeDocumentDictionary *changes = [self.localStore rejectBatchID:batchID]; + MaybeDocumentMap changes = [self.localStore rejectBatchID:batchID]; - if (!changes.isEmpty && [self errorIsInteresting:error]) { - LOG_WARN("Write at %s failed: %s", changes.minKey.path.CanonicalString(), - error.localizedDescription); + if (!changes.empty() && [self errorIsInteresting:error]) { + const DocumentKey &minKey = changes.min()->first; + LOG_WARN("Write at %s failed: %s", minKey.ToString(), error.localizedDescription); } // The local store may or may not be able to apply the write result and raise events immediately @@ -478,7 +481,7 @@ - (void)removeAndCleanupQuery:(FSTQueryView *)queryView { /** * Computes a new snapshot from the changes and calls the registered callback with the new snapshot. */ -- (void)emitNewSnapshotsAndNotifyLocalStoreWithChanges:(FSTMaybeDocumentDictionary *)changes +- (void)emitNewSnapshotsAndNotifyLocalStoreWithChanges:(const MaybeDocumentMap &)changes remoteEvent:(FSTRemoteEvent *_Nullable)remoteEvent { NSMutableArray *newSnapshots = [NSMutableArray array]; NSMutableArray *documentChangesInAllViews = [NSMutableArray array]; @@ -491,8 +494,9 @@ - (void)emitNewSnapshotsAndNotifyLocalStoreWithChanges:(FSTMaybeDocumentDictiona // The query has a limit and some docs were removed/updated, so we need to re-run the // query against the local store to make sure we didn't lose any good docs that had been // past the limit. - FSTDocumentDictionary *docs = [self.localStore executeQuery:queryView.query]; - viewDocChanges = [view computeChangesWithDocuments:docs previousChanges:viewDocChanges]; + DocumentMap docs = [self.localStore executeQuery:queryView.query]; + viewDocChanges = [view computeChangesWithDocuments:docs.underlying_map() + previousChanges:viewDocChanges]; } FSTTargetChange *_Nullable targetChange = nil; @@ -587,7 +591,7 @@ - (void)credentialDidChangeWithUser:(const firebase::firestore::auth::User &)use if (userChanged) { // Notify local store and emit any resulting events from swapping out the mutation queue. - FSTMaybeDocumentDictionary *changes = [self.localStore userDidChange:user]; + MaybeDocumentMap changes = [self.localStore userDidChange:user]; [self emitNewSnapshotsAndNotifyLocalStoreWithChanges:changes remoteEvent:nil]; } diff --git a/Firestore/Source/Core/FSTView.h b/Firestore/Source/Core/FSTView.h index 1c7ab374a63..1a25cd4ea7d 100644 --- a/Firestore/Source/Core/FSTView.h +++ b/Firestore/Source/Core/FSTView.h @@ -16,15 +16,13 @@ #import -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @class FSTDocumentSet; @class FSTDocumentViewChangeSet; -@class FSTMaybeDocument; @class FSTQuery; @class FSTTargetChange; @class FSTViewSnapshot; @@ -108,7 +106,8 @@ typedef NS_ENUM(NSInteger, FSTLimboDocumentChangeType) { * @param docChanges The doc changes to apply to this view. * @return a new set of docs, changes, and refill flag. */ -- (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDictionary *)docChanges; +- (FSTViewDocumentChanges *)computeChangesWithDocuments: + (const firebase::firestore::model::MaybeDocumentMap &)docChanges; /** * Iterates over a set of doc changes, applies the query limit, and computes what the new results @@ -120,9 +119,9 @@ typedef NS_ENUM(NSInteger, FSTLimboDocumentChangeType) { * and changes instead of the current view. * @return a new set of docs, changes, and refill flag. */ -- (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDictionary *)docChanges - previousChanges: - (nullable FSTViewDocumentChanges *)previousChanges; +- (FSTViewDocumentChanges *) + computeChangesWithDocuments:(const firebase::firestore::model::MaybeDocumentMap &)docChanges + previousChanges:(nullable FSTViewDocumentChanges *)previousChanges; /** * Updates the view with the given ViewDocumentChanges. diff --git a/Firestore/Source/Core/FSTView.mm b/Firestore/Source/Core/FSTView.mm index acd4114c567..2dc95d57eb7 100644 --- a/Firestore/Source/Core/FSTView.mm +++ b/Firestore/Source/Core/FSTView.mm @@ -30,6 +30,7 @@ using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::OnlineState; NS_ASSUME_NONNULL_BEGIN @@ -200,22 +201,21 @@ - (instancetype)initWithQuery:(FSTQuery *)query remoteDocuments:(DocumentKeySet) return _syncedDocuments; } -- (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDictionary *)docChanges { +- (FSTViewDocumentChanges *)computeChangesWithDocuments:(const MaybeDocumentMap &)docChanges { return [self computeChangesWithDocuments:docChanges previousChanges:nil]; } -- (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDictionary *)docChanges +- (FSTViewDocumentChanges *)computeChangesWithDocuments:(const MaybeDocumentMap &)docChanges previousChanges: (nullable FSTViewDocumentChanges *)previousChanges { FSTDocumentViewChangeSet *changeSet = previousChanges ? previousChanges.changeSet : [FSTDocumentViewChangeSet changeSet]; FSTDocumentSet *oldDocumentSet = previousChanges ? previousChanges.documentSet : self.documentSet; - __block DocumentKeySet newMutatedKeys = - previousChanges ? previousChanges.mutatedKeys : _mutatedKeys; - __block DocumentKeySet oldMutatedKeys = _mutatedKeys; - __block FSTDocumentSet *newDocumentSet = oldDocumentSet; - __block BOOL needsRefill = NO; + DocumentKeySet newMutatedKeys = previousChanges ? previousChanges.mutatedKeys : _mutatedKeys; + DocumentKeySet oldMutatedKeys = _mutatedKeys; + FSTDocumentSet *newDocumentSet = oldDocumentSet; + BOOL needsRefill = NO; // Track the last doc in a (full) limit. This is necessary, because some update (a delete, or an // update moving a doc past the old limit) might mean there is some other document in the local @@ -229,15 +229,17 @@ - (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDiction (self.query.limit && oldDocumentSet.count == self.query.limit) ? oldDocumentSet.lastDocument : nil; - [docChanges enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey *key, - FSTMaybeDocument *maybeNewDoc, BOOL *stop) { + for (const auto &kv : docChanges) { + const DocumentKey &key = kv.first; + FSTMaybeDocument *maybeNewDoc = kv.second; + FSTDocument *_Nullable oldDoc = [oldDocumentSet documentForKey:key]; FSTDocument *_Nullable newDoc = nil; if ([maybeNewDoc isKindOfClass:[FSTDocument class]]) { newDoc = (FSTDocument *)maybeNewDoc; } if (newDoc) { - HARD_ASSERT([key isEqual:newDoc.key], "Mismatching key in document changes: %s != %s", key, + HARD_ASSERT(key == newDoc.key, "Mismatching key in document changes: %s != %s", key, newDoc.key.ToString()); if (![self.query matchesDocument:newDoc]) { newDoc = nil; @@ -307,7 +309,8 @@ - (FSTViewDocumentChanges *)computeChangesWithDocuments:(FSTMaybeDocumentDiction newMutatedKeys = newMutatedKeys.erase(key); } } - }]; + } + if (self.query.limit) { for (long i = newDocumentSet.count - self.query.limit; i > 0; --i) { FSTDocument *oldDoc = [newDocumentSet lastDocument]; diff --git a/Firestore/Source/Core/FSTViewSnapshot.mm b/Firestore/Source/Core/FSTViewSnapshot.mm index abfbd5f20b1..655d8459546 100644 --- a/Firestore/Source/Core/FSTViewSnapshot.mm +++ b/Firestore/Source/Core/FSTViewSnapshot.mm @@ -16,15 +16,24 @@ #import "Firestore/Source/Core/FSTViewSnapshot.h" +#include +#include + #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTDocumentSet.h" -#import "Firestore/third_party/Immutable/FSTImmutableSortedDictionary.h" +#include "Firestore/core/src/firebase/firestore/immutable/sorted_map.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" +#include "Firestore/core/src/firebase/firestore/util/string_apple.h" +#include "Firestore/core/src/firebase/firestore/util/string_format.h" +#include "absl/strings/str_join.h" +using firebase::firestore::immutable::SortedMap; using firebase::firestore::model::DocumentKey; +using firebase::firestore::util::WrapNSString; +using firebase::firestore::util::StringFormat; NS_ASSUME_NONNULL_BEGIN @@ -74,78 +83,71 @@ - (NSString *)description { #pragma mark - FSTDocumentViewChangeSet -@interface FSTDocumentViewChangeSet () - -/** The set of all changes tracked so far, with redundant changes merged. */ -@property(nonatomic, strong) - FSTImmutableSortedDictionary *changeMap; - -@end - -@implementation FSTDocumentViewChangeSet +@implementation FSTDocumentViewChangeSet { + /** The set of all changes tracked so far, with redundant changes merged. */ + SortedMap _changeMap; +} + (instancetype)changeSet { return [[FSTDocumentViewChangeSet alloc] init]; } -- (instancetype)init { - self = [super init]; - if (self) { - _changeMap = [FSTImmutableSortedDictionary dictionaryWithComparator:FSTDocumentKeyComparator]; - } - return self; -} - - (NSString *)description { - return [self.changeMap description]; + std::string result = absl::StrJoin( + _changeMap, ",", + [](std::string *out, const std::pair &kv) { + out->append(StringFormat("%s: %s", kv.first, kv.second)); + }); + return WrapNSString(std::string{"{"} + result + "}"); } - (void)addChange:(FSTDocumentViewChange *)change { const DocumentKey &key = change.document.key; - FSTDocumentViewChange *oldChange = [self.changeMap objectForKey:key]; - if (!oldChange) { - self.changeMap = [self.changeMap dictionaryBySettingObject:change forKey:key]; + auto oldChangeIter = _changeMap.find(key); + if (oldChangeIter == _changeMap.end()) { + _changeMap = _changeMap.insert(key, change); return; } + FSTDocumentViewChange *oldChange = oldChangeIter->second; // Merge the new change with the existing change. if (change.type != FSTDocumentViewChangeTypeAdded && oldChange.type == FSTDocumentViewChangeTypeMetadata) { - self.changeMap = [self.changeMap dictionaryBySettingObject:change forKey:key]; + _changeMap = _changeMap.insert(key, change); } else if (change.type == FSTDocumentViewChangeTypeMetadata && oldChange.type != FSTDocumentViewChangeTypeRemoved) { FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:change.document type:oldChange.type]; - self.changeMap = [self.changeMap dictionaryBySettingObject:newChange forKey:key]; + _changeMap = _changeMap.insert(key, newChange); } else if (change.type == FSTDocumentViewChangeTypeModified && oldChange.type == FSTDocumentViewChangeTypeModified) { FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:change.document type:FSTDocumentViewChangeTypeModified]; - self.changeMap = [self.changeMap dictionaryBySettingObject:newChange forKey:key]; + _changeMap = _changeMap.insert(key, newChange); } else if (change.type == FSTDocumentViewChangeTypeModified && oldChange.type == FSTDocumentViewChangeTypeAdded) { FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:change.document type:FSTDocumentViewChangeTypeAdded]; - self.changeMap = [self.changeMap dictionaryBySettingObject:newChange forKey:key]; + _changeMap = _changeMap.insert(key, newChange); } else if (change.type == FSTDocumentViewChangeTypeRemoved && oldChange.type == FSTDocumentViewChangeTypeAdded) { - self.changeMap = [self.changeMap dictionaryByRemovingObjectForKey:key]; + _changeMap = _changeMap.erase(key); } else if (change.type == FSTDocumentViewChangeTypeRemoved && oldChange.type == FSTDocumentViewChangeTypeModified) { FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:oldChange.document type:FSTDocumentViewChangeTypeRemoved]; - self.changeMap = [self.changeMap dictionaryBySettingObject:newChange forKey:key]; + _changeMap = _changeMap.insert(key, newChange); } else if (change.type == FSTDocumentViewChangeTypeAdded && oldChange.type == FSTDocumentViewChangeTypeRemoved) { FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:change.document type:FSTDocumentViewChangeTypeModified]; - self.changeMap = [self.changeMap dictionaryBySettingObject:newChange forKey:key]; + _changeMap = _changeMap.insert(key, newChange); } else { // This includes these cases, which don't make sense: // Added -> Added @@ -160,10 +162,10 @@ - (void)addChange:(FSTDocumentViewChange *)change { - (NSArray *)changes { NSMutableArray *changes = [NSMutableArray array]; - [self.changeMap enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey *key, - FSTDocumentViewChange *change, BOOL *stop) { + for (const auto &kv : _changeMap) { + FSTDocumentViewChange *change = kv.second; [changes addObject:change]; - }]; + } return changes; } diff --git a/Firestore/Source/Local/FSTDocumentReference.mm b/Firestore/Source/Local/FSTDocumentReference.mm index 215801d511c..bdba50b2f4e 100644 --- a/Firestore/Source/Local/FSTDocumentReference.mm +++ b/Firestore/Source/Local/FSTDocumentReference.mm @@ -75,7 +75,7 @@ - (id)copyWithZone:(nullable NSZone *)zone { /** Sorts document references by key then ID. */ const NSComparator FSTDocumentReferenceComparatorByKey = ^NSComparisonResult(FSTDocumentReference *left, FSTDocumentReference *right) { - NSComparisonResult result = FSTDocumentKeyComparator(left.key, right.key); + NSComparisonResult result = CompareKeys(left.key, right.key); if (result != NSOrderedSame) { return result; } @@ -89,7 +89,7 @@ - (id)copyWithZone:(nullable NSZone *)zone { if (result != NSOrderedSame) { return result; } - return FSTDocumentKeyComparator(left.key, right.key); + return CompareKeys(left.key, right.key); }; NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm index 6258ff419ff..5dcaadd4c71 100644 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm @@ -23,7 +23,6 @@ #import "Firestore/Source/Local/FSTLevelDB.h" #import "Firestore/Source/Local/FSTLocalSerializer.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" @@ -38,6 +37,9 @@ using firebase::firestore::local::LevelDbRemoteDocumentKey; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; using leveldb::DB; using leveldb::Status; @@ -83,8 +85,8 @@ - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)documentKey { } } -- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { - FSTDocumentDictionary *results = [FSTDocumentDictionary documentDictionary]; +- (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { + DocumentMap results; // Documents are ordered by key, so we can use a prefix scan to narrow down // the documents we need to match the query against. @@ -99,7 +101,7 @@ - (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { if (!query.path.IsPrefixOf(maybeDoc.key.path())) { break; } else if ([maybeDoc isKindOfClass:[FSTDocument class]]) { - results = [results dictionaryBySettingObject:(FSTDocument *)maybeDoc forKey:maybeDoc.key]; + results = results.insert(maybeDoc.key, static_cast(maybeDoc)); } } diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.h b/Firestore/Source/Local/FSTLocalDocumentsView.h index bb5bb2215c3..d87dc837e70 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.h +++ b/Firestore/Source/Local/FSTLocalDocumentsView.h @@ -16,10 +16,9 @@ #import -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" @class FSTMaybeDocument; @class FSTQuery; @@ -53,11 +52,11 @@ NS_ASSUME_NONNULL_BEGIN * If we don't have cached state for a document in `keys`, a FSTDeletedDocument will be stored * for that key in the resulting set. */ -- (FSTMaybeDocumentDictionary *)documentsForKeys: +- (firebase::firestore::model::MaybeDocumentMap)documentsForKeys: (const firebase::firestore::model::DocumentKeySet &)keys; /** Performs a query against the local view of all documents. */ -- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query; +- (firebase::firestore::model::DocumentMap)documentsMatchingQuery:(FSTQuery *)query; @end diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.mm b/Firestore/Source/Local/FSTLocalDocumentsView.mm index f25dc6142cd..3a067225bf2 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.mm +++ b/Firestore/Source/Local/FSTLocalDocumentsView.mm @@ -20,19 +20,21 @@ #import "Firestore/Source/Local/FSTMutationQueue.h" #import "Firestore/Source/Local/FSTRemoteDocumentCache.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::ResourcePath; using firebase::firestore::model::SnapshotVersion; -using firebase::firestore::model::DocumentKeySet; NS_ASSUME_NONNULL_BEGIN @@ -78,8 +80,8 @@ - (nullable FSTMaybeDocument *)documentForKey:(const DocumentKey &)key return document; } -- (FSTMaybeDocumentDictionary *)documentsForKeys:(const DocumentKeySet &)keys { - FSTMaybeDocumentDictionary *results = [FSTMaybeDocumentDictionary maybeDocumentDictionary]; +- (MaybeDocumentMap)documentsForKeys:(const DocumentKeySet &)keys { + MaybeDocumentMap results; NSArray *batches = [self.mutationQueue allMutationBatchesAffectingDocumentKeys:keys]; for (const DocumentKey &key : keys) { @@ -91,13 +93,13 @@ - (FSTMaybeDocumentDictionary *)documentsForKeys:(const DocumentKeySet &)keys { version:SnapshotVersion::None() hasCommittedMutations:NO]; } - results = [results dictionaryBySettingObject:maybeDoc forKey:key]; + results = results.insert(key, maybeDoc); } return results; } -- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { +- (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { if (DocumentKey::IsDocumentKey(query.path)) { return [self documentsMatchingDocumentQuery:query.path]; } else { @@ -105,18 +107,18 @@ - (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { } } -- (FSTDocumentDictionary *)documentsMatchingDocumentQuery:(const ResourcePath &)docPath { - FSTDocumentDictionary *result = [FSTDocumentDictionary documentDictionary]; +- (DocumentMap)documentsMatchingDocumentQuery:(const ResourcePath &)docPath { + DocumentMap result; // Just do a simple document lookup. FSTMaybeDocument *doc = [self documentForKey:DocumentKey{docPath}]; if ([doc isKindOfClass:[FSTDocument class]]) { - result = [result dictionaryBySettingObject:(FSTDocument *)doc forKey:doc.key]; + result = result.insert(doc.key, static_cast(doc)); } return result; } -- (FSTDocumentDictionary *)documentsMatchingCollectionQuery:(FSTQuery *)query { - __block FSTDocumentDictionary *results = [self.remoteDocumentCache documentsMatchingQuery:query]; +- (DocumentMap)documentsMatchingCollectionQuery:(FSTQuery *)query { + DocumentMap results = [self.remoteDocumentCache documentsMatchingQuery:query]; // Get locally persisted mutation batches. NSArray *matchingBatches = [self.mutationQueue allMutationBatchesAffectingQuery:query]; @@ -128,17 +130,21 @@ - (FSTDocumentDictionary *)documentsMatchingCollectionQuery:(FSTQuery *)query { continue; } - FSTDocumentKey *key = static_cast(mutation.key); + const DocumentKey &key = mutation.key; // baseDoc may be nil for the documents that weren't yet written to the backend. - FSTMaybeDocument *baseDoc = results[key]; + FSTMaybeDocument *baseDoc = nil; + auto found = results.underlying_map().find(key); + if (found != results.underlying_map().end()) { + baseDoc = found->second; + } FSTMaybeDocument *mutatedDoc = [mutation applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:batch.localWriteTime]; if ([mutatedDoc isKindOfClass:[FSTDocument class]]) { - results = [results dictionaryBySettingObject:(FSTDocument *)mutatedDoc forKey:key]; + results = results.insert(key, static_cast(mutatedDoc)); } else { - results = [results dictionaryByRemovingObjectForKey:key]; + results = results.erase(key); } } } @@ -146,13 +152,14 @@ - (FSTDocumentDictionary *)documentsMatchingCollectionQuery:(FSTQuery *)query { // Finally, filter out any documents that don't actually match the query. Note that the extra // reference here prevents ARC from deallocating the initial unfiltered results while we're // enumerating them. - FSTDocumentDictionary *unfiltered = results; - [unfiltered - enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey *key, FSTDocument *doc, BOOL *stop) { - if (![query matchesDocument:doc]) { - results = [results dictionaryByRemovingObjectForKey:key]; - } - }]; + DocumentMap unfiltered = results; + for (const auto &kv : unfiltered.underlying_map()) { + const DocumentKey &key = kv.first; + FSTDocument *doc = static_cast(kv.second); + if (![query matchesDocument:doc]) { + results = results.erase(key); + } + } return results; } diff --git a/Firestore/Source/Local/FSTLocalStore.h b/Firestore/Source/Local/FSTLocalStore.h index 0ea15110503..60f8d2ee4a7 100644 --- a/Firestore/Source/Local/FSTLocalStore.h +++ b/Firestore/Source/Local/FSTLocalStore.h @@ -17,11 +17,11 @@ #import #import "Firestore/Source/Local/FSTLRUGarbageCollector.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @@ -90,7 +90,8 @@ NS_ASSUME_NONNULL_BEGIN * In response the local store switches the mutation queue to the new user and returns any * resulting document changes. */ -- (FSTMaybeDocumentDictionary *)userDidChange:(const firebase::firestore::auth::User &)user; +- (firebase::firestore::model::MaybeDocumentMap)userDidChange: + (const firebase::firestore::auth::User &)user; /** Accepts locally generated Mutations and commits them to storage. */ - (FSTLocalWriteResult *)locallyWriteMutations:(NSArray *)mutations; @@ -111,7 +112,8 @@ NS_ASSUME_NONNULL_BEGIN * * @return The resulting (modified) documents. */ -- (FSTMaybeDocumentDictionary *)acknowledgeBatchWithResult:(FSTMutationBatchResult *)batchResult; +- (firebase::firestore::model::MaybeDocumentMap)acknowledgeBatchWithResult: + (FSTMutationBatchResult *)batchResult; /** * Removes mutations from the MutationQueue for the specified batch. LocalDocuments will be @@ -119,7 +121,8 @@ NS_ASSUME_NONNULL_BEGIN * * @return The resulting (modified) documents. */ -- (FSTMaybeDocumentDictionary *)rejectBatchID:(firebase::firestore::model::BatchId)batchID; +- (firebase::firestore::model::MaybeDocumentMap)rejectBatchID: + (firebase::firestore::model::BatchId)batchID; /** Returns the last recorded stream token for the current user. */ - (nullable NSData *)lastStreamToken; @@ -144,7 +147,7 @@ NS_ASSUME_NONNULL_BEGIN * * LocalDocuments are re-calculated if there are remaining mutations in the queue. */ -- (FSTMaybeDocumentDictionary *)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent; +- (firebase::firestore::model::MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent; /** * Returns the keys of the documents that are associated with the given targetID in the remote @@ -163,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)releaseQuery:(FSTQuery *)query; /** Runs @a query against all the documents in the local store and returns the results. */ -- (FSTDocumentDictionary *)executeQuery:(FSTQuery *)query; +- (firebase::firestore::model::DocumentMap)executeQuery:(FSTQuery *)query; /** Notify the local store of the changed views to locally pin / unpin documents. */ - (void)notifyLocalViewChanges:(NSArray *)viewChanges; diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index 2ed4b6832a0..4626a3a297a 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -17,6 +17,7 @@ #import "Firestore/Source/Local/FSTLocalStore.h" #include +#include #import "FIRTimestamp.h" #import "Firestore/Source/Core/FSTListenSequence.h" @@ -32,14 +33,13 @@ #import "Firestore/Source/Local/FSTReferenceSet.h" #import "Firestore/Source/Local/FSTRemoteDocumentCache.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" #import "Firestore/Source/Remote/FSTRemoteEvent.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" -#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" #include "Firestore/core/src/firebase/firestore/util/log.h" @@ -50,7 +50,9 @@ using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; using firebase::firestore::model::DocumentVersionMap; +using firebase::firestore::model::MaybeDocumentMap; using firebase::firestore::model::ListenSequenceNumber; using firebase::firestore::model::SnapshotVersion; using firebase::firestore::model::TargetId; @@ -124,7 +126,7 @@ - (void)startMutationQueue { self.persistence.run("Start MutationQueue", [&]() { [self.mutationQueue start]; }); } -- (FSTMaybeDocumentDictionary *)userDidChange:(const User &)user { +- (MaybeDocumentMap)userDidChange:(const User &)user { // Swap out the mutation queue, grabbing the pending mutation batches before and after. NSArray *oldBatches = self.persistence.run( "OldBatches", @@ -134,7 +136,7 @@ - (FSTMaybeDocumentDictionary *)userDidChange:(const User &)user { [self startMutationQueue]; - return self.persistence.run("NewBatches", [&]() -> FSTMaybeDocumentDictionary * { + return self.persistence.run("NewBatches", [&]() -> MaybeDocumentMap { NSArray *newBatches = [self.mutationQueue allMutationBatches]; // Recreate our LocalDocumentsView using the new MutationQueue. @@ -163,13 +165,13 @@ - (FSTLocalWriteResult *)locallyWriteMutations:(NSArray *)mutatio FSTMutationBatch *batch = [self.mutationQueue addMutationBatchWithWriteTime:localWriteTime mutations:mutations]; DocumentKeySet keys = [batch keys]; - FSTMaybeDocumentDictionary *changedDocuments = [self.localDocuments documentsForKeys:keys]; - return [FSTLocalWriteResult resultForBatchID:batch.batchID changes:changedDocuments]; + MaybeDocumentMap changedDocuments = [self.localDocuments documentsForKeys:keys]; + return [FSTLocalWriteResult resultForBatchID:batch.batchID changes:std::move(changedDocuments)]; }); } -- (FSTMaybeDocumentDictionary *)acknowledgeBatchWithResult:(FSTMutationBatchResult *)batchResult { - return self.persistence.run("Acknowledge batch", [&]() -> FSTMaybeDocumentDictionary * { +- (MaybeDocumentMap)acknowledgeBatchWithResult:(FSTMutationBatchResult *)batchResult { + return self.persistence.run("Acknowledge batch", [&]() -> MaybeDocumentMap { id mutationQueue = self.mutationQueue; FSTMutationBatch *batch = batchResult.batch; @@ -181,8 +183,8 @@ - (FSTMaybeDocumentDictionary *)acknowledgeBatchWithResult:(FSTMutationBatchResu }); } -- (FSTMaybeDocumentDictionary *)rejectBatchID:(BatchId)batchID { - return self.persistence.run("Reject batch", [&]() -> FSTMaybeDocumentDictionary * { +- (MaybeDocumentMap)rejectBatchID:(BatchId)batchID { + return self.persistence.run("Reject batch", [&]() -> MaybeDocumentMap { FSTMutationBatch *toReject = [self.mutationQueue lookupMutationBatch:batchID]; HARD_ASSERT(toReject, "Attempt to reject nonexistent batch!"); @@ -209,8 +211,8 @@ - (void)setLastStreamToken:(nullable NSData *)streamToken { return [self.queryCache lastRemoteSnapshotVersion]; } -- (FSTMaybeDocumentDictionary *)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { - return self.persistence.run("Apply remote event", [&]() -> FSTMaybeDocumentDictionary * { +- (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { + return self.persistence.run("Apply remote event", [&]() -> MaybeDocumentMap { // TODO(gsoltis): move the sequence number into the reference delegate. ListenSequenceNumber sequenceNumber = self.persistence.currentSequenceNumber; id queryCache = self.queryCache; @@ -423,8 +425,8 @@ - (void)releaseQuery:(FSTQuery *)query { }); } -- (FSTDocumentDictionary *)executeQuery:(FSTQuery *)query { - return self.persistence.run("ExecuteQuery", [&]() -> FSTDocumentDictionary * { +- (DocumentMap)executeQuery:(FSTQuery *)query { + return self.persistence.run("ExecuteQuery", [&]() -> DocumentMap { return [self.localDocuments documentsMatchingQuery:query]; }); } diff --git a/Firestore/Source/Local/FSTLocalWriteResult.h b/Firestore/Source/Local/FSTLocalWriteResult.h index 8b38ea25884..e4b208d834d 100644 --- a/Firestore/Source/Local/FSTLocalWriteResult.h +++ b/Firestore/Source/Local/FSTLocalWriteResult.h @@ -16,8 +16,7 @@ #import -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - +#include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/types.h" NS_ASSUME_NONNULL_BEGIN @@ -26,12 +25,13 @@ NS_ASSUME_NONNULL_BEGIN @interface FSTLocalWriteResult : NSObject + (instancetype)resultForBatchID:(firebase::firestore::model::BatchId)batchID - changes:(FSTMaybeDocumentDictionary *)changes; + changes:(firebase::firestore::model::MaybeDocumentMap &&)changes; - (id)init __attribute__((unavailable("Use resultForBatchID:changes:"))); +- (const firebase::firestore::model::MaybeDocumentMap &)changes; + @property(nonatomic, assign, readonly) firebase::firestore::model::BatchId batchID; -@property(nonatomic, strong, readonly) FSTMaybeDocumentDictionary *changes; @end diff --git a/Firestore/Source/Local/FSTLocalWriteResult.mm b/Firestore/Source/Local/FSTLocalWriteResult.mm index 2f19ff587b8..fcad635248b 100644 --- a/Firestore/Source/Local/FSTLocalWriteResult.mm +++ b/Firestore/Source/Local/FSTLocalWriteResult.mm @@ -16,26 +16,35 @@ #import "Firestore/Source/Local/FSTLocalWriteResult.h" +#include + using firebase::firestore::model::BatchId; +using firebase::firestore::model::MaybeDocumentMap; NS_ASSUME_NONNULL_BEGIN @interface FSTLocalWriteResult () - (instancetype)initWithBatchID:(BatchId)batchID - changes:(FSTMaybeDocumentDictionary *)changes NS_DESIGNATED_INITIALIZER; + changes:(MaybeDocumentMap &&)changes NS_DESIGNATED_INITIALIZER; @end -@implementation FSTLocalWriteResult +@implementation FSTLocalWriteResult { + MaybeDocumentMap _changes; +} + +- (const MaybeDocumentMap &)changes { + return _changes; +} -+ (instancetype)resultForBatchID:(BatchId)batchID changes:(FSTMaybeDocumentDictionary *)changes { - return [[FSTLocalWriteResult alloc] initWithBatchID:batchID changes:changes]; ++ (instancetype)resultForBatchID:(BatchId)batchID changes:(MaybeDocumentMap &&)changes { + return [[FSTLocalWriteResult alloc] initWithBatchID:batchID changes:std::move(changes)]; } -- (instancetype)initWithBatchID:(BatchId)batchID changes:(FSTMaybeDocumentDictionary *)changes { +- (instancetype)initWithBatchID:(BatchId)batchID changes:(MaybeDocumentMap &&)changes { self = [super init]; if (self) { _batchID = batchID; - _changes = changes; + _changes = std::move(changes); } return self; } diff --git a/Firestore/Source/Local/FSTMemoryMutationQueue.mm b/Firestore/Source/Local/FSTMemoryMutationQueue.mm index 4648a78f733..618e6efcd01 100644 --- a/Firestore/Source/Local/FSTMemoryMutationQueue.mm +++ b/Firestore/Source/Local/FSTMemoryMutationQueue.mm @@ -208,7 +208,7 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { NSMutableArray *result = [NSMutableArray array]; FSTDocumentReferenceBlock block = ^(FSTDocumentReference *reference, BOOL *stop) { - if (![documentKey isEqualToKey:reference.key]) { + if (documentKey != reference.key) { *stop = YES; return; } @@ -230,7 +230,7 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { FSTDocumentReference *start = [[FSTDocumentReference alloc] initWithKey:key ID:0]; FSTDocumentReferenceBlock block = ^(FSTDocumentReference *reference, BOOL *stop) { - if (![key isEqualToKey:reference.key]) { + if (key != reference.key) { *stop = YES; return; } diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h index 71bce81eb55..453fcce7845 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h @@ -29,8 +29,6 @@ NS_ASSUME_NONNULL_BEGIN @interface FSTMemoryRemoteDocumentCache : NSObject -- (instancetype)init NS_DESIGNATED_INITIALIZER; - - (std::vector) removeOrphanedDocuments:(FSTMemoryLRUReferenceDelegate *)referenceDelegate throughSequenceNumber:(firebase::firestore::model::ListenSequenceNumber)upperBound; diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm index 6a6556b575c..ae4912cef35 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm @@ -21,12 +21,15 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentDictionary.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::ListenSequenceNumber; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; NS_ASSUME_NONNULL_BEGIN @@ -35,9 +38,9 @@ * document key in memory. This is only an estimate and includes the size * of the segments of the path, but not any object overhead or path separators. */ -static size_t FSTDocumentKeyByteSize(FSTDocumentKey *key) { +static size_t FSTDocumentKeyByteSize(const DocumentKey &key) { size_t count = 0; - for (const auto &segment : key.path) { + for (const auto &segment : key.path()) { count += segment.size(); } return count; @@ -45,50 +48,48 @@ static size_t FSTDocumentKeyByteSize(FSTDocumentKey *key) { @interface FSTMemoryRemoteDocumentCache () -/** Underlying cache of documents. */ -@property(nonatomic, strong) FSTMaybeDocumentDictionary *docs; - @end -@implementation FSTMemoryRemoteDocumentCache - -- (instancetype)init { - if (self = [super init]) { - _docs = [FSTMaybeDocumentDictionary maybeDocumentDictionary]; - } - return self; +@implementation FSTMemoryRemoteDocumentCache { + /** Underlying cache of documents. */ + MaybeDocumentMap _docs; } - (void)addEntry:(FSTMaybeDocument *)document { - self.docs = [self.docs dictionaryBySettingObject:document forKey:document.key]; + _docs = _docs.insert(document.key, document); } - (void)removeEntryForKey:(const DocumentKey &)key { - self.docs = [self.docs dictionaryByRemovingObjectForKey:key]; + _docs = _docs.erase(key); } - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)key { - return self.docs[static_cast(key)]; + auto found = _docs.find(key); + return found != _docs.end() ? found->second : nil; } -- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { - FSTDocumentDictionary *result = [FSTDocumentDictionary documentDictionary]; +- (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { + DocumentMap result; // Documents are ordered by key, so we can use a prefix scan to narrow down the documents // we need to match the query against. - FSTDocumentKey *prefix = [FSTDocumentKey keyWithPath:query.path.Append("")]; - NSEnumerator *enumerator = [self.docs keyEnumeratorFrom:prefix]; - for (FSTDocumentKey *key in enumerator) { - if (!query.path.IsPrefixOf(key.path)) { + DocumentKey prefix{query.path.Append("")}; + for (auto it = _docs.lower_bound(prefix); it != _docs.end(); ++it) { + const DocumentKey &key = it->first; + if (!query.path.IsPrefixOf(key.path())) { break; } - FSTMaybeDocument *maybeDoc = self.docs[key]; + FSTMaybeDocument *maybeDoc = nil; + auto found = _docs.find(key); + if (found != _docs.end()) { + maybeDoc = found->second; + } if (![maybeDoc isKindOfClass:[FSTDocument class]]) { continue; } - FSTDocument *doc = (FSTDocument *)maybeDoc; + FSTDocument *doc = static_cast(maybeDoc); if ([query matchesDocument:doc]) { - result = [result dictionaryBySettingObject:doc forKey:doc.key]; + result = result.insert(key, doc); } } @@ -99,24 +100,26 @@ - (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query { (FSTMemoryLRUReferenceDelegate *)referenceDelegate throughSequenceNumber:(ListenSequenceNumber)upperBound { std::vector removed; - FSTMaybeDocumentDictionary *updatedDocs = self.docs; - for (FSTDocumentKey *docKey in [self.docs keyEnumerator]) { + MaybeDocumentMap updatedDocs = _docs; + for (const auto &kv : _docs) { + const DocumentKey &docKey = kv.first; if (![referenceDelegate isPinnedAtSequenceNumber:upperBound document:docKey]) { - updatedDocs = [updatedDocs dictionaryByRemovingObjectForKey:docKey]; - removed.push_back(DocumentKey{docKey}); + updatedDocs = updatedDocs.erase(docKey); + removed.push_back(docKey); } } - self.docs = updatedDocs; + _docs = updatedDocs; return removed; } - (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer { - __block size_t count = 0; - [self.docs - enumerateKeysAndObjectsUsingBlock:^(FSTDocumentKey *key, FSTMaybeDocument *doc, BOOL *stop) { - count += FSTDocumentKeyByteSize(key); - count += [[serializer encodedMaybeDocument:doc] serializedSize]; - }]; + size_t count = 0; + for (const auto &kv : _docs) { + const DocumentKey &key = kv.first; + FSTMaybeDocument *doc = kv.second; + count += FSTDocumentKeyByteSize(key); + count += [[serializer encodedMaybeDocument:doc] serializedSize]; + } return count; } diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index 6d481b972ad..4141d375dfc 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -22,7 +22,6 @@ #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" #include "Firestore/core/src/firebase/firestore/util/status.h" -@class FSTDocumentKey; @class FSTQueryData; @class FSTReferenceSet; @protocol FSTMutationQueue; diff --git a/Firestore/Source/Local/FSTRemoteDocumentCache.h b/Firestore/Source/Local/FSTRemoteDocumentCache.h index 2c6d8721c4c..46fb5955a36 100644 --- a/Firestore/Source/Local/FSTRemoteDocumentCache.h +++ b/Firestore/Source/Local/FSTRemoteDocumentCache.h @@ -16,9 +16,9 @@ #import -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" @class FSTMaybeDocument; @class FSTQuery; @@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Represents cached documents received from the remote backend. * - * The cache is keyed by FSTDocumentKey and entries in the cache are FSTMaybeDocument instances, + * The cache is keyed by DocumentKey and entries in the cache are FSTMaybeDocument instances, * meaning we can cache both FSTDocument instances (an actual document with data) as well as * FSTDeletedDocument instances (indicating that the document is known to not exist). */ @@ -67,7 +67,7 @@ NS_ASSUME_NONNULL_BEGIN * @param query The query to match documents against. * @return The set of matching documents. */ -- (FSTDocumentDictionary *)documentsMatchingQuery:(FSTQuery *)query; +- (firebase::firestore::model::DocumentMap)documentsMatchingQuery:(FSTQuery *)query; @end diff --git a/Firestore/Source/Model/FSTDocument.mm b/Firestore/Source/Model/FSTDocument.mm index 88c37e99681..49ce4511693 100644 --- a/Firestore/Source/Model/FSTDocument.mm +++ b/Firestore/Source/Model/FSTDocument.mm @@ -238,7 +238,7 @@ - (NSString *)description { const NSComparator FSTDocumentComparatorByKey = ^NSComparisonResult(FSTMaybeDocument *doc1, FSTMaybeDocument *doc2) { - return [doc1.key compare:doc2.key]; + return CompareKeys(doc1.key, doc2.key); }; NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Model/FSTDocumentDictionary.h b/Firestore/Source/Model/FSTDocumentDictionary.h deleted file mode 100644 index f4e4ba1198b..00000000000 --- a/Firestore/Source/Model/FSTDocumentDictionary.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#import "Firestore/third_party/Immutable/FSTImmutableSortedDictionary.h" - -@class FSTDocument; -@class FSTDocumentKey; -@class FSTMaybeDocument; - -NS_ASSUME_NONNULL_BEGIN - -/** Convenience type for a map of keys to MaybeDocuments, since they are so common. */ -typedef FSTImmutableSortedDictionary - FSTMaybeDocumentDictionary; - -/** Convenience type for a map of keys to Documents, since they are so common. */ -typedef FSTImmutableSortedDictionary FSTDocumentDictionary; - -@interface FSTImmutableSortedDictionary (FSTDocumentDictionary) - -/** Returns a new set using the DocumentKeyComparator. */ -+ (FSTMaybeDocumentDictionary *)maybeDocumentDictionary; - -/** Returns a new set using the DocumentKeyComparator. */ -+ (FSTDocumentDictionary *)documentDictionary; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Model/FSTDocumentDictionary.mm b/Firestore/Source/Model/FSTDocumentDictionary.mm deleted file mode 100644 index 362af548b23..00000000000 --- a/Firestore/Source/Model/FSTDocumentDictionary.mm +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - -#import "Firestore/Source/Model/FSTDocumentKey.h" - -NS_ASSUME_NONNULL_BEGIN - -@implementation FSTImmutableSortedDictionary (FSTMaybeDocumentDictionary) - -+ (instancetype)maybeDocumentDictionary { - // Immutable dictionaries are contravariant in their value type, so just return a - // FSTDocumentDictionary here. - return [FSTDocumentDictionary documentDictionary]; -} - -+ (instancetype)documentDictionary { - static FSTDocumentDictionary *singleton; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - singleton = [FSTDocumentDictionary dictionaryWithComparator:FSTDocumentKeyComparator]; - }); - return singleton; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Model/FSTDocumentKey.h b/Firestore/Source/Model/FSTDocumentKey.h index ebc88c975be..80e6cc9f945 100644 --- a/Firestore/Source/Model/FSTDocumentKey.h +++ b/Firestore/Source/Model/FSTDocumentKey.h @@ -32,45 +32,19 @@ class DocumentKey; NS_ASSUME_NONNULL_BEGIN -/** FSTDocumentKey represents the location of a document in the Firestore database. */ -@interface FSTDocumentKey : NSObject - /** - * Creates and returns a new document key with the given path. - * - * @param path The path to the document. - * @return A new instance of FSTDocumentKey. + * `FSTDocumentKey` is a thin wrapper over `DocumentKey`, necessary until full migration is + * possible. Use the underlying `DocumentKey` for any operations. */ -+ (instancetype)keyWithPath:(firebase::firestore::model::ResourcePath)path; +@interface FSTDocumentKey : NSObject + (instancetype)keyWithDocumentKey:(const firebase::firestore::model::DocumentKey &)documentKey; -/** - * Creates and returns a new document key with a path with the given segments. - * - * @param segments The segments of the path to the document. - * @return A new instance of FSTDocumentKey. - */ -+ (instancetype)keyWithSegments:(std::initializer_list)segments; -/** - * Creates and returns a new document key from the given resource path string. - * - * @param resourcePath The slash-separated segments of the resource's path. - * @return A new instance of FSTDocumentKey. - */ -+ (instancetype)keyWithPathString:(NSString *)resourcePath; - -/** Returns true iff the given path is a path to a document. */ -+ (BOOL)isDocumentKey:(const firebase::firestore::model::ResourcePath &)path; -- (BOOL)isEqualToKey:(FSTDocumentKey *)other; -- (NSComparisonResult)compare:(FSTDocumentKey *)other; -/** The path to the document. */ -- (const firebase::firestore::model::ResourcePath &)path; +/** Gets the underlying C++ representation. */ +- (const firebase::firestore::model::DocumentKey &)key; @end -extern const NSComparator FSTDocumentKeyComparator; - /** The field path string that represents the document's key. */ extern NSString *const kDocumentKeyPath; diff --git a/Firestore/Source/Model/FSTDocumentKey.mm b/Firestore/Source/Model/FSTDocumentKey.mm index 841da067469..5fc78c1d067 100644 --- a/Firestore/Source/Model/FSTDocumentKey.mm +++ b/Firestore/Source/Model/FSTDocumentKey.mm @@ -41,22 +41,10 @@ @interface FSTDocumentKey () { @implementation FSTDocumentKey -+ (instancetype)keyWithPath:(ResourcePath)path { - return [[FSTDocumentKey alloc] initWithDocumentKey:DocumentKey{path}]; -} - + (instancetype)keyWithDocumentKey:(const firebase::firestore::model::DocumentKey &)documentKey { return [[FSTDocumentKey alloc] initWithDocumentKey:documentKey]; } -+ (instancetype)keyWithSegments:(std::initializer_list)segments { - return [FSTDocumentKey keyWithPath:ResourcePath(segments)]; -} - -+ (instancetype)keyWithPathString:(NSString *)resourcePath { - return [FSTDocumentKey keyWithPath:ResourcePath::FromString(util::MakeString(resourcePath))]; -} - /** Designated initializer. */ - (instancetype)initWithDocumentKey:(const DocumentKey &)key { if (self = [super init]) { @@ -65,6 +53,10 @@ - (instancetype)initWithDocumentKey:(const DocumentKey &)key { return self; } +- (const DocumentKey &)key { + return _delegate; +} + - (BOOL)isEqual:(id)object { if (self == object) { return YES; @@ -72,7 +64,7 @@ - (BOOL)isEqual:(id)object { if (![object isKindOfClass:[FSTDocumentKey class]]) { return NO; } - return [self isEqualToKey:(FSTDocumentKey *)object]; + return _delegate == static_cast(object)->_delegate; } - (NSUInteger)hash { @@ -88,41 +80,8 @@ - (id)copyWithZone:(NSZone *_Nullable)zone { return self; } -- (BOOL)isEqualToKey:(FSTDocumentKey *)other { - return FSTDocumentKeyComparator(self, other) == NSOrderedSame; -} - -- (NSComparisonResult)compare:(FSTDocumentKey *)other { - return FSTDocumentKeyComparator(self, other); -} - -+ (NSComparator)comparator { - return ^NSComparisonResult(id obj1, id obj2) { - return [obj1 compare:obj2]; - }; -} - -+ (BOOL)isDocumentKey:(const ResourcePath &)path { - return DocumentKey::IsDocumentKey(path); -} - -- (const ResourcePath &)path { - return _delegate.path(); -} - @end -const NSComparator FSTDocumentKeyComparator = - ^NSComparisonResult(FSTDocumentKey *key1, FSTDocumentKey *key2) { - if (key1.path < key2.path) { - return NSOrderedAscending; - } else if (key1.path > key2.path) { - return NSOrderedDescending; - } else { - return NSOrderedSame; - } - }; - NSString *const kDocumentKeyPath = @"__name__"; NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Model/FSTDocumentSet.h b/Firestore/Source/Model/FSTDocumentSet.h index b5521e73a2f..2087a3da59a 100644 --- a/Firestore/Source/Model/FSTDocumentSet.h +++ b/Firestore/Source/Model/FSTDocumentSet.h @@ -16,9 +16,8 @@ #import -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - #include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" @class FSTDocument; @@ -71,10 +70,10 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray *)arrayValue; /** - * Returns the documents as a FSTMaybeDocumentDictionary. This is O(1) as this leverages our - * internal representation. + * Returns the documents as a `DocumentMap`. This is O(1) as this leverages + * our internal representation. */ -- (FSTMaybeDocumentDictionary *)dictionaryValue; +- (const firebase::firestore::model::DocumentMap &)mapValue; /** Returns a new FSTDocumentSet that contains the given document. */ - (instancetype)documentSetByAddingDocument:(FSTDocument *_Nullable)document; diff --git a/Firestore/Source/Model/FSTDocumentSet.mm b/Firestore/Source/Model/FSTDocumentSet.mm index 2f0b42b748f..c87e2039e54 100644 --- a/Firestore/Source/Model/FSTDocumentSet.mm +++ b/Firestore/Source/Model/FSTDocumentSet.mm @@ -14,24 +14,20 @@ * limitations under the License. */ +#include + #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentKey.h" #import "Firestore/third_party/Immutable/FSTImmutableSortedSet.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" +using firebase::firestore::model::DocumentMap; using firebase::firestore::model::DocumentKey; NS_ASSUME_NONNULL_BEGIN -/** - * The type of the index of the documents in an FSTDocumentSet. - * @see FSTDocumentSet#index - */ -typedef FSTImmutableSortedDictionary IndexType; - /** * The type of the main collection of documents in an FSTDocumentSet. * @see FSTDocumentSet#sortedSet @@ -40,14 +36,8 @@ @interface FSTDocumentSet () -- (instancetype)initWithIndex:(IndexType *)index set:(SetType *)sortedSet NS_DESIGNATED_INITIALIZER; - -/** - * An index of the documents in the FSTDocumentSet, indexed by document key. The index - * exists to guarantee the uniqueness of document keys in the set and to allow lookup and removal - * of documents by key. - */ -@property(nonatomic, strong, readonly) IndexType *index; +- (instancetype)initWithIndex:(DocumentMap &&)index + set:(SetType *)sortedSet NS_DESIGNATED_INITIALIZER; /** * The main collection of documents in the FSTDocumentSet. The documents are ordered by a @@ -57,19 +47,24 @@ - (instancetype)initWithIndex:(IndexType *)index set:(SetType *)sortedSet NS_DES @property(nonatomic, strong, readonly) SetType *sortedSet; @end -@implementation FSTDocumentSet +@implementation FSTDocumentSet { + /** + * An index of the documents in the FSTDocumentSet, indexed by document key. The index + * exists to guarantee the uniqueness of document keys in the set and to allow lookup and removal + * of documents by key. + */ + DocumentMap _index; +} + (instancetype)documentSetWithComparator:(NSComparator)comparator { - IndexType *index = - [FSTImmutableSortedDictionary dictionaryWithComparator:FSTDocumentKeyComparator]; SetType *set = [FSTImmutableSortedSet setWithComparator:comparator]; - return [[FSTDocumentSet alloc] initWithIndex:index set:set]; + return [[FSTDocumentSet alloc] initWithIndex:DocumentMap {} set:set]; } -- (instancetype)initWithIndex:(IndexType *)index set:(SetType *)sortedSet { +- (instancetype)initWithIndex:(DocumentMap &&)index set:(SetType *)sortedSet { self = [super init]; if (self) { - _index = index; + _index = std::move(index); _sortedSet = sortedSet; } return self; @@ -116,19 +111,20 @@ - (NSString *)description { } - (NSUInteger)count { - return [self.index count]; + return _index.size(); } - (BOOL)isEmpty { - return [self.index isEmpty]; + return _index.empty(); } - (BOOL)containsKey:(const DocumentKey &)key { - return [self.index objectForKey:(FSTDocumentKey *)key] != nil; + return _index.underlying_map().find(key) != _index.underlying_map().end(); } - (FSTDocument *_Nullable)documentForKey:(const DocumentKey &)key { - return [self.index objectForKey:(FSTDocumentKey *)key]; + auto found = _index.underlying_map().find(key); + return found != _index.underlying_map().end() ? static_cast(found->second) : nil; } - (FSTDocument *_Nullable)firstDocument { @@ -140,7 +136,7 @@ - (FSTDocument *_Nullable)lastDocument { } - (NSUInteger)indexOfKey:(const DocumentKey &)key { - FSTDocument *doc = [self.index objectForKey:(FSTDocumentKey *)key]; + FSTDocument *doc = [self documentForKey:key]; return doc ? [self.sortedSet indexOfObject:doc] : NSNotFound; } @@ -156,8 +152,8 @@ - (NSArray *)arrayValue { return result; } -- (FSTMaybeDocumentDictionary *)dictionaryValue { - return self.index; +- (const DocumentMap &)mapValue { + return _index; } - (instancetype)documentSetByAddingDocument:(FSTDocument *_Nullable)document { @@ -170,20 +166,20 @@ - (instancetype)documentSetByAddingDocument:(FSTDocument *_Nullable)document { // accumulating values that aren't in the index. FSTDocumentSet *removed = [self documentSetByRemovingKey:document.key]; - IndexType *index = [removed.index dictionaryBySettingObject:document forKey:document.key]; + DocumentMap index = removed->_index.insert(document.key, document); SetType *set = [removed.sortedSet setByAddingObject:document]; - return [[FSTDocumentSet alloc] initWithIndex:index set:set]; + return [[FSTDocumentSet alloc] initWithIndex:std::move(index) set:set]; } - (instancetype)documentSetByRemovingKey:(const DocumentKey &)key { - FSTDocument *doc = [self.index objectForKey:(FSTDocumentKey *)key]; + FSTDocument *doc = [self documentForKey:key]; if (!doc) { return self; } - IndexType *index = [self.index dictionaryByRemovingObjectForKey:key]; + DocumentMap index = _index.erase(key); SetType *set = [self.sortedSet setByRemovingObject:doc]; - return [[FSTDocumentSet alloc] initWithIndex:index set:set]; + return [[FSTDocumentSet alloc] initWithIndex:std::move(index) set:set]; } @end diff --git a/Firestore/Source/Model/FSTFieldValue.mm b/Firestore/Source/Model/FSTFieldValue.mm index b721a73d326..6a790102934 100644 --- a/Firestore/Source/Model/FSTFieldValue.mm +++ b/Firestore/Source/Model/FSTFieldValue.mm @@ -24,6 +24,7 @@ #import "Firestore/Source/Util/FSTClasses.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/field_path.h" #include "Firestore/core/src/firebase/firestore/util/comparison.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @@ -678,7 +679,7 @@ - (BOOL)isEqual:(id)other { } FSTReferenceValue *otherRef = (FSTReferenceValue *)other; - return [self.key isEqualToKey:otherRef.key] && *self.databaseID == *otherRef.databaseID; + return self.key.key == otherRef.key.key && *self.databaseID == *otherRef.databaseID; } - (NSUInteger)hash { @@ -696,7 +697,7 @@ - (NSComparisonResult)compare:(FSTFieldValue *)other { return cmp; } cmp = WrapCompare(self.databaseID->database_id(), ref.databaseID->database_id()); - return cmp != NSOrderedSame ? cmp : [self.key compare:ref.key]; + return cmp != NSOrderedSame ? cmp : CompareKeys(self.key.key, ref.key.key); } else { return [self defaultCompare:other]; } diff --git a/Firestore/Source/Remote/FSTRemoteEvent.h b/Firestore/Source/Remote/FSTRemoteEvent.h index 46ec954c395..e3a96e4df45 100644 --- a/Firestore/Source/Remote/FSTRemoteEvent.h +++ b/Firestore/Source/Remote/FSTRemoteEvent.h @@ -21,8 +21,6 @@ #include #include -#import "Firestore/Source/Model/FSTDocumentDictionary.h" - #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" diff --git a/Firestore/Source/Remote/FSTRemoteEvent.mm b/Firestore/Source/Remote/FSTRemoteEvent.mm index 3b64fabb3f0..2c5fe95fdc6 100644 --- a/Firestore/Source/Remote/FSTRemoteEvent.mm +++ b/Firestore/Source/Remote/FSTRemoteEvent.mm @@ -426,7 +426,7 @@ - (void)handleExistenceFilter:(FSTExistenceFilterWatchChange *)existenceFilter { // does not exist and apply a deleted document to our updates. Without applying this deleted // document there might be another query that will raise this document as part of a snapshot // until it is resolved, essentially exposing inconsistency between queries. - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:query.path]; + DocumentKey key{query.path}; [self removeDocument:[FSTDeletedDocument documentWithKey:key version:SnapshotVersion::None() hasCommittedMutations:NO] @@ -470,7 +470,7 @@ - (void)resetTarget:(TargetId)targetID { // of the initial snapshot if Watch does not resend these documents. DocumentKeySet existingKeys = [_targetMetadataProvider remoteKeysForTarget:@(targetID)]; - for (FSTDocumentKey *key : existingKeys) { + for (const DocumentKey &key : existingKeys) { [self removeDocument:nil withKey:key fromTarget:targetID]; } } @@ -527,7 +527,7 @@ - (void)removeDocument:(FSTMaybeDocument *_Nullable)document /** * Returns whether the LocalStore considers the document to be part of the specified target. */ -- (BOOL)containsDocument:(FSTDocumentKey *)key inTarget:(TargetId)targetID { +- (BOOL)containsDocument:(const DocumentKey &)key inTarget:(TargetId)targetID { const DocumentKeySet &existingKeys = [_targetMetadataProvider remoteKeysForTarget:@(targetID)]; return existingKeys.contains(key); } @@ -573,7 +573,7 @@ - (FSTRemoteEvent *)remoteEventAtSnapshotVersion:(const SnapshotVersion &)snapsh // our local cache, we synthesize a document delete if we have not previously received the // document. This resolves the limbo state of the document, removing it from // limboDocumentRefs. - FSTDocumentKey *key = [FSTDocumentKey keyWithPath:queryData.query.path]; + DocumentKey key{queryData.query.path}; if (_pendingDocumentUpdates.find(key) == _pendingDocumentUpdates.end() && ![self containsDocument:key inTarget:targetID]) { [self removeDocument:[FSTDeletedDocument documentWithKey:key diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 2e52c3302cb..4657454b0df 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -216,7 +216,8 @@ - (GCFSValue *)encodedFieldValue:(FSTFieldValue *)fieldValue { } else if (fieldClass == [FSTReferenceValue class]) { FSTReferenceValue *ref = (FSTReferenceValue *)fieldValue; - return [self encodedReferenceValueForDatabaseID:[ref databaseID] key:[ref value]]; + DocumentKey key = [[ref value] key]; + return [self encodedReferenceValueForDatabaseID:[ref databaseID] key:key]; } else if (fieldClass == [FSTObjectValue class]) { GCFSValue *result = [GCFSValue message]; diff --git a/Firestore/Source/Remote/FSTWatchChange.mm b/Firestore/Source/Remote/FSTWatchChange.mm index 2c668cb093b..1387b02270e 100644 --- a/Firestore/Source/Remote/FSTWatchChange.mm +++ b/Firestore/Source/Remote/FSTWatchChange.mm @@ -64,7 +64,7 @@ - (BOOL)isEqual:(id)other { FSTDocumentWatchChange *otherChange = (FSTDocumentWatchChange *)other; return [_updatedTargetIDs isEqual:otherChange.updatedTargetIDs] && [_removedTargetIDs isEqual:otherChange.removedTargetIDs] && - [_documentKey isEqual:otherChange.documentKey] && + _documentKey == otherChange.documentKey && (_document == otherChange.document || [_document isEqual:otherChange.document]); } diff --git a/Firestore/core/src/firebase/firestore/model/CMakeLists.txt b/Firestore/core/src/firebase/firestore/model/CMakeLists.txt index 4a230eefe52..cd8d7876f60 100644 --- a/Firestore/core/src/firebase/firestore/model/CMakeLists.txt +++ b/Firestore/core/src/firebase/firestore/model/CMakeLists.txt @@ -22,6 +22,7 @@ cc_library( document.h document_key.cc document_key.h + document_map.h field_mask.h field_path.cc field_path.h @@ -45,6 +46,7 @@ cc_library( DEPENDS absl_optional absl_strings + firebase_firestore_immutable firebase_firestore_util firebase_firestore_types ) diff --git a/Firestore/core/src/firebase/firestore/model/document_key.h b/Firestore/core/src/firebase/firestore/model/document_key.h index 19671f9b853..a795e3ea90a 100644 --- a/Firestore/core/src/firebase/firestore/model/document_key.h +++ b/Firestore/core/src/firebase/firestore/model/document_key.h @@ -51,10 +51,6 @@ class DocumentKey { explicit DocumentKey(ResourcePath&& path); #if defined(__OBJC__) - DocumentKey(FSTDocumentKey* key) // NOLINT(runtime/explicit) - : path_(std::make_shared(key.path)) { - } - operator FSTDocumentKey*() const { return [FSTDocumentKey keyWithDocumentKey:*this]; } @@ -62,7 +58,7 @@ class DocumentKey { NSUInteger Hash() const { return util::Hash(ToString()); } -#endif +#endif // defined(__OBJC__) std::string ToString() const { return path().CanonicalString(); @@ -125,6 +121,20 @@ struct DocumentKeyHash { } }; +#if defined(__OBJC__) +inline NSComparisonResult CompareKeys(const DocumentKey& lhs, + const DocumentKey& rhs) { + if (lhs < rhs) { + return NSOrderedAscending; + } + if (lhs > rhs) { + return NSOrderedDescending; + } + return NSOrderedSame; +} + +#endif // defined(__OBJC__) + } // namespace model namespace util { diff --git a/Firestore/core/src/firebase/firestore/model/document_map.h b/Firestore/core/src/firebase/firestore/model/document_map.h new file mode 100644 index 00000000000..59ae69f41b5 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/model/document_map.h @@ -0,0 +1,103 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_DOCUMENT_MAP_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_DOCUMENT_MAP_H_ + +#include + +#import "Firestore/Source/Model/FSTDocument.h" + +#include "Firestore/core/src/firebase/firestore/immutable/sorted_map.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" + +#include "absl/base/attributes.h" + +namespace firebase { +namespace firestore { +namespace model { + +/** + * Convenience type for a map of keys to MaybeDocuments, since they are so + * common. + */ +using MaybeDocumentMap = immutable::SortedMap; + +/** + * Convenience type for a map of keys to Documents, since they are so common. + * + * PORTING NOTE: unlike other platforms, in C++ `Foo` cannot be + * converted to `Foo`; consequently, if `DocumentMap` were simply an + * alias similar to `MaybeDocumentMap`, it couldn't be passed to functions + * expecting `MaybeDocumentMap`. + * + * To work around this, in C++ `DocumentMap` is a simple wrapper over + * a `MaybeDocumentMap` that forwards all functions to the underlying map but + * with added type safety (it only accepts `FSTDocument`s, not + * `FSTMaybeDocument`s). Use `DocumentMap` in functions creating and/or + * returning maps that only contain `FSTDocument`s; when the `DocumentMap` needs + * to be passed to a function accepting a `MaybeDocumentMap`, use + * `underlying_map` function to get (read-only) access to the representation. + * Also use `underlying_map` for iterating and searching. + */ +class DocumentMap { + public: + DocumentMap() = default; + + ABSL_MUST_USE_RESULT DocumentMap insert(const DocumentKey& key, + FSTDocument* value) const { + return DocumentMap{map_.insert(key, value)}; + } + + ABSL_MUST_USE_RESULT DocumentMap erase(const DocumentKey& key) const { + return DocumentMap{map_.erase(key)}; + } + + bool empty() const { + return map_.empty(); + } + MaybeDocumentMap::size_type size() const { + return map_.size(); + } + + /** Use this function to "convert" `DocumentMap` to a `MaybeDocumentMap`. */ + const MaybeDocumentMap& underlying_map() const { + return map_; + } + + private: + explicit DocumentMap(MaybeDocumentMap&& map) : map_{std::move(map)} { + } + + MaybeDocumentMap map_; +}; + +inline FSTDocument* GetFSTDocumentOrNil(FSTMaybeDocument* maybeDoc) { + if ([maybeDoc isKindOfClass:[FSTDocument class]]) { + return static_cast(maybeDoc); + } + return nil; +} + +inline FSTDocument* GetFSTDocumentOrNil(FSTDocument* doc) { + return doc; +} + +} // namespace model +} // namespace firestore +} // namespace firebase + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_DOCUMENT_MAP_H_ From 9f6ed13914bcd14ee629e74b8813b46240476ffe Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Mon, 10 Dec 2018 14:39:22 -0800 Subject: [PATCH 07/34] Port performance optimizations to speed up reading large collections from Android (#2140) Straightforward port of firebase/firebase-android-sdk#123. --- .../Local/FSTRemoteDocumentCacheTests.mm | 39 +++++++++++++++-- .../Local/FSTLevelDBRemoteDocumentCache.mm | 18 ++++++++ .../Source/Local/FSTLocalDocumentsView.h | 7 +++ .../Source/Local/FSTLocalDocumentsView.mm | 43 +++++++++++++++++-- Firestore/Source/Local/FSTLocalSerializer.mm | 6 ++- Firestore/Source/Local/FSTLocalStore.mm | 21 ++++++--- .../Local/FSTMemoryRemoteDocumentCache.mm | 10 +++++ .../Source/Local/FSTRemoteDocumentCache.h | 10 +++++ Firestore/Source/Model/FSTDocument.h | 13 ++++++ Firestore/Source/Model/FSTDocument.mm | 27 ++++++++++++ Firestore/Source/Remote/FSTSerializerBeta.mm | 15 +++++-- .../firebase/firestore/remote/watch_stream.mm | 6 ++- 12 files changed, 196 insertions(+), 19 deletions(-) diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm index f7cf4bdb8ea..cd15d98b94f 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm @@ -81,6 +81,37 @@ - (void)testSetAndReadADocument { [self setAndReadADocumentAtPath:kDocPath]; } +- (void)testSetAndReadSeveralDocuments { + if (!self.remoteDocumentCache) return; + + self.persistence.run("testSetAndReadSeveralDocuments", [=]() { + NSArray *written = + @[ [self setTestDocumentAtPath:kDocPath], [self setTestDocumentAtPath:kLongDocPath] ]; + MaybeDocumentMap read = [self.remoteDocumentCache + entriesForKeys:DocumentKeySet{testutil::Key(kDocPath), testutil::Key(kLongDocPath)}]; + [self expectMap:read hasDocsInArray:written exactly:YES]; + }); +} + +- (void)testSetAndReadSeveralDocumentsIncludingMissingDocument { + if (!self.remoteDocumentCache) return; + + self.persistence.run("testSetAndReadSeveralDocumentsIncludingMissingDocument", [=]() { + NSArray *written = + @[ [self setTestDocumentAtPath:kDocPath], [self setTestDocumentAtPath:kLongDocPath] ]; + MaybeDocumentMap read = + [self.remoteDocumentCache entriesForKeys:DocumentKeySet{ + testutil::Key(kDocPath), + testutil::Key(kLongDocPath), + testutil::Key("foo/nonexistent"), + }]; + [self expectMap:read hasDocsInArray:written exactly:NO]; + auto found = read.find(DocumentKey::FromPathString("foo/nonexistent")); + XCTAssertTrue(found != read.end()); + XCTAssertNil(found->second); + }); +} + - (void)testSetAndReadADocumentAtDeepPath { if (!self.remoteDocumentCache) return; @@ -144,7 +175,7 @@ - (void)testDocumentsMatchingQuery { FSTQuery *query = FSTTestQuery("b"); DocumentMap results = [self.remoteDocumentCache documentsMatchingQuery:query]; - [self expectMap:results + [self expectMap:results.underlying_map() hasDocsInArray:@[ FSTTestDoc("b/1", kVersion, _kDocData, FSTDocumentStateSynced), FSTTestDoc("b/2", kVersion, _kDocData, FSTDocumentStateSynced) @@ -162,7 +193,7 @@ - (FSTDocument *)setTestDocumentAtPath:(const absl::string_view)path { return doc; } -- (void)expectMap:(const DocumentMap &)map +- (void)expectMap:(const MaybeDocumentMap &)map hasDocsInArray:(NSArray *)expected exactly:(BOOL)exactly { if (exactly) { @@ -170,8 +201,8 @@ - (void)expectMap:(const DocumentMap &)map } for (FSTDocument *doc in expected) { FSTDocument *actual = nil; - auto found = map.underlying_map().find(doc.key); - if (found != map.underlying_map().end()) { + auto found = map.find(doc.key); + if (found != map.end()) { actual = static_cast(found->second); } XCTAssertEqualObjects(actual, doc); diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm index 5dcaadd4c71..66f223e75f2 100644 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm @@ -85,6 +85,24 @@ - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)documentKey { } } +- (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { + MaybeDocumentMap results; + + LevelDbRemoteDocumentKey currentKey; + auto it = _db.currentTransaction->NewIterator(); + + for (const DocumentKey &key : keys) { + it->Seek([self remoteDocumentKey:key]); + if (!it->Valid() || !currentKey.Decode(it->key()) || currentKey.document_key() != key) { + results = results.insert(key, nil); + } else { + results = results.insert(key, [self decodeMaybeDocument:it->value() withKey:key]); + } + } + + return results; +} + - (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { DocumentMap results; diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.h b/Firestore/Source/Local/FSTLocalDocumentsView.h index d87dc837e70..6ec6570e548 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.h +++ b/Firestore/Source/Local/FSTLocalDocumentsView.h @@ -55,6 +55,13 @@ NS_ASSUME_NONNULL_BEGIN - (firebase::firestore::model::MaybeDocumentMap)documentsForKeys: (const firebase::firestore::model::DocumentKeySet &)keys; +/** + * Similar to `documentsForKeys`, but creates the local view from the given + * `baseDocs` without retrieving documents from the local store. + */ +- (firebase::firestore::model::MaybeDocumentMap)localViewsForDocuments: + (const firebase::firestore::model::MaybeDocumentMap &)baseDocs; + /** Performs a query against the local view of all documents. */ - (firebase::firestore::model::DocumentMap)documentsMatchingQuery:(FSTQuery *)query; diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.mm b/Firestore/Source/Local/FSTLocalDocumentsView.mm index 3a067225bf2..e1820df16e5 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.mm +++ b/Firestore/Source/Local/FSTLocalDocumentsView.mm @@ -80,13 +80,48 @@ - (nullable FSTMaybeDocument *)documentForKey:(const DocumentKey &)key return document; } +// Returns the view of the given `docs` as they would appear after applying all +// mutations in the given `batches`. +- (MaybeDocumentMap)applyLocalMutationsToDocuments:(const MaybeDocumentMap &)docs + fromBatches:(NSArray *)batches { + MaybeDocumentMap results; + + for (const auto &kv : docs) { + const DocumentKey &key = kv.first; + FSTMaybeDocument *localView = kv.second; + for (FSTMutationBatch *batch in batches) { + localView = [batch applyToLocalDocument:localView documentKey:key]; + } + results = results.insert(key, localView); + } + return results; +} + - (MaybeDocumentMap)documentsForKeys:(const DocumentKeySet &)keys { + MaybeDocumentMap docs = [self.remoteDocumentCache entriesForKeys:keys]; + return [self localViewsForDocuments:docs]; +} + +/** + * Similar to `documentsForKeys`, but creates the local view from the given + * `baseDocs` without retrieving documents from the local store. + */ +- (MaybeDocumentMap)localViewsForDocuments:(const MaybeDocumentMap &)baseDocs { MaybeDocumentMap results; + + DocumentKeySet allKeys; + for (const auto &kv : baseDocs) { + allKeys = allKeys.insert(kv.first); + } NSArray *batches = - [self.mutationQueue allMutationBatchesAffectingDocumentKeys:keys]; - for (const DocumentKey &key : keys) { - // TODO(mikelehen): PERF: Consider fetching all remote documents at once rather than one-by-one. - FSTMaybeDocument *maybeDoc = [self documentForKey:key inBatches:batches]; + [self.mutationQueue allMutationBatchesAffectingDocumentKeys:allKeys]; + + MaybeDocumentMap docs = [self applyLocalMutationsToDocuments:baseDocs fromBatches:batches]; + + for (const auto &kv : docs) { + const DocumentKey &key = kv.first; + FSTMaybeDocument *maybeDoc = kv.second; + // TODO(http://b/32275378): Don't conflate missing / deleted. if (!maybeDoc) { maybeDoc = [FSTDeletedDocument documentWithKey:key diff --git a/Firestore/Source/Local/FSTLocalSerializer.mm b/Firestore/Source/Local/FSTLocalSerializer.mm index ed5bdab9a00..2d69fbd86de 100644 --- a/Firestore/Source/Local/FSTLocalSerializer.mm +++ b/Firestore/Source/Local/FSTLocalSerializer.mm @@ -67,7 +67,11 @@ - (FSTPBMaybeDocument *)encodedMaybeDocument:(FSTMaybeDocument *)document { proto.hasCommittedMutations = deletedDocument.hasCommittedMutations; } else if ([document isKindOfClass:[FSTDocument class]]) { FSTDocument *existingDocument = (FSTDocument *)document; - proto.document = [self encodedDocument:existingDocument]; + if (existingDocument.proto != nil) { + proto.document = existingDocument.proto; + } else { + proto.document = [self encodedDocument:existingDocument]; + } proto.hasCommittedMutations = existingDocument.hasCommittedMutations; } else if ([document isKindOfClass:[FSTUnknownDocument class]]) { FSTUnknownDocument *unknownDocument = (FSTUnknownDocument *)document; diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index 4626a3a297a..7d04c080f4a 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -264,14 +264,24 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { } } - // TODO(klimt): This could probably be an NSMutableDictionary. - DocumentKeySet changedDocKeys; + MaybeDocumentMap changedDocs; const DocumentKeySet &limboDocuments = remoteEvent.limboDocumentChanges; + DocumentKeySet updatedKeys; + for (const auto &kv : remoteEvent.documentUpdates) { + updatedKeys = updatedKeys.insert(kv.first); + } + // Each loop iteration only affects its "own" doc, so it's safe to get all the remote + // documents in advance in a single call. + MaybeDocumentMap existingDocs = [self.remoteDocumentCache entriesForKeys:updatedKeys]; + for (const auto &kv : remoteEvent.documentUpdates) { const DocumentKey &key = kv.first; FSTMaybeDocument *doc = kv.second; - changedDocKeys = changedDocKeys.insert(key); - FSTMaybeDocument *existingDoc = [self.remoteDocumentCache entryForKey:key]; + FSTMaybeDocument *existingDoc = nil; + auto foundExisting = existingDocs.find(key); + if (foundExisting != existingDocs.end()) { + existingDoc = foundExisting->second; + } // If a document update isn't authoritative, make sure we don't apply an old document version // to the remote cache. We make an exception for SnapshotVersion.MIN which can happen for @@ -280,6 +290,7 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { (authoritativeUpdates.contains(doc.key) && !existingDoc.hasPendingWrites) || doc.version >= existingDoc.version) { [self.remoteDocumentCache addEntry:doc]; + changedDocs = changedDocs.insert(key, doc); } else { LOG_DEBUG( "FSTLocalStore Ignoring outdated watch update for %s. " @@ -306,7 +317,7 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { [self.queryCache setLastRemoteSnapshotVersion:remoteVersion]; } - return [self.localDocuments documentsForKeys:changedDocKeys]; + return [self.localDocuments localViewsForDocuments:changedDocs]; }); } diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm index ae4912cef35..22373f8e8d8 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm @@ -68,6 +68,16 @@ - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)key { return found != _docs.end() ? found->second : nil; } +- (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { + MaybeDocumentMap results; + for (const DocumentKey &key : keys) { + // Make sure each key has a corresponding entry, which is null in case the document is not + // found. + results = results.insert(key, [self entryForKey:key]); + } + return results; +} + - (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { DocumentMap result; diff --git a/Firestore/Source/Local/FSTRemoteDocumentCache.h b/Firestore/Source/Local/FSTRemoteDocumentCache.h index 46fb5955a36..51a6cf1b72e 100644 --- a/Firestore/Source/Local/FSTRemoteDocumentCache.h +++ b/Firestore/Source/Local/FSTRemoteDocumentCache.h @@ -56,6 +56,16 @@ NS_ASSUME_NONNULL_BEGIN - (nullable FSTMaybeDocument *)entryForKey: (const firebase::firestore::model::DocumentKey &)documentKey; +/** + * Looks up a set of entries in the cache. + * + * @param documentKeys The keys of the entries to look up. + * @return The cached Document or NoDocument entries indexed by key. If an entry is not cached, + * the corresponding key will be mapped to a null value. + */ +- (firebase::firestore::model::MaybeDocumentMap)entriesForKeys: + (const firebase::firestore::model::DocumentKeySet &)documentKeys; + /** * Executes a query against the cached FSTDocument entries * diff --git a/Firestore/Source/Model/FSTDocument.h b/Firestore/Source/Model/FSTDocument.h index 6d9cc8681ba..add79dc9309 100644 --- a/Firestore/Source/Model/FSTDocument.h +++ b/Firestore/Source/Model/FSTDocument.h @@ -21,6 +21,7 @@ #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" @class FSTFieldValue; +@class GCFSDocument; @class FSTObjectValue; NS_ASSUME_NONNULL_BEGIN @@ -57,12 +58,24 @@ typedef NS_ENUM(NSInteger, FSTDocumentState) { version:(firebase::firestore::model::SnapshotVersion)version state:(FSTDocumentState)state; ++ (instancetype)documentWithData:(FSTObjectValue *)data + key:(firebase::firestore::model::DocumentKey)key + version:(firebase::firestore::model::SnapshotVersion)version + state:(FSTDocumentState)state + proto:(GCFSDocument *)proto; + - (nullable FSTFieldValue *)fieldForPath:(const firebase::firestore::model::FieldPath &)path; - (BOOL)hasLocalMutations; - (BOOL)hasCommittedMutations; @property(nonatomic, strong, readonly) FSTObjectValue *data; +/** + * Memoized serialized form of the document for optimization purposes (avoids repeated + * serialization). Might be nil. + */ +@property(nonatomic, strong, readonly) GCFSDocument *proto; + @end @interface FSTDeletedDocument : FSTMaybeDocument diff --git a/Firestore/Source/Model/FSTDocument.mm b/Firestore/Source/Model/FSTDocument.mm index 49ce4511693..aaa3964865b 100644 --- a/Firestore/Source/Model/FSTDocument.mm +++ b/Firestore/Source/Model/FSTDocument.mm @@ -88,6 +88,18 @@ + (instancetype)documentWithData:(FSTObjectValue *)data state:state]; } ++ (instancetype)documentWithData:(FSTObjectValue *)data + key:(DocumentKey)key + version:(SnapshotVersion)version + state:(FSTDocumentState)state + proto:(GCFSDocument *)proto { + return [[FSTDocument alloc] initWithData:data + key:std::move(key) + version:std::move(version) + state:state + proto:proto]; +} + - (instancetype)initWithData:(FSTObjectValue *)data key:(DocumentKey)key version:(SnapshotVersion)version @@ -96,6 +108,21 @@ - (instancetype)initWithData:(FSTObjectValue *)data if (self) { _data = data; _documentState = state; + _proto = nil; + } + return self; +} + +- (instancetype)initWithData:(FSTObjectValue *)data + key:(DocumentKey)key + version:(SnapshotVersion)version + state:(FSTDocumentState)state + proto:(GCFSDocument *)proto { + self = [super initWithKey:std::move(key) version:std::move(version)]; + if (self) { + _data = data; + _documentState = state; + _proto = proto; } return self; } diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 4657454b0df..a53dda775ec 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -438,7 +438,11 @@ - (FSTDocument *)decodedFoundDocument:(GCFSBatchGetDocumentsResponse *)response HARD_ASSERT(version != SnapshotVersion::None(), "Got a document response with no snapshot version"); - return [FSTDocument documentWithData:value key:key version:version state:FSTDocumentStateSynced]; + return [FSTDocument documentWithData:value + key:key + version:version + state:FSTDocumentStateSynced + proto:response.found]; } - (FSTDeletedDocument *)decodedDeletedDocument:(GCFSBatchGetDocumentsResponse *)response { @@ -1144,8 +1148,13 @@ - (FSTDocumentWatchChange *)decodedDocumentChange:(GCFSDocumentChange *)change { const DocumentKey key = [self decodedDocumentKey:change.document.name]; SnapshotVersion version = [self decodedVersion:change.document.updateTime]; HARD_ASSERT(version != SnapshotVersion::None(), "Got a document change with no snapshot version"); - FSTMaybeDocument *document = - [FSTDocument documentWithData:value key:key version:version state:FSTDocumentStateSynced]; + // The document may soon be re-serialized back to protos in order to store it in local + // persistence. Memoize the encoded form to avoid encoding it again. + FSTMaybeDocument *document = [FSTDocument documentWithData:value + key:key + version:version + state:FSTDocumentStateSynced + proto:change.document]; NSArray *updatedTargetIds = [self decodedIntegerArray:change.targetIdsArray]; NSArray *removedTargetIds = [self decodedIntegerArray:change.removedTargetIdsArray]; diff --git a/Firestore/core/src/firebase/firestore/remote/watch_stream.mm b/Firestore/core/src/firebase/firestore/remote/watch_stream.mm index 7635bba92db..9e8d3ba75cc 100644 --- a/Firestore/core/src/firebase/firestore/remote/watch_stream.mm +++ b/Firestore/core/src/firebase/firestore/remote/watch_stream.mm @@ -84,8 +84,10 @@ return status; } - LOG_DEBUG("%s response: %s", GetDebugDescription(), - serializer_bridge_.Describe(response)); + if (bridge::IsLoggingEnabled()) { + LOG_DEBUG("%s response: %s", GetDebugDescription(), + serializer_bridge_.Describe(response)); + } // A successful response means the stream is healthy. backoff_.Reset(); From 07c60c598d39c4661249d1eafeef1b2fc0e40909 Mon Sep 17 00:00:00 2001 From: Konstantin Varlamov Date: Wed, 12 Dec 2018 20:57:42 -0800 Subject: [PATCH 08/34] When searching for gRPC certificates, search the main bundle as well (#2183) When the project is manually configured, it's possible that the certificates file gets added to the main bundle, not the Firestore framework bundle; make sure the bundle can be loaded in that case as well. --- .../grpc_root_certificate_finder_apple.mm | 57 +++++++++++++------ 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_apple.mm b/Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_apple.mm index a54bc043c6a..42a3ac89ff6 100644 --- a/Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_apple.mm +++ b/Firestore/core/src/firebase/firestore/remote/grpc_root_certificate_finder_apple.mm @@ -34,28 +34,49 @@ using util::StatusOr; using util::StringFormat; -std::string LoadGrpcRootCertificate() { - // Try to load certificates bundled by gRPC-C++ if available (depends on - // gRPC-C++ version). - // Note that `mainBundle` may be nil in certain cases (e.g., unit tests). - NSBundle* bundle = [NSBundle bundleWithIdentifier:@"org.cocoapods.grpcpp"]; - NSString* path; - if (bundle) { - path = - [bundle pathForResource:@"gRPCCertificates.bundle/roots" ofType:@"pem"]; - } - if (path) { - LOG_DEBUG("Using roots.pem file from gRPC-C++ pod"); - } else { +NSString* FindPathToCertificatesFile() { + // Certificates file might be present in one of several bundles, based on + // the environment. + NSArray* bundles = @[ + // First, try to load certificates bundled by gRPC-C++ if available + // (pod versions 0.0.6+). + [NSBundle bundleWithIdentifier:@"org.cocoapods.grpcpp"], // Fall back to the certificates bundled with Firestore if necessary. - LOG_DEBUG("Using roots.pem file from Firestore pod"); + [NSBundle bundleForClass:FSTFirestoreClient.class], + // Finally, users manually adding resources to the project may add the + // certificate to the main application bundle. Note that `mainBundle` is nil + // for unit tests of library projects, so it cannot fully substitute for + // checking framework bundles. + [NSBundle mainBundle], + ]; + + for (NSBundle* bundle in bundles) { + if (!bundle) { + continue; + } + + NSString* resource = @"gRPCCertificates.bundle/roots"; + NSString* path = [bundle pathForResource:resource ofType:@"pem"]; + if (!path) { + resource = @"gRPCCertificates-Firestore.bundle/roots"; + path = [bundle pathForResource:resource ofType:@"pem"]; + } - bundle = [NSBundle bundleForClass:FSTFirestoreClient.class]; - HARD_ASSERT(bundle, "Could not find Firestore bundle"); - path = [bundle pathForResource:@"gRPCCertificates-Firestore.bundle/roots" - ofType:@"pem"]; + if (path) { + LOG_DEBUG("%s.pem found in bundle %s", resource, + [bundle bundleIdentifier]); + return path; + } else { + LOG_DEBUG("%s.pem not found in bundle %s", resource, + [bundle bundleIdentifier]); + } } + return nil; +} + +std::string LoadGrpcRootCertificate() { + NSString* path = FindPathToCertificatesFile(); HARD_ASSERT( path, "Could not load root certificates from the bundle. SSL cannot work."); From b7d459432a62cc279405b824889894c33f0edf6c Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 13 Dec 2018 08:27:30 -0800 Subject: [PATCH 09/34] Fix Rome instructions (#2184) --- Rome.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Rome.md b/Rome.md index 61ba99a8678..47bbba9f536 100644 --- a/Rome.md +++ b/Rome.md @@ -30,7 +30,14 @@ $ gem install cocoapods-rome ## Firebase Installation -1. Copy the [template Podfile](Rome/Podfile) to your project directory +Prefix a Podfile with the following: +``` +plugin 'cocoapods-rome', + dsym: false, + configuration: 'Release' +``` +Then do the following steps: + 1. Delete any Firebase pods that you don't need 1. Run `pod install` 1. With the Finder `open Rome` From 943141e0cd727211764ac871dead7c14ce38a5e7 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 13 Dec 2018 08:36:08 -0800 Subject: [PATCH 10/34] Use registerLibrary for pods in Firebase workspace (#2137) * Add versioning to Functions and convert to FIRLibrary * Convert Firestore to FIRLibrary * Point travis to FirebaseCore pre-release for its deps * Update user agent strings to match spec --- Example/Auth/Tests/FIRAuthTests.m | 4 +- Example/Core/Tests/FIRAppTest.m | 30 +++++++--- .../Core/Tests/FIRComponentContainerTest.m | 29 ++++++---- Example/Core/Tests/FIRTestComponents.h | 11 ++-- Example/Core/Tests/FIRTestComponents.m | 12 +++- Example/Database/Tests/Helpers/FIRFakeApp.m | 21 +++++++ .../Tests/Unit/FIRStorageComponentTests.m | 6 +- Firebase/Auth/Source/FIRAuth.m | 12 ++-- Firebase/Auth/Source/FirebaseAuthVersion.m | 3 +- .../Auth/Source/Public/FirebaseAuthVersion.h | 2 +- Firebase/Core/FIRApp.m | 58 ++++++++++++------- Firebase/Core/FIRComponentContainer.m | 47 +++------------ Firebase/Core/FIRComponentType.m | 2 +- Firebase/Core/Private/FIRAppInternal.h | 28 ++++----- Firebase/Core/Private/FIRComponentContainer.h | 5 +- .../Private/FIRComponentContainerInternal.h | 4 ++ Firebase/Core/Private/FIRCoreConfigurable.h | 38 ------------ ...{FIRComponentRegistrant.h => FIRLibrary.h} | 20 ++++--- Firebase/Database/Api/FIRDatabaseComponent.m | 8 ++- Firebase/DynamicLinks/FIRDynamicLinks.m | 11 ++-- Firebase/Messaging/FIRMessaging.m | 12 ++-- Firebase/Storage/FIRStorageComponent.m | 10 ++-- Firebase/Storage/FIRStorageConstants.m | 3 +- Firebase/Storage/Public/FIRStorage.h | 3 +- FirebaseFunctions.podspec | 3 +- Firestore/Source/API/FIRFirestoreVersion.h | 2 +- Firestore/Source/API/FIRFirestoreVersion.mm | 3 +- Firestore/Source/API/FSTFirestoreComponent.mm | 10 +++- .../firebase_credentials_provider_test.mm | 4 -- Functions/FirebaseFunctions/FIRFunctions.m | 14 ++++- scripts/pod_lib_lint.sh | 2 +- 31 files changed, 213 insertions(+), 204 deletions(-) delete mode 100644 Firebase/Core/Private/FIRCoreConfigurable.h rename Firebase/Core/Private/{FIRComponentRegistrant.h => FIRLibrary.h} (65%) diff --git a/Example/Auth/Tests/FIRAuthTests.m b/Example/Auth/Tests/FIRAuthTests.m index b3c6f1b979c..23518cd51ac 100644 --- a/Example/Auth/Tests/FIRAuthTests.m +++ b/Example/Auth/Tests/FIRAuthTests.m @@ -21,7 +21,7 @@ #import #import #import -#import +#import #import "FIRAdditionalUserInfo.h" #import "FIRAuth_Internal.h" @@ -225,7 +225,7 @@ static const NSTimeInterval kWaitInterval = .5; /** Category for FIRAuth to expose FIRComponentRegistrant conformance. */ -@interface FIRAuth () +@interface FIRAuth () @end /** @class FIRAuthTests diff --git a/Example/Core/Tests/FIRAppTest.m b/Example/Core/Tests/FIRAppTest.m index d913c34b2db..7f3ccb97241 100644 --- a/Example/Core/Tests/FIRAppTest.m +++ b/Example/Core/Tests/FIRAppTest.m @@ -13,6 +13,7 @@ // limitations under the License. #import "FIRTestCase.h" +#import "FIRTestComponents.h" #import #import @@ -714,25 +715,38 @@ - (void)testIsDefaultAppConfigured { XCTAssertFalse([FIRApp isDefaultAppConfigured]); } -- (void)testIllegalLibraryName { +- (void)testInvalidLibraryName { [FIRApp registerLibrary:@"Oops>" withVersion:@"1.0.0"]; XCTAssertTrue([[FIRApp firebaseUserAgent] isEqualToString:@""]); } -- (void)testIllegalLibraryVersion { - [FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0+"]; +- (void)testInvalidLibraryVersion { + [FIRApp registerLibrary:@"ValidName" withVersion:@"1.0.0+"]; XCTAssertTrue([[FIRApp firebaseUserAgent] isEqualToString:@""]); } - (void)testSingleLibrary { - [FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0"]; - XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"LegalName/1.0.0"]); + [FIRApp registerLibrary:@"ValidName" withVersion:@"1.0.0"]; + XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"ValidName/1.0.0"]); } - (void)testMultipleLibraries { - [FIRApp registerLibrary:@"LegalName" withVersion:@"1.0.0"]; - [FIRApp registerLibrary:@"LegalName2" withVersion:@"2.0.0"]; - XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"LegalName/1.0.0 LegalName2/2.0.0"]); + [FIRApp registerLibrary:@"ValidName" withVersion:@"1.0.0"]; + [FIRApp registerLibrary:@"ValidName2" withVersion:@"2.0.0"]; + XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"ValidName/1.0.0 ValidName2/2.0.0"]); +} + +- (void)testRegisteringConformingLibrary { + Class testClass = [FIRTestClass class]; + [FIRApp registerInternalLibrary:testClass withName:@"ValidName" withVersion:@"1.0.0"]; + XCTAssertTrue([[FIRApp firebaseUserAgent] containsString:@"ValidName/1.0.0"]); +} + +- (void)testRegisteringNonConformingLibrary { + XCTAssertThrows([FIRApp registerInternalLibrary:[NSString class] + withName:@"InvalidLibrary" + withVersion:@"1.0.0"]); + XCTAssertFalse([[FIRApp firebaseUserAgent] containsString:@"InvalidLibrary`/1.0.0"]); } #pragma mark - private diff --git a/Example/Core/Tests/FIRComponentContainerTest.m b/Example/Core/Tests/FIRComponentContainerTest.m index dced72bd415..ba0cf1579e0 100644 --- a/Example/Core/Tests/FIRComponentContainerTest.m +++ b/Example/Core/Tests/FIRComponentContainerTest.m @@ -26,9 +26,26 @@ @interface FIRComponentContainer (TestInternal) @property(nonatomic, strong) NSMutableDictionary *components; @property(nonatomic, strong) NSMutableDictionary *cachedInstances; -+ (void)registerAsComponentRegistrant:(Class)klass inSet:(NSMutableSet *)allRegistrants; - ++ (void)registerAsComponentRegistrant:(Class)klass + inSet:(NSMutableSet *)allRegistrants; - (instancetype)initWithApp:(FIRApp *)app registrants:(NSMutableSet *)allRegistrants; +@end + +@interface FIRComponentContainer (TestInternalImplementations) +- (instancetype)initWithApp:(FIRApp *)app + components:(NSDictionary *)components; +@end + +@implementation FIRComponentContainer (TestInternalImplementations) + +- (instancetype)initWithApp:(FIRApp *)app + components:(NSDictionary *)components { + self = [self initWithApp:app registrants:[[NSMutableSet alloc] init]]; + if (self) { + self.components = [components mutableCopy]; + } + return self; +} @end @@ -47,13 +64,6 @@ - (void)testRegisteringConformingClass { XCTAssertTrue([allRegistrants containsObject:testClass]); } -- (void)testRegisteringNonConformingClass { - NSMutableSet *allRegistrants = [NSMutableSet set]; - XCTAssertThrows( - [FIRComponentContainer registerAsComponentRegistrant:[NSString class] inSet:allRegistrants]); - XCTAssertTrue(allRegistrants.count == 0); -} - - (void)testComponentsPopulatedOnInit { FIRComponentContainer *container = [self containerWithRegistrants:@ [[FIRTestClass class]]]; @@ -149,7 +159,6 @@ - (FIRComponentContainer *)containerWithRegistrants:(NSArray *)registrant for (Class c in registrants) { [FIRComponentContainer registerAsComponentRegistrant:c inSet:allRegistrants]; } - return [[FIRComponentContainer alloc] initWithApp:appMock registrants:allRegistrants]; } diff --git a/Example/Core/Tests/FIRTestComponents.h b/Example/Core/Tests/FIRTestComponents.h index 63b2075f551..c04b42af791 100644 --- a/Example/Core/Tests/FIRTestComponents.h +++ b/Example/Core/Tests/FIRTestComponents.h @@ -16,7 +16,7 @@ #import #import -#import +#import @protocol FIRComponentRegistrant; @@ -28,13 +28,12 @@ @end /// A test class that is a component registrant. -@interface FIRTestClass - : NSObject +@interface FIRTestClass : NSObject @end /// A test class that is a component registrant, a duplicate of FIRTestClass. @interface FIRTestClassDuplicate - : NSObject + : NSObject @end #pragma mark - Eager Component @@ -47,7 +46,7 @@ /// A test class that is a component registrant that provides a component requiring eager /// instantiation, and is cached for easier validation that it was instantiated. @interface FIRTestClassEagerCached - : NSObject + : NSObject @end #pragma mark - Cached Component @@ -59,5 +58,5 @@ /// A test class that is a component registrant that provides a component that requests to be /// cached. @interface FIRTestClassCached - : NSObject + : NSObject @end diff --git a/Example/Core/Tests/FIRTestComponents.m b/Example/Core/Tests/FIRTestComponents.m index 68346f3b191..f68fa3082e7 100644 --- a/Example/Core/Tests/FIRTestComponents.m +++ b/Example/Core/Tests/FIRTestComponents.m @@ -47,7 +47,7 @@ @implementation FIRTestClassDuplicate - (void)doSomething { } -/// FIRComponentRegistrant conformance. +/// FIRLibrary conformance. + (nonnull NSArray *)componentsToRegister { FIRComponent *testComponent = [FIRComponent componentWithProtocol:@protocol(FIRTestProtocol) @@ -72,7 +72,7 @@ @implementation FIRTestClassEagerCached - (void)doSomethingFaster { } -/// FIRComponentRegistrant conformance. +/// FIRLibrary conformance. + (nonnull NSArray *)componentsToRegister { FIRComponent *testComponent = [FIRComponent componentWithProtocol:@protocol(FIRTestProtocolEagerCached) @@ -92,13 +92,16 @@ - (void)doSomethingFaster { - (void)appWillBeDeleted:(FIRApp *)app { } +- (void)doSomething { +} + @end #pragma mark - Cached Component @implementation FIRTestClassCached -/// FIRComponentRegistrant conformance. +/// FIRLibrary conformance. + (nonnull NSArray *)componentsToRegister { FIRComponent *testComponent = [FIRComponent componentWithProtocol:@protocol(FIRTestProtocolCached) @@ -115,4 +118,7 @@ @implementation FIRTestClassCached - (void)appWillBeDeleted:(FIRApp *)app { } +- (void)doSomething { +} + @end diff --git a/Example/Database/Tests/Helpers/FIRFakeApp.m b/Example/Database/Tests/Helpers/FIRFakeApp.m index 00758d53787..64348a46981 100644 --- a/Example/Database/Tests/Helpers/FIRFakeApp.m +++ b/Example/Database/Tests/Helpers/FIRFakeApp.m @@ -39,6 +39,27 @@ @interface FIRDatabaseComponent (Internal) - (instancetype)initWithApp:(FIRApp *)app; @end +@interface FIRComponentContainer (TestInternal) +@property(nonatomic, strong) NSMutableDictionary *components; +@end + +@interface FIRComponentContainer (TestInternalImplementations) +- (instancetype)initWithApp:(FIRApp *)app + components:(NSDictionary *)components; +@end + +@implementation FIRComponentContainer (TestInternalImplementations) + +- (instancetype)initWithApp:(FIRApp *)app + components:(NSDictionary *)components { + self = [self initWithApp:app registrants:[[NSMutableSet alloc] init]]; + if (self) { + self.components = [components mutableCopy]; + } + return self; +} +@end + @implementation FIRFakeApp - (instancetype)initWithName:(NSString *)name URL:(NSString *)url { diff --git a/Example/Storage/Tests/Unit/FIRStorageComponentTests.m b/Example/Storage/Tests/Unit/FIRStorageComponentTests.m index 8ca84273340..7ce4b72f790 100644 --- a/Example/Storage/Tests/Unit/FIRStorageComponentTests.m +++ b/Example/Storage/Tests/Unit/FIRStorageComponentTests.m @@ -19,15 +19,15 @@ #import #import -#import +#import #import #import "FIRComponentTestUtilities.h" #import "FIRStorageComponent.h" // Make FIRComponentRegistrant conformance visible to the tests and expose the initializer. -@interface FIRStorageComponent () -/// Internal intializer. +@interface FIRStorageComponent () +/// Internal initializer. - (instancetype)initWithApp:(FIRApp *)app; @end diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m index 0697026ed57..a210e8a8e5a 100644 --- a/Firebase/Auth/Source/FIRAuth.m +++ b/Firebase/Auth/Source/FIRAuth.m @@ -26,8 +26,7 @@ #import #import #import -#import -#import +#import #import #import #import @@ -228,9 +227,9 @@ + (FIRActionCodeOperation)actionCodeOperationForRequestType:(NSString *)requestT #pragma mark - FIRAuth #if TARGET_OS_IOS -@interface FIRAuth () +@interface FIRAuth () #else -@interface FIRAuth () +@interface FIRAuth () #endif /** @property firebaseAppId @@ -310,8 +309,9 @@ @implementation FIRAuth { } + (void)load { - [FIRComponentContainer registerAsComponentRegistrant:self]; - [FIRApp registerAsConfigurable:self]; + [FIRApp registerInternalLibrary:(Class)self + withName:@"fire-auth" + withVersion:[NSString stringWithUTF8String:FirebaseAuthVersionStr]]; } + (void)initialize { diff --git a/Firebase/Auth/Source/FirebaseAuthVersion.m b/Firebase/Auth/Source/FirebaseAuthVersion.m index c79d9840631..4893018276e 100644 --- a/Firebase/Auth/Source/FirebaseAuthVersion.m +++ b/Firebase/Auth/Source/FirebaseAuthVersion.m @@ -22,5 +22,4 @@ const double FirebaseAuthVersionNum = FIRAuth_MINOR_VERSION; -const unsigned char *const FirebaseAuthVersionStr = - (const unsigned char *const)STR(FIRAuth_VERSION); +const char *const FirebaseAuthVersionStr = (const char *const)STR(FIRAuth_VERSION); diff --git a/Firebase/Auth/Source/Public/FirebaseAuthVersion.h b/Firebase/Auth/Source/Public/FirebaseAuthVersion.h index 2999384d165..7b4b94e9084 100644 --- a/Firebase/Auth/Source/Public/FirebaseAuthVersion.h +++ b/Firebase/Auth/Source/Public/FirebaseAuthVersion.h @@ -24,4 +24,4 @@ extern const double FirebaseAuthVersionNum; /** Version string for FirebaseAuth. */ -extern const unsigned char *const FirebaseAuthVersionStr; +extern const char *const FirebaseAuthVersionStr; diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index 29570a89192..f4ccac995d5 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -14,15 +14,15 @@ #include -#import "FIRApp.h" -#import "FIRConfiguration.h" #import "Private/FIRAnalyticsConfiguration+Internal.h" #import "Private/FIRAppInternal.h" #import "Private/FIRBundleUtil.h" #import "Private/FIRComponentContainerInternal.h" -#import "Private/FIRCoreConfigurable.h" +#import "Private/FIRLibrary.h" #import "Private/FIRLogger.h" #import "Private/FIROptionsInternal.h" +#import "Public/FIRApp.h" +#import "Public/FIRConfiguration.h" NSString *const kFIRServiceAdMob = @"AdMob"; NSString *const kFIRServiceAuth = @"Auth"; @@ -81,7 +81,7 @@ * An array of all classes that registered as `FIRCoreConfigurable` in order to receive lifecycle * events from Core. */ -static NSMutableArray> *gRegisteredAsConfigurable; +static NSMutableArray> *sRegisteredAsConfigurable; @interface FIRApp () @@ -422,7 +422,7 @@ + (void)sendNotificationsToSDKs:(FIRApp *)app { // This is the new way of sending information to SDKs. // TODO: Do we want this on a background thread, maybe? - for (Class library in gRegisteredAsConfigurable) { + for (Class library in sRegisteredAsConfigurable) { [library configureWithApp:app]; } } @@ -462,41 +462,55 @@ + (NSError *)errorForInvalidAppID { userInfo:errorDict]; } -+ (void)registerAsConfigurable:(Class)klass { - // This is called at +load time, keep the work to a minimum. - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - gRegisteredAsConfigurable = [[NSMutableArray alloc] initWithCapacity:1]; - }); - - NSAssert([(Class)klass conformsToProtocol:@protocol(FIRCoreConfigurable)], - @"The class being registered (%@) must conform to `FIRCoreConfigurable`.", klass); - [gRegisteredAsConfigurable addObject:klass]; -} - + (BOOL)isDefaultAppConfigured { return (sDefaultApp != nil); } -+ (void)registerLibrary:(nonnull NSString *)library withVersion:(nonnull NSString *)version { ++ (void)registerLibrary:(nonnull NSString *)name withVersion:(nonnull NSString *)version { // Create the set of characters which aren't allowed, only if this feature is used. NSMutableCharacterSet *allowedSet = [NSMutableCharacterSet alphanumericCharacterSet]; [allowedSet addCharactersInString:@"-_."]; NSCharacterSet *disallowedSet = [allowedSet invertedSet]; // Make sure the library name and version strings do not contain unexpected characters, and // add the name/version pair to the dictionary. - if ([library rangeOfCharacterFromSet:disallowedSet].location == NSNotFound && + if ([name rangeOfCharacterFromSet:disallowedSet].location == NSNotFound && [version rangeOfCharacterFromSet:disallowedSet].location == NSNotFound) { if (!sLibraryVersions) { sLibraryVersions = [[NSMutableDictionary alloc] init]; } - sLibraryVersions[library] = version; + sLibraryVersions[name] = version; } else { FIRLogError(kFIRLoggerCore, @"I-COR000027", - @"The library name (%@) or version number (%@) contain illegal characters. " + @"The library name (%@) or version number (%@) contain invalid characters. " @"Only alphanumeric, dash, underscore and period characters are allowed.", - library, version); + name, version); + } +} + ++ (void)registerInternalLibrary:(nonnull Class)library + withName:(nonnull NSString *)name + withVersion:(nonnull NSString *)version { + // This is called at +load time, keep the work to a minimum. + + // Ensure the class given conforms to the proper protocol. + if (![(Class)library conformsToProtocol:@protocol(FIRLibrary)] || + ![(Class)library respondsToSelector:@selector(componentsToRegister)]) { + [NSException raise:NSInvalidArgumentException + format: + @"Class %@ attempted to register components, but it does not conform to " + @"`FIRLibrary or provide a `componentsToRegister:` method.", + library]; + } + + [FIRComponentContainer registerAsComponentRegistrant:library]; + if ([(Class)library respondsToSelector:@selector(configureWithApp:)]) { + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + sRegisteredAsConfigurable = [[NSMutableArray alloc] init]; + }); + [sRegisteredAsConfigurable addObject:library]; } + [self registerLibrary:name withVersion:version]; } + (NSString *)firebaseUserAgent { diff --git a/Firebase/Core/FIRComponentContainer.m b/Firebase/Core/FIRComponentContainer.m index 381c95c4315..1977d0e3124 100644 --- a/Firebase/Core/FIRComponentContainer.m +++ b/Firebase/Core/FIRComponentContainer.m @@ -18,7 +18,7 @@ #import "Private/FIRAppInternal.h" #import "Private/FIRComponent.h" -#import "Private/FIRComponentRegistrant.h" +#import "Private/FIRLibrary.h" #import "Private/FIRLogger.h" NS_ASSUME_NONNULL_BEGIN @@ -37,44 +37,28 @@ @interface FIRComponentContainer () @implementation FIRComponentContainer // Collection of all classes that register to provide components. -static NSMutableSet *gFIRComponentRegistrants; +static NSMutableSet *sFIRComponentRegistrants; #pragma mark - Public Registration -+ (void)registerAsComponentRegistrant:(Class)klass { ++ (void)registerAsComponentRegistrant:(Class)klass { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - gFIRComponentRegistrants = [[NSMutableSet alloc] init]; + sFIRComponentRegistrants = [[NSMutableSet alloc] init]; }); - [self registerAsComponentRegistrant:klass inSet:gFIRComponentRegistrants]; + [self registerAsComponentRegistrant:klass inSet:sFIRComponentRegistrants]; } -+ (void)registerAsComponentRegistrant:(Class)klass inSet:(NSMutableSet *)allRegistrants { - // Validate the array to store the components is initialized. - if (!allRegistrants) { - FIRLogWarning(kFIRLoggerCore, @"I-COR000025", - @"Attempted to store registered components in an empty set."); - return; - } - - // Ensure the class given conforms to the proper protocol. - if (![klass conformsToProtocol:@protocol(FIRComponentRegistrant)] || - ![klass respondsToSelector:@selector(componentsToRegister)]) { - [NSException raise:NSInvalidArgumentException - format: - @"Class %@ attempted to register components, but it does not conform to " - @"`FIRComponentRegistrant` or provide a `componentsToRegister:` method.", - klass]; - } - ++ (void)registerAsComponentRegistrant:(Class)klass + inSet:(NSMutableSet *)allRegistrants { [allRegistrants addObject:klass]; } #pragma mark - Internal Initialization - (instancetype)initWithApp:(FIRApp *)app { - return [self initWithApp:app registrants:gFIRComponentRegistrants]; + return [self initWithApp:app registrants:sFIRComponentRegistrants]; } - (instancetype)initWithApp:(FIRApp *)app registrants:(NSMutableSet *)allRegistrants { @@ -91,7 +75,7 @@ - (instancetype)initWithApp:(FIRApp *)app registrants:(NSMutableSet *)all - (void)populateComponentsFromRegisteredClasses:(NSSet *)classes forApp:(FIRApp *)app { // Loop through the verified component registrants and populate the components array. - for (Class klass in classes) { + for (Class klass in classes) { // Loop through all the components being registered and store them as appropriate. // Classes which do not provide functionality should use a dummy FIRComponentRegistrant // protocol. @@ -187,19 +171,6 @@ - (void)removeAllCachedInstances { [self.cachedInstances removeAllObjects]; } -#pragma mark - Testing Initializers - -// TODO(wilsonryan): Set up a testing flag so this only is compiled in with unit tests. -/// Initialize an instance with an app and existing components. -- (instancetype)initWithApp:(FIRApp *)app - components:(NSDictionary *)components { - self = [self initWithApp:app registrants:[[NSMutableSet alloc] init]]; - if (self) { - _components = [components mutableCopy]; - } - return self; -} - @end NS_ASSUME_NONNULL_END diff --git a/Firebase/Core/FIRComponentType.m b/Firebase/Core/FIRComponentType.m index bdc004fbce5..e29ede22707 100644 --- a/Firebase/Core/FIRComponentType.m +++ b/Firebase/Core/FIRComponentType.m @@ -16,7 +16,7 @@ #import "Private/FIRComponentType.h" -#import "Private/FIRComponentContainerInternal.h" +#import "FIRComponentContainerInternal.h" @implementation FIRComponentType diff --git a/Firebase/Core/Private/FIRAppInternal.h b/Firebase/Core/Private/FIRAppInternal.h index 67cb33bc4c0..d663d3ec8b1 100644 --- a/Firebase/Core/Private/FIRAppInternal.h +++ b/Firebase/Core/Private/FIRAppInternal.h @@ -18,7 +18,7 @@ #import "FIRErrors.h" @class FIRComponentContainer; -@protocol FIRCoreConfigurable; +@protocol FIRLibrary; /** * The internal interface to FIRApp. This is meant for first-party integrators, who need to receive @@ -135,23 +135,25 @@ extern NSString *const FIRAuthStateDidChangeInternalNotificationUIDKey; + (BOOL)isDefaultAppConfigured; /** - * Register a class that conforms to `FIRCoreConfigurable`. Each SDK should have one class that - * registers in order to provide critical information for interoperability and lifecycle events. - * TODO(wilsonryan): Write more documentation. + * Registers a given third-party library with the given version number to be reported for + * analytics. + * + * @param name Name of the library. + * @param version Version of the library. */ -+ (void)registerAsConfigurable:(Class)klass; ++ (void)registerLibrary:(nonnull NSString *)name withVersion:(nonnull NSString *)version; /** - * Registers a given third-party library with the given version number to be reported for - * analyitcs. + * Registers a given internal library with the given version number to be reported for + * analytics. * - * @param library Name of the library - * @param version Version of the library + * @param library Optional parameter for component registration. + * @param name Name of the library. + * @param version Version of the library. */ -// clang-format off -+ (void)registerLibrary:(NSString *)library - withVersion:(NSString *)version NS_SWIFT_NAME(registerLibrary(_:version:)); -// clang-format on ++ (void)registerInternalLibrary:(nonnull Class)library + withName:(nonnull NSString *)name + withVersion:(nonnull NSString *)version; /** * A concatenated string representing all the third-party libraries and version numbers. diff --git a/Firebase/Core/Private/FIRComponentContainer.h b/Firebase/Core/Private/FIRComponentContainer.h index 10e2255389d..f3dc356d6cc 100644 --- a/Firebase/Core/Private/FIRComponentContainer.h +++ b/Firebase/Core/Private/FIRComponentContainer.h @@ -16,6 +16,7 @@ #import #import "FIRComponentType.h" +#import "FIRLibrary.h" NS_ASSUME_NONNULL_BEGIN @@ -38,10 +39,6 @@ NS_SWIFT_NAME(FirebaseComponentContainer) /// Unavailable. Use the `container` property on `FIRApp`. - (instancetype)init NS_UNAVAILABLE; -/// Register a class to provide components for the interoperability system. The class should conform -/// to `FIRComponentRegistrant` and provide an array of `FIRComponent` objects. -+ (void)registerAsComponentRegistrant:(Class)klass; - @end NS_ASSUME_NONNULL_END diff --git a/Firebase/Core/Private/FIRComponentContainerInternal.h b/Firebase/Core/Private/FIRComponentContainerInternal.h index bb73e7bab5d..e8552fa251a 100644 --- a/Firebase/Core/Private/FIRComponentContainerInternal.h +++ b/Firebase/Core/Private/FIRComponentContainerInternal.h @@ -34,6 +34,10 @@ NS_ASSUME_NONNULL_BEGIN /// Remove all of the cached instances stored and allow them to clean up after themselves. - (void)removeAllCachedInstances; +/// Register a class to provide components for the interoperability system. The class should conform +/// to `FIRComponentRegistrant` and provide an array of `FIRComponent` objects. ++ (void)registerAsComponentRegistrant:(Class)klass; + @end NS_ASSUME_NONNULL_END diff --git a/Firebase/Core/Private/FIRCoreConfigurable.h b/Firebase/Core/Private/FIRCoreConfigurable.h deleted file mode 100644 index 6c2b0775176..00000000000 --- a/Firebase/Core/Private/FIRCoreConfigurable.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef FIRCoreConfigurable_h -#define FIRCoreConfigurable_h - -#import - -@class FIRApp; - -NS_ASSUME_NONNULL_BEGIN - -/// Provides an interface to set up an SDK once a `FIRApp` is configured. -NS_SWIFT_NAME(CoreConfigurable) -@protocol FIRCoreConfigurable - -/// Configure the SDK if needed ahead of time. This method is called when the developer calls -/// `FirebaseApp.configure()`. -+ (void)configureWithApp:(FIRApp *)app; - -@end - -NS_ASSUME_NONNULL_END - -#endif /* FIRCoreConfigurable_h */ diff --git a/Firebase/Core/Private/FIRComponentRegistrant.h b/Firebase/Core/Private/FIRLibrary.h similarity index 65% rename from Firebase/Core/Private/FIRComponentRegistrant.h rename to Firebase/Core/Private/FIRLibrary.h index ad2cad21469..728c062323b 100644 --- a/Firebase/Core/Private/FIRComponentRegistrant.h +++ b/Firebase/Core/Private/FIRLibrary.h @@ -14,25 +14,31 @@ * limitations under the License. */ -#ifndef FIRComponentRegistrant_h -#define FIRComponentRegistrant_h +#ifndef FIRLibrary_h +#define FIRLibrary_h #import +#import "FIRComponent.h" -@class FIRComponent; +@class FIRApp; NS_ASSUME_NONNULL_BEGIN -/// Describes functionality for SDKs registering components in the `FIRComponentContainer`. -NS_SWIFT_NAME(ComponentRegistrant) -@protocol FIRComponentRegistrant +/// Provide an interface to register a library for userAgent logging and availability to others. +NS_SWIFT_NAME(Library) +@protocol FIRLibrary /// Returns one or more FIRComponents that will be registered in /// FIRApp and participate in dependency resolution and injection. + (NSArray *)componentsToRegister; +@optional +/// Implement this method if the library needs notifications for lifecycle events. This method is +/// called when the developer calls `FirebaseApp.configure()`. ++ (void)configureWithApp:(FIRApp *)app; + @end NS_ASSUME_NONNULL_END -#endif /* FIRComponentRegistrant_h */ +#endif /* FIRLibrary_h */ diff --git a/Firebase/Database/Api/FIRDatabaseComponent.m b/Firebase/Database/Api/FIRDatabaseComponent.m index eee0b337610..5662f2814af 100644 --- a/Firebase/Database/Api/FIRDatabaseComponent.m +++ b/Firebase/Database/Api/FIRDatabaseComponent.m @@ -24,8 +24,8 @@ #import #import #import -#import #import +#import #import NS_ASSUME_NONNULL_BEGIN @@ -33,7 +33,7 @@ /** A NSMutableDictionary of FirebaseApp name and FRepoInfo to FirebaseDatabase instance. */ typedef NSMutableDictionary FIRDatabaseDictionary; -@interface FIRDatabaseComponent () +@interface FIRDatabaseComponent () @property (nonatomic) FIRDatabaseDictionary *instances; /// Internal intializer. - (instancetype)initWithApp:(FIRApp *)app; @@ -55,7 +55,9 @@ - (instancetype)initWithApp:(FIRApp *)app { #pragma mark - Lifecycle + (void)load { - [FIRComponentContainer registerAsComponentRegistrant:self]; + [FIRApp registerInternalLibrary:(Class)self + withName:@"fire-db" + withVersion:[FIRDatabase sdkVersion]]; } #pragma mark - FIRComponentRegistrant diff --git a/Firebase/DynamicLinks/FIRDynamicLinks.m b/Firebase/DynamicLinks/FIRDynamicLinks.m index 06e65070b42..681c461a5d0 100644 --- a/Firebase/DynamicLinks/FIRDynamicLinks.m +++ b/Firebase/DynamicLinks/FIRDynamicLinks.m @@ -23,9 +23,8 @@ #import #import #import -#import -#import #import +#import #import #import "DynamicLinks/FIRDLScionLogging.h" #endif @@ -96,9 +95,8 @@ @interface FIRDynamicLinks () { @protocol FIRDynamicLinksInstanceProvider @end -@interface FIRDynamicLinks () +@interface FIRDynamicLinks () + @end #endif @@ -117,8 +115,7 @@ @implementation FIRDynamicLinks { #ifdef FIRDynamicLinks3P + (void)load { - [FIRApp registerAsConfigurable:self]; - [FIRComponentContainer registerAsComponentRegistrant:self]; + [FIRApp registerInternalLibrary:self withName:@"fire-dl" withVersion:kFIRDLVersion]; } + (nonnull NSArray *)componentsToRegister { diff --git a/Firebase/Messaging/FIRMessaging.m b/Firebase/Messaging/FIRMessaging.m index eb6f71b1b7d..7aa439191ed 100644 --- a/Firebase/Messaging/FIRMessaging.m +++ b/Firebase/Messaging/FIRMessaging.m @@ -43,9 +43,8 @@ #import #import #import -#import -#import #import +#import #import #import @@ -158,9 +157,7 @@ @interface FIRMessaging () +@interface FIRMessaging () @end @implementation FIRMessaging @@ -215,8 +212,9 @@ - (void)dealloc { #pragma mark - Config + (void)load { - [FIRApp registerAsConfigurable:self]; - [FIRComponentContainer registerAsComponentRegistrant:self]; + [FIRApp registerInternalLibrary:(Class)self + withName:@"fire-fcm" + withVersion:FIRMessagingCurrentLibraryVersion()]; } + (nonnull NSArray *)componentsToRegister { diff --git a/Firebase/Storage/FIRStorageComponent.m b/Firebase/Storage/FIRStorageComponent.m index 01d7cc2db46..8e9770e5bde 100644 --- a/Firebase/Storage/FIRStorageComponent.m +++ b/Firebase/Storage/FIRStorageComponent.m @@ -20,8 +20,8 @@ #import #import #import -#import #import +#import NS_ASSUME_NONNULL_BEGIN @@ -32,8 +32,8 @@ - (instancetype)initWithApp:(FIRApp *)app auth:(nullable id)auth; @end -@interface FIRStorageComponent () -/// Internal intializer. +@interface FIRStorageComponent () +/// Internal initializer. - (instancetype)initWithApp:(FIRApp *)app; @end @@ -52,7 +52,9 @@ - (instancetype)initWithApp:(FIRApp *)app { #pragma mark - Lifecycle + (void)load { - [FIRComponentContainer registerAsComponentRegistrant:self]; + [FIRApp registerInternalLibrary:(Class)self + withName:@"fire-str" + withVersion:[NSString stringWithUTF8String:FIRStorageVersionString]]; } #pragma mark - FIRComponentRegistrant diff --git a/Firebase/Storage/FIRStorageConstants.m b/Firebase/Storage/FIRStorageConstants.m index 31368072941..5dfd5a27723 100644 --- a/Firebase/Storage/FIRStorageConstants.m +++ b/Firebase/Storage/FIRStorageConstants.m @@ -82,5 +82,4 @@ // with a -D to be treated as a string instead of an invalid floating point value. #define STR(x) STR_EXPAND(x) #define STR_EXPAND(x) #x -const unsigned char *const FIRStorageVersionString = - (const unsigned char *const)STR(FIRStorage_VERSION); +const char *const FIRStorageVersionString = (const char *const)STR(FIRStorage_VERSION); diff --git a/Firebase/Storage/Public/FIRStorage.h b/Firebase/Storage/Public/FIRStorage.h index baa8122d77b..479bed8809d 100644 --- a/Firebase/Storage/Public/FIRStorage.h +++ b/Firebase/Storage/Public/FIRStorage.h @@ -24,8 +24,7 @@ NS_ASSUME_NONNULL_BEGIN /** Project version string for FirebaseStorage. */ -FOUNDATION_EXPORT const unsigned char *const FIRStorageVersionString - NS_SWIFT_NAME(StorageVersionString); +FOUNDATION_EXPORT const char *const FIRStorageVersionString NS_SWIFT_NAME(StorageVersionString); /** * FirebaseStorage is a service that supports uploading and downloading binary objects, diff --git a/FirebaseFunctions.podspec b/FirebaseFunctions.podspec index 00c43ee0fd4..5c85eaf71d5 100644 --- a/FirebaseFunctions.podspec +++ b/FirebaseFunctions.podspec @@ -29,6 +29,7 @@ iOS SDK for Cloud Functions for Firebase. s.dependency 'GTMSessionFetcher/Core', '~> 1.1' s.pod_target_xcconfig = { - 'GCC_C_LANGUAGE_STANDARD' => 'c99' + 'GCC_C_LANGUAGE_STANDARD' => 'c99', + 'GCC_PREPROCESSOR_DEFINITIONS' => 'FIRFunctions_VERSION=' + s.version.to_s } end diff --git a/Firestore/Source/API/FIRFirestoreVersion.h b/Firestore/Source/API/FIRFirestoreVersion.h index aaf79766f47..ca1a16614de 100644 --- a/Firestore/Source/API/FIRFirestoreVersion.h +++ b/Firestore/Source/API/FIRFirestoreVersion.h @@ -19,4 +19,4 @@ #import /** Version string for the Firebase Firestore SDK. */ -FOUNDATION_EXPORT const unsigned char *const FIRFirestoreVersionString; +FOUNDATION_EXPORT const char *const FIRFirestoreVersionString; diff --git a/Firestore/Source/API/FIRFirestoreVersion.mm b/Firestore/Source/API/FIRFirestoreVersion.mm index 3e72724877e..94d91035e4f 100644 --- a/Firestore/Source/API/FIRFirestoreVersion.mm +++ b/Firestore/Source/API/FIRFirestoreVersion.mm @@ -22,5 +22,4 @@ // Because `kFirestoreVersionString` is subject to constant initialization, this // is not affected by static initialization order fiasco. -extern "C" const unsigned char *const FIRFirestoreVersionString = - (const unsigned char *const)kFirestoreVersionString; +extern "C" const char *const FIRFirestoreVersionString = kFirestoreVersionString; diff --git a/Firestore/Source/API/FSTFirestoreComponent.mm b/Firestore/Source/API/FSTFirestoreComponent.mm index 61c3c4c2800..875347b46a3 100644 --- a/Firestore/Source/API/FSTFirestoreComponent.mm +++ b/Firestore/Source/API/FSTFirestoreComponent.mm @@ -20,8 +20,8 @@ #import #import #import -#import #import +#import #import #include @@ -30,6 +30,7 @@ #import "Firestore/Source/API/FIRFirestore+Internal.h" #import "Firestore/Source/Util/FSTUsageValidation.h" +#include "Firestore/core/include/firebase/firestore/firestore_version.h" #include "Firestore/core/src/firebase/firestore/auth/credentials_provider.h" #include "Firestore/core/src/firebase/firestore/auth/firebase_credentials_provider_apple.h" #include "Firestore/core/src/firebase/firestore/util/async_queue.h" @@ -45,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface FSTFirestoreComponent () +@interface FSTFirestoreComponent () @end @implementation FSTFirestoreComponent @@ -117,7 +118,10 @@ - (void)appWillBeDeleted:(FIRApp *)app { #pragma mark - Object Lifecycle + (void)load { - [FIRComponentContainer registerAsComponentRegistrant:self]; + [FIRApp registerInternalLibrary:(Class)self + withName:@"fire-fst" + withVersion:[NSString stringWithUTF8String:firebase::firestore:: + kFirestoreVersionString]]; } #pragma mark - Interoperability diff --git a/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm b/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm index f965a021161..6df629b8629 100644 --- a/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm +++ b/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm @@ -18,10 +18,6 @@ #import #import -#import -#import -#import -#import #include // NOLINT(build/c++11) #include // NOLINT(build/c++11) diff --git a/Functions/FirebaseFunctions/FIRFunctions.m b/Functions/FirebaseFunctions/FIRFunctions.m index 44206964f49..9342db52e93 100644 --- a/Functions/FirebaseFunctions/FIRFunctions.m +++ b/Functions/FirebaseFunctions/FIRFunctions.m @@ -18,8 +18,8 @@ #import #import #import -#import #import +#import #import "FIRError.h" #import "FIRHTTPSCallable+Internal.h" @@ -34,6 +34,13 @@ #import "FIROptions.h" #import "GTMSessionFetcherService.h" +// The following two macros supply the incantation so that the C +// preprocessor does not try to parse the version as a floating +// point number. See +// https://www.guyrutenberg.com/2008/12/20/expanding-macros-into-string-constants-in-c/ +#define STR(x) STR_EXPAND(x) +#define STR_EXPAND(x) #x + NS_ASSUME_NONNULL_BEGIN NSString *const kFUNInstanceIDTokenHeader = @"Firebase-Instance-ID-Token"; @@ -43,7 +50,7 @@ @protocol FIRFunctionsInstanceProvider @end -@interface FIRFunctions () { +@interface FIRFunctions () { // The network client to use for http requests. GTMSessionFetcherService *_fetcherService; // The projectID to use for all function references. @@ -68,7 +75,8 @@ - (instancetype)initWithProjectID:(NSString *)projectID @implementation FIRFunctions + (void)load { - [FIRComponentContainer registerAsComponentRegistrant:self]; + NSString *version = [NSString stringWithUTF8String:(const char *const)STR(FIRFunctions_VERSION)]; + [FIRApp registerInternalLibrary:(Class)self withName:@"fire-fun" withVersion:version]; } + (NSArray *)componentsToRegister { diff --git a/scripts/pod_lib_lint.sh b/scripts/pod_lib_lint.sh index 70539664226..1be094f53ea 100755 --- a/scripts/pod_lib_lint.sh +++ b/scripts/pod_lib_lint.sh @@ -37,7 +37,7 @@ fi # or Core APIs change. GoogleUtilities.podspec and FirebaseCore.podspec should be # manually pushed to a temporary Specs repo. See # https://guides.cocoapods.org/making/private-cocoapods. -#ALT_SOURCES="--sources=https://github.com/paulb777/Specs.git,https://github.com/CocoaPods/Specs.git" +ALT_SOURCES="--sources=https://github.com/paulb777/Specs.git,https://github.com/CocoaPods/Specs.git" podspec="$1" if [[ $# -gt 1 ]]; then From 8def2aa36680c7e8342a41bc8ba655b36f6c8795 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Thu, 13 Dec 2018 09:12:22 -0800 Subject: [PATCH 11/34] Port Memory remote document cache to C++ (#2176) * Port Memory remote document cache to C++ --- .../Local/FSTMemoryRemoteDocumentCache.h | 1 + .../Local/FSTMemoryRemoteDocumentCache.mm | 84 ++---------- .../local/memory_remote_document_cache.h | 70 ++++++++++ .../local/memory_remote_document_cache.mm | 125 ++++++++++++++++++ 4 files changed, 206 insertions(+), 74 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h create mode 100644 Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h index 453fcce7845..1f0884fe33a 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h @@ -20,6 +20,7 @@ #import "Firestore/Source/Local/FSTRemoteDocumentCache.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm index 22373f8e8d8..4f4070141aa 100644 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm @@ -22,9 +22,11 @@ #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Source/Model/FSTDocument.h" +#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" +using firebase::firestore::local::MemoryRemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::ListenSequenceNumber; @@ -33,104 +35,38 @@ NS_ASSUME_NONNULL_BEGIN -/** - * Returns an estimate of the number of bytes used to store the given - * document key in memory. This is only an estimate and includes the size - * of the segments of the path, but not any object overhead or path separators. - */ -static size_t FSTDocumentKeyByteSize(const DocumentKey &key) { - size_t count = 0; - for (const auto &segment : key.path()) { - count += segment.size(); - } - return count; -} - -@interface FSTMemoryRemoteDocumentCache () - -@end - @implementation FSTMemoryRemoteDocumentCache { - /** Underlying cache of documents. */ - MaybeDocumentMap _docs; + MemoryRemoteDocumentCache _cache; } - (void)addEntry:(FSTMaybeDocument *)document { - _docs = _docs.insert(document.key, document); + _cache.AddEntry(document); } - (void)removeEntryForKey:(const DocumentKey &)key { - _docs = _docs.erase(key); + _cache.RemoveEntry(key); } - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)key { - auto found = _docs.find(key); - return found != _docs.end() ? found->second : nil; + return _cache.Get(key); } - (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { - MaybeDocumentMap results; - for (const DocumentKey &key : keys) { - // Make sure each key has a corresponding entry, which is null in case the document is not - // found. - results = results.insert(key, [self entryForKey:key]); - } - return results; + return _cache.GetAll(keys); } - (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { - DocumentMap result; - - // Documents are ordered by key, so we can use a prefix scan to narrow down the documents - // we need to match the query against. - DocumentKey prefix{query.path.Append("")}; - for (auto it = _docs.lower_bound(prefix); it != _docs.end(); ++it) { - const DocumentKey &key = it->first; - if (!query.path.IsPrefixOf(key.path())) { - break; - } - FSTMaybeDocument *maybeDoc = nil; - auto found = _docs.find(key); - if (found != _docs.end()) { - maybeDoc = found->second; - } - if (![maybeDoc isKindOfClass:[FSTDocument class]]) { - continue; - } - FSTDocument *doc = static_cast(maybeDoc); - if ([query matchesDocument:doc]) { - result = result.insert(key, doc); - } - } - - return result; + return _cache.GetMatchingDocuments(query); } - (std::vector)removeOrphanedDocuments: (FSTMemoryLRUReferenceDelegate *)referenceDelegate throughSequenceNumber:(ListenSequenceNumber)upperBound { - std::vector removed; - MaybeDocumentMap updatedDocs = _docs; - for (const auto &kv : _docs) { - const DocumentKey &docKey = kv.first; - if (![referenceDelegate isPinnedAtSequenceNumber:upperBound document:docKey]) { - updatedDocs = updatedDocs.erase(docKey); - removed.push_back(docKey); - } - } - _docs = updatedDocs; - return removed; + return _cache.RemoveOrphanedDocuments(referenceDelegate, upperBound); } - (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer { - size_t count = 0; - for (const auto &kv : _docs) { - const DocumentKey &key = kv.first; - FSTMaybeDocument *doc = kv.second; - count += FSTDocumentKeyByteSize(key); - count += [[serializer encodedMaybeDocument:doc] serializedSize]; - } - return count; + return _cache.CalculateByteSize(serializer); } @end diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h new file mode 100644 index 00000000000..4c23ef54103 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h @@ -0,0 +1,70 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_REMOTE_DOCUMENT_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_REMOTE_DOCUMENT_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#import + +#include + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" + +@class FSTLocalSerializer; +@class FSTMaybeDocument; +@class FSTMemoryLRUReferenceDelegate; +@class FSTQuery; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +class MemoryRemoteDocumentCache { + public: + void AddEntry(FSTMaybeDocument *document); + void RemoveEntry(const model::DocumentKey &key); + + FSTMaybeDocument *_Nullable Get(const model::DocumentKey &key); + model::MaybeDocumentMap GetAll(const model::DocumentKeySet &keys); + model::DocumentMap GetMatchingDocuments(FSTQuery *query); + + std::vector RemoveOrphanedDocuments( + FSTMemoryLRUReferenceDelegate *reference_delegate, + model::ListenSequenceNumber upper_bound); + + size_t CalculateByteSize(FSTLocalSerializer *serializer); + + private: + /** Underlying cache of documents. */ + model::MaybeDocumentMap docs_; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_REMOTE_DOCUMENT_CACHE_H_ diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm new file mode 100644 index 00000000000..b7535309e83 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm @@ -0,0 +1,125 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" + +#import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" +#import "Firestore/Source/Core/FSTQuery.h" +#import "Firestore/Source/Local/FSTMemoryPersistence.h" + +using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::ListenSequenceNumber; +using firebase::firestore::model::MaybeDocumentMap; + +namespace firebase { +namespace firestore { +namespace local { + +namespace { +/** + * Returns an estimate of the number of bytes used to store the given + * document key in memory. This is only an estimate and includes the size + * of the segments of the path, but not any object overhead or path separators. + */ +size_t DocumentKeyByteSize(const DocumentKey &key) { + size_t count = 0; + for (const auto &segment : key.path()) { + count += segment.size(); + } + return count; +} +} // namespace + +void MemoryRemoteDocumentCache::AddEntry(FSTMaybeDocument *document) { + docs_ = docs_.insert(document.key, document); +} + +void MemoryRemoteDocumentCache::RemoveEntry(const DocumentKey &key) { + docs_ = docs_.erase(key); +} + +FSTMaybeDocument *_Nullable MemoryRemoteDocumentCache::Get( + const DocumentKey &key) { + auto found = docs_.find(key); + return found != docs_.end() ? found->second : nil; +} + +MaybeDocumentMap MemoryRemoteDocumentCache::GetAll(const DocumentKeySet &keys) { + MaybeDocumentMap results; + for (const DocumentKey &key : keys) { + // Make sure each key has a corresponding entry, which is null in case the + // document is not found. + // TODO(http://b/32275378): Don't conflate missing / deleted. + results = results.insert(key, Get(key)); + } + return results; +} + +DocumentMap MemoryRemoteDocumentCache::GetMatchingDocuments(FSTQuery *query) { + DocumentMap results; + + // Documents are ordered by key, so we can use a prefix scan to narrow down + // the documents we need to match the query against. + DocumentKey prefix{query.path.Append("")}; + for (auto it = docs_.lower_bound(prefix); it != docs_.end(); ++it) { + const DocumentKey &key = it->first; + if (!query.path.IsPrefixOf(key.path())) { + break; + } + FSTMaybeDocument *maybeDoc = it->second; + if (![maybeDoc isKindOfClass:[FSTDocument class]]) { + continue; + } + FSTDocument *doc = static_cast(maybeDoc); + if ([query matchesDocument:doc]) { + results = results.insert(key, doc); + } + } + return results; +} + +std::vector MemoryRemoteDocumentCache::RemoveOrphanedDocuments( + FSTMemoryLRUReferenceDelegate *reference_delegate, + ListenSequenceNumber upper_bound) { + std::vector removed; + MaybeDocumentMap updated_docs = docs_; + for (const auto &kv : docs_) { + const DocumentKey &key = kv.first; + if (![reference_delegate isPinnedAtSequenceNumber:upper_bound + document:key]) { + updated_docs = updated_docs.erase(key); + removed.push_back(key); + } + } + docs_ = updated_docs; + return removed; +} + +size_t MemoryRemoteDocumentCache::CalculateByteSize( + FSTLocalSerializer *serializer) { + size_t count = 0; + for (const auto &kv : docs_) { + count += DocumentKeyByteSize(kv.first); + count += [[serializer encodedMaybeDocument:kv.second] serializedSize]; + } + return count; +} + +} // namespace local +} // namespace firestore +} // namespace firebase \ No newline at end of file From f963bfba2c8b7722657ff6cc40ba1ff8996141bf Mon Sep 17 00:00:00 2001 From: alexpg Date: Thu, 13 Dec 2018 13:54:38 -0800 Subject: [PATCH 12/34] Minor tweaks to release note (#2182) * Minor tweaks * Update CHANGELOG.md * Update CHANGELOG.md --- Firestore/CHANGELOG.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index 8ef61c3d2a6..66e36c19529 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -2,10 +2,11 @@ # v0.16.1 - [fixed] Offline persistence now properly records schema downgrades. This is a - forward-looking change that allows versions past this one to safely downgrade - to this version. Downgrading to versions prior this one can be safe depending - on the source version. For example, downgrading from v0.16.1 to v0.15.0 is - safe because there have been no schema changes between these releases. + forward-looking change that allows all subsequent versions to safely downgrade + to this version. Some other versions might be safe to downgrade to, if you can + determine there haven't been any schema migrations between them. For example, + downgrading from v0.16.1 to v0.15.0 is safe because there have been no schema + changes between these releases. - [fixed] Fixed an issue where gRPC would crash if shut down multiple times (#2146). From 2bce70d0a391db31aa2b80bc32409cb9040a77e0 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Fri, 14 Dec 2018 15:33:32 -0800 Subject: [PATCH 13/34] Port leveldb remote document cache to C++ (#2186) * Port leveldb remote document cache --- .../Local/FSTLevelDBRemoteDocumentCache.mm | 92 ++---------- .../local/leveldb_remote_document_cache.h | 69 +++++++++ .../local/leveldb_remote_document_cache.mm | 138 ++++++++++++++++++ .../local/memory_remote_document_cache.h | 2 - 4 files changed, 217 insertions(+), 84 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h create mode 100644 Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm index 66f223e75f2..f4a4a3bdbf7 100644 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm +++ b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm @@ -26,14 +26,17 @@ #import "Firestore/Source/Model/FSTDocumentSet.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" +#include "absl/memory/memory.h" #include "leveldb/db.h" #include "leveldb/write_batch.h" NS_ASSUME_NONNULL_BEGIN +using firebase::firestore::local::LevelDbRemoteDocumentCache; using firebase::firestore::local::LevelDbRemoteDocumentKey; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::model::DocumentKey; @@ -43,110 +46,35 @@ using leveldb::DB; using leveldb::Status; -@interface FSTLevelDBRemoteDocumentCache () - -@property(nonatomic, strong, readonly) FSTLocalSerializer *serializer; - -@end - @implementation FSTLevelDBRemoteDocumentCache { - FSTLevelDB *_db; + std::unique_ptr _cache; } - (instancetype)initWithDB:(FSTLevelDB *)db serializer:(FSTLocalSerializer *)serializer { if (self = [super init]) { - _db = db; - _serializer = serializer; + _cache = absl::make_unique(db, serializer); } return self; } - (void)addEntry:(FSTMaybeDocument *)document { - std::string key = [self remoteDocumentKey:document.key]; - _db.currentTransaction->Put(key, [self.serializer encodedMaybeDocument:document]); + _cache->AddEntry(document); } - (void)removeEntryForKey:(const DocumentKey &)documentKey { - std::string key = [self remoteDocumentKey:documentKey]; - _db.currentTransaction->Delete(key); + _cache->RemoveEntry(documentKey); } - (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)documentKey { - std::string key = LevelDbRemoteDocumentKey::Key(documentKey); - std::string value; - Status status = _db.currentTransaction->Get(key, &value); - if (status.IsNotFound()) { - return nil; - } else if (status.ok()) { - return [self decodeMaybeDocument:value withKey:documentKey]; - } else { - HARD_FAIL("Fetch document for key (%s) failed with status: %s", documentKey.ToString(), - status.ToString()); - } + return _cache->Get(documentKey); } - (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { - MaybeDocumentMap results; - - LevelDbRemoteDocumentKey currentKey; - auto it = _db.currentTransaction->NewIterator(); - - for (const DocumentKey &key : keys) { - it->Seek([self remoteDocumentKey:key]); - if (!it->Valid() || !currentKey.Decode(it->key()) || currentKey.document_key() != key) { - results = results.insert(key, nil); - } else { - results = results.insert(key, [self decodeMaybeDocument:it->value() withKey:key]); - } - } - - return results; + return _cache->GetAll(keys); } - (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { - DocumentMap results; - - // Documents are ordered by key, so we can use a prefix scan to narrow down - // the documents we need to match the query against. - std::string startKey = LevelDbRemoteDocumentKey::KeyPrefix(query.path); - auto it = _db.currentTransaction->NewIterator(); - it->Seek(startKey); - - LevelDbRemoteDocumentKey currentKey; - for (; it->Valid() && currentKey.Decode(it->key()); it->Next()) { - FSTMaybeDocument *maybeDoc = - [self decodeMaybeDocument:it->value() withKey:currentKey.document_key()]; - if (!query.path.IsPrefixOf(maybeDoc.key.path())) { - break; - } else if ([maybeDoc isKindOfClass:[FSTDocument class]]) { - results = results.insert(maybeDoc.key, static_cast(maybeDoc)); - } - } - - return results; -} - -- (std::string)remoteDocumentKey:(const DocumentKey &)key { - return LevelDbRemoteDocumentKey::Key(key); -} - -- (FSTMaybeDocument *)decodeMaybeDocument:(absl::string_view)encoded - withKey:(const DocumentKey &)documentKey { - NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)encoded.data() - length:encoded.size() - freeWhenDone:NO]; - - NSError *error; - FSTPBMaybeDocument *proto = [FSTPBMaybeDocument parseFromData:data error:&error]; - if (!proto) { - HARD_FAIL("FSTPBMaybeDocument failed to parse: %s", error); - } - - FSTMaybeDocument *maybeDocument = [self.serializer decodedMaybeDocument:proto]; - HARD_ASSERT(maybeDocument.key == documentKey, - "Read document has key (%s) instead of expected key (%s).", - maybeDocument.key.ToString(), documentKey.ToString()); - return maybeDocument; + return _cache->GetMatchingDocuments(query); } @end diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h new file mode 100644 index 00000000000..b4ba9e3d17a --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h @@ -0,0 +1,69 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_REMOTE_DOCUMENT_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_REMOTE_DOCUMENT_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#include + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" +#include "absl/strings/string_view.h" + +@class FSTLevelDB; +@class FSTLocalSerializer; +@class FSTMaybeDocument; +@class FSTQuery; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +/** Cached Remote Documents backed by leveldb. */ +class LevelDbRemoteDocumentCache { + public: + LevelDbRemoteDocumentCache(FSTLevelDB* db, FSTLocalSerializer* serializer); + + void AddEntry(FSTMaybeDocument* document); + void RemoveEntry(const model::DocumentKey& key); + + FSTMaybeDocument* _Nullable Get(const model::DocumentKey& key); + model::MaybeDocumentMap GetAll(const model::DocumentKeySet& keys); + model::DocumentMap GetMatchingDocuments(FSTQuery* query); + + private: + FSTMaybeDocument* DecodeMaybeDocument(absl::string_view encoded, + const model::DocumentKey& key); + + FSTLevelDB* db_; + FSTLocalSerializer* serializer_; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_REMOTE_DOCUMENT_CACHE_H_ diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm new file mode 100644 index 00000000000..341ce12fb09 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm @@ -0,0 +1,138 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" + +#import + +#include + +#import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" +#import "Firestore/Source/Core/FSTQuery.h" +#import "Firestore/Source/Local/FSTLevelDB.h" +#import "Firestore/Source/Local/FSTLocalSerializer.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" +#include "Firestore/core/src/firebase/firestore/util/status.h" +#include "leveldb/db.h" + +using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::DocumentMap; +using firebase::firestore::model::MaybeDocumentMap; +using leveldb::Status; + +namespace firebase { +namespace firestore { +namespace local { + +LevelDbRemoteDocumentCache::LevelDbRemoteDocumentCache( + FSTLevelDB* db, FSTLocalSerializer* serializer) + : db_(db), serializer_(serializer) { +} + +void LevelDbRemoteDocumentCache::AddEntry(FSTMaybeDocument* document) { + std::string ldb_key = LevelDbRemoteDocumentKey::Key(document.key); + db_.currentTransaction->Put(ldb_key, + [serializer_ encodedMaybeDocument:document]); +} + +void LevelDbRemoteDocumentCache::RemoveEntry(const DocumentKey& key) { + std::string ldb_key = LevelDbRemoteDocumentKey::Key(key); + db_.currentTransaction->Delete(ldb_key); +} + +FSTMaybeDocument* _Nullable LevelDbRemoteDocumentCache::Get( + const DocumentKey& key) { + std::string ldb_key = LevelDbRemoteDocumentKey::Key(key); + std::string value; + Status status = db_.currentTransaction->Get(ldb_key, &value); + if (status.IsNotFound()) { + return nil; + } else if (status.ok()) { + return DecodeMaybeDocument(value, key); + } else { + HARD_FAIL("Fetch document for key (%s) failed with status: %s", + key.ToString(), status.ToString()); + } +} + +MaybeDocumentMap LevelDbRemoteDocumentCache::GetAll( + const DocumentKeySet& keys) { + MaybeDocumentMap results; + + LevelDbRemoteDocumentKey currentKey; + auto it = db_.currentTransaction->NewIterator(); + + for (const DocumentKey& key : keys) { + it->Seek(LevelDbRemoteDocumentKey::Key(key)); + if (!it->Valid() || !currentKey.Decode(it->key()) || + currentKey.document_key() != key) { + results = results.insert(key, nil); + } else { + results = results.insert(key, DecodeMaybeDocument(it->value(), key)); + } + } + + return results; +} + +DocumentMap LevelDbRemoteDocumentCache::GetMatchingDocuments(FSTQuery* query) { + DocumentMap results; + + // Documents are ordered by key, so we can use a prefix scan to narrow down + // the documents we need to match the query against. + std::string startKey = LevelDbRemoteDocumentKey::KeyPrefix(query.path); + auto it = db_.currentTransaction->NewIterator(); + it->Seek(startKey); + + LevelDbRemoteDocumentKey currentKey; + for (; it->Valid() && currentKey.Decode(it->key()); it->Next()) { + FSTMaybeDocument* maybeDoc = + DecodeMaybeDocument(it->value(), currentKey.document_key()); + if (!query.path.IsPrefixOf(maybeDoc.key.path())) { + break; + } else if ([maybeDoc isKindOfClass:[FSTDocument class]]) { + results = + results.insert(maybeDoc.key, static_cast(maybeDoc)); + } + } + + return results; +} + +FSTMaybeDocument* LevelDbRemoteDocumentCache::DecodeMaybeDocument( + absl::string_view encoded, const DocumentKey& key) { + NSData* data = [[NSData alloc] initWithBytesNoCopy:(void*)encoded.data() + length:encoded.size() + freeWhenDone:NO]; + + NSError* error; + FSTPBMaybeDocument* proto = + [FSTPBMaybeDocument parseFromData:data error:&error]; + if (!proto) { + HARD_FAIL("FSTPBMaybeDocument failed to parse: %s", error); + } + + FSTMaybeDocument* maybeDocument = [serializer_ decodedMaybeDocument:proto]; + HARD_ASSERT(maybeDocument.key == key, + "Read document has key (%s) instead of expected key (%s).", + maybeDocument.key.ToString(), key.ToString()); + return maybeDocument; +} + +} // namespace local +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h index 4c23ef54103..09538a0f4fa 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h @@ -21,8 +21,6 @@ #error "For now, this file must only be included by ObjC source files." #endif // !defined(__OBJC__) -#import - #include #include "Firestore/core/src/firebase/firestore/model/document_key.h" From 598bc55d29c341ec4d4201bb4af9292fbb56b7ea Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Fri, 14 Dec 2018 15:49:15 -0800 Subject: [PATCH 14/34] Remove start from persistence interface (#2173) * Remove start from persistence interface, switch FSTLevelDB to use a factory method that returns Status --- .../Tests/Local/FSTPersistenceTestHelpers.mm | 30 ++------- Firestore/Source/Core/FSTFirestoreClient.mm | 28 ++++---- Firestore/Source/Local/FSTLevelDB.h | 25 +++---- Firestore/Source/Local/FSTLevelDB.mm | 66 +++++++++++-------- .../Source/Local/FSTMemoryPersistence.mm | 8 +-- Firestore/Source/Local/FSTPersistence.h | 7 -- 6 files changed, 71 insertions(+), 93 deletions(-) diff --git a/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm b/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm index 74059c33d61..dcbef0d9427 100644 --- a/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm +++ b/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm @@ -68,15 +68,14 @@ + (FSTLevelDB *)levelDBPersistenceWithDir:(Path)dir { + (FSTLevelDB *)levelDBPersistenceWithDir:(Path)dir lruParams:(LruParams)params { FSTLocalSerializer *serializer = [self localSerializer]; - FSTLevelDB *db = - [[FSTLevelDB alloc] initWithDirectory:std::move(dir) serializer:serializer lruParams:params]; - Status status = [db start]; + FSTLevelDB *ldb; + util::Status status = + [FSTLevelDB dbWithDirectory:std::move(dir) serializer:serializer lruParams:params ptr:&ldb]; if (!status.ok()) { [NSException raise:NSInternalInconsistencyException - format:@"Failed to start leveldb persistence: %s", status.ToString().c_str()]; + format:@"Failed to open DB: %s", status.ToString().c_str()]; } - - return db; + return ldb; } + (FSTLevelDB *)levelDBPersistenceWithLruParams:(LruParams)lruParams { @@ -88,14 +87,7 @@ + (FSTLevelDB *)levelDBPersistence { } + (FSTMemoryPersistence *)eagerGCMemoryPersistence { - FSTMemoryPersistence *persistence = [FSTMemoryPersistence persistenceWithEagerGC]; - Status status = [persistence start]; - if (!status.ok()) { - [NSException raise:NSInternalInconsistencyException - format:@"Failed to start memory persistence: %s", status.ToString().c_str()]; - } - - return persistence; + return [FSTMemoryPersistence persistenceWithEagerGC]; } + (FSTMemoryPersistence *)lruMemoryPersistence { @@ -104,15 +96,7 @@ + (FSTMemoryPersistence *)lruMemoryPersistence { + (FSTMemoryPersistence *)lruMemoryPersistenceWithLruParams:(LruParams)lruParams { FSTLocalSerializer *serializer = [self localSerializer]; - FSTMemoryPersistence *persistence = - [FSTMemoryPersistence persistenceWithLruParams:lruParams serializer:serializer]; - Status status = [persistence start]; - if (!status.ok()) { - [NSException raise:NSInternalInconsistencyException - format:@"Failed to start memory persistence: %s", status.ToString().c_str()]; - } - - return persistence; + return [FSTMemoryPersistence persistenceWithLruParams:lruParams serializer:serializer]; } @end diff --git a/Firestore/Source/Core/FSTFirestoreClient.mm b/Firestore/Source/Core/FSTFirestoreClient.mm index acb16e3644c..d0acd44514c 100644 --- a/Firestore/Source/Core/FSTFirestoreClient.mm +++ b/Firestore/Source/Core/FSTFirestoreClient.mm @@ -199,10 +199,20 @@ - (void)initializeWithUser:(const User &)user settings:(FIRFirestoreSettings *)s [[FSTSerializerBeta alloc] initWithDatabaseID:&self.databaseInfo->database_id()]; FSTLocalSerializer *serializer = [[FSTLocalSerializer alloc] initWithRemoteSerializer:remoteSerializer]; - FSTLevelDB *ldb = - [[FSTLevelDB alloc] initWithDirectory:std::move(dir) - serializer:serializer - lruParams:LruParams::WithCacheSize(settings.cacheSizeBytes)]; + FSTLevelDB *ldb; + Status levelDbStatus = + [FSTLevelDB dbWithDirectory:std::move(dir) + serializer:serializer + lruParams:LruParams::WithCacheSize(settings.cacheSizeBytes) + ptr:&ldb]; + if (!levelDbStatus.ok()) { + // If leveldb fails to start then just throw up our hands: the error is unrecoverable. + // There's nothing an end-user can do and nearly all failures indicate the developer is doing + // something grossly wrong so we should stop them cold in their tracks with a failure they + // can't ignore. + [NSException raise:NSInternalInconsistencyException + format:@"Failed to open DB: %s", levelDbStatus.ToString().c_str()]; + } _lruDelegate = ldb.referenceDelegate; _persistence = ldb; [self scheduleLruGarbageCollection]; @@ -210,16 +220,6 @@ - (void)initializeWithUser:(const User &)user settings:(FIRFirestoreSettings *)s _persistence = [FSTMemoryPersistence persistenceWithEagerGC]; } - Status status = [_persistence start]; - if (!status.ok()) { - // If local storage fails to start then just throw up our hands: the error is unrecoverable. - // There's nothing an end-user can do and nearly all failures indicate the developer is doing - // something grossly wrong so we should stop them cold in their tracks with a failure they - // can't ignore. - [NSException raise:NSInternalInconsistencyException - format:@"Failed to open DB: %s", status.ToString().c_str()]; - } - _localStore = [[FSTLocalStore alloc] initWithPersistence:_persistence initialUser:user]; FSTDatastore *datastore = [FSTDatastore datastoreWithDatabase:self.databaseInfo diff --git a/Firestore/Source/Local/FSTLevelDB.h b/Firestore/Source/Local/FSTLevelDB.h index 3128587a463..b629d4861f1 100644 --- a/Firestore/Source/Local/FSTLevelDB.h +++ b/Firestore/Source/Local/FSTLevelDB.h @@ -26,6 +26,7 @@ #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/util/path.h" #include "Firestore/core/src/firebase/firestore/util/status.h" +#include "Firestore/core/src/firebase/firestore/util/statusor.h" #include "leveldb/db.h" @class FSTLocalSerializer; @@ -40,13 +41,16 @@ NS_ASSUME_NONNULL_BEGIN @interface FSTLevelDB : NSObject /** - * Initializes the LevelDB in the given directory. Note that all expensive startup work including - * opening any database files is deferred until -[FSTPersistence start] is called. + * Creates a LevelDB in the given directory and sets `ptr` to point to it. Return value indicates + * success in creating the leveldb instance and must be checked before accessing `ptr`. C++ note: + * Once FSTLevelDB is ported to C++, this factory method should return StatusOr<>. It cannot + * currently do that because ObjC references are not allowed in StatusOr. */ -- (instancetype)initWithDirectory:(firebase::firestore::util::Path)directory - serializer:(FSTLocalSerializer *)serializer - lruParams:(firebase::firestore::local::LruParams)lruParams - NS_DESIGNATED_INITIALIZER; ++ (firebase::firestore::util::Status)dbWithDirectory:(firebase::firestore::util::Path)directory + serializer:(FSTLocalSerializer *)serializer + lruParams: + (firebase::firestore::local::LruParams)lruParams + ptr:(FSTLevelDB **)ptr; - (instancetype)init NS_UNAVAILABLE; @@ -65,15 +69,6 @@ NS_ASSUME_NONNULL_BEGIN storageDirectoryForDatabaseInfo:(const firebase::firestore::core::DatabaseInfo &)databaseInfo documentsDirectory:(const firebase::firestore::util::Path &)documentsDirectory; -/** - * Starts LevelDB-backed persistent storage by opening the database files, creating the DB if it - * does not exist. - * - * The leveldb directory is created relative to the appropriate document storage directory for the - * platform: NSDocumentDirectory on iOS or $HOME/.firestore on macOS. - */ -- (firebase::firestore::util::Status)start; - /** * @return A standard set of read options */ diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index 3087d244b49..116bb65b903 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -299,16 +299,50 @@ + (const ReadOptions)standardReadOptions { return users; } -- (instancetype)initWithDirectory:(firebase::firestore::util::Path)directory - serializer:(FSTLocalSerializer *)serializer - lruParams:(firebase::firestore::local::LruParams)lruParams { ++ (firebase::firestore::util::Status)dbWithDirectory:(firebase::firestore::util::Path)directory + serializer:(FSTLocalSerializer *)serializer + lruParams: + (firebase::firestore::local::LruParams)lruParams + ptr:(FSTLevelDB **)ptr { + Status status = [self ensureDirectory:directory]; + if (!status.ok()) return status; + + StatusOr> database = [self createDBWithDirectory:directory]; + if (!database.status().ok()) { + return database.status(); + } + + std::unique_ptr ldb = std::move(database.ValueOrDie()); + LevelDbMigrations::RunMigrations(ldb.get()); + LevelDbTransaction transaction(ldb.get(), "Start LevelDB"); + std::set users = [self collectUserSet:&transaction]; + transaction.Commit(); + FSTLevelDB *db = [[self alloc] initWithLevelDB:std::move(ldb) + users:users + directory:directory + serializer:serializer + lruParams:lruParams]; + *ptr = db; + return Status::OK(); +} + +- (instancetype)initWithLevelDB:(std::unique_ptr)db + users:(std::set)users + directory:(firebase::firestore::util::Path)directory + serializer:(FSTLocalSerializer *)serializer + lruParams:(firebase::firestore::local::LruParams)lruParams { if (self = [super init]) { + self.started = YES; + _ptr = std::move(db); _directory = std::move(directory); _serializer = serializer; _queryCache = [[FSTLevelDBQueryCache alloc] initWithDB:self serializer:self.serializer]; _referenceDelegate = [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self lruParams:lruParams]; _transactionRunner.SetBackingPersistence(self); + _users = std::move(users); + [_queryCache start]; + [_referenceDelegate start]; } return self; } @@ -376,30 +410,8 @@ + (Path)storageDirectoryForDatabaseInfo:(const DatabaseInfo &)databaseInfo #pragma mark - Startup -- (Status)start { - HARD_ASSERT(!self.isStarted, "FSTLevelDB double-started!"); - self.started = YES; - - Status status = [self ensureDirectory:_directory]; - if (!status.ok()) return status; - - StatusOr> database = [self createDBWithDirectory:_directory]; - if (!database.status().ok()) { - return database.status(); - } - _ptr = std::move(database).ValueOrDie(); - - LevelDbMigrations::RunMigrations(_ptr.get()); - LevelDbTransaction transaction(_ptr.get(), "Start LevelDB"); - _users = [FSTLevelDB collectUserSet:&transaction]; - transaction.Commit(); - [_queryCache start]; - [_referenceDelegate start]; - return Status::OK(); -} - /** Creates the directory at @a directory and marks it as excluded from iCloud backup. */ -- (Status)ensureDirectory:(const Path &)directory { ++ (Status)ensureDirectory:(const Path &)directory { Status status = util::RecursivelyCreateDir(directory); if (!status.ok()) { return Status{FirestoreErrorCode::Internal, "Failed to create persistence directory"}.CausedBy( @@ -418,7 +430,7 @@ - (Status)ensureDirectory:(const Path &)directory { } /** Opens the database within the given directory. */ -- (StatusOr>)createDBWithDirectory:(const Path &)directory { ++ (StatusOr>)createDBWithDirectory:(const Path &)directory { Options options; options.create_if_missing = true; diff --git a/Firestore/Source/Local/FSTMemoryPersistence.mm b/Firestore/Source/Local/FSTMemoryPersistence.mm index e639ecc0de0..6aa8d6738e8 100644 --- a/Firestore/Source/Local/FSTMemoryPersistence.mm +++ b/Firestore/Source/Local/FSTMemoryPersistence.mm @@ -99,6 +99,7 @@ - (instancetype)init { if (self = [super init]) { _queryCache = [[FSTMemoryQueryCache alloc] initWithPersistence:self]; _remoteDocumentCache = [[FSTMemoryRemoteDocumentCache alloc] init]; + self.started = YES; } return self; } @@ -111,13 +112,6 @@ - (void)setReferenceDelegate:(id)referenceDelegate { } } -- (Status)start { - // No durable state to read on startup. - HARD_ASSERT(!self.isStarted, "FSTMemoryPersistence double-started!"); - self.started = YES; - return Status::OK(); -} - - (void)shutdown { // No durable state to ensure is closed on shutdown. HARD_ASSERT(self.isStarted, "FSTMemoryPersistence shutdown without start!"); diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index 4141d375dfc..4b106af5080 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -65,13 +65,6 @@ NS_ASSUME_NONNULL_BEGIN */ @protocol FSTPersistence -/** - * Starts persistent storage, opening the database or similar. - * - * @return A Status object that will be populated with an error message if startup fails. - */ -- (firebase::firestore::util::Status)start; - /** Releases any resources held during eager shutdown. */ - (void)shutdown; From 676c616ebb6885296d750c50a9b4c18af3ba6be5 Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Mon, 17 Dec 2018 10:53:46 -0500 Subject: [PATCH 15/34] Fix small typos in public documentation. (#2192) --- Firebase/Auth/Source/Public/FIRAuthTokenResult.h | 2 +- Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h | 2 +- Firebase/Database/Public/FIRDatabaseQuery.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Firebase/Auth/Source/Public/FIRAuthTokenResult.h b/Firebase/Auth/Source/Public/FIRAuthTokenResult.h index 82a5f1e0b1f..9e0028d7b70 100644 --- a/Firebase/Auth/Source/Public/FIRAuthTokenResult.h +++ b/Firebase/Auth/Source/Public/FIRAuthTokenResult.h @@ -49,7 +49,7 @@ NS_SWIFT_NAME(AuthTokenResult) /** @property signInProvider @brief Stores sign-in provider through which the token was obtained. - @remarks This does not necesssarily map to provider IDs. + @remarks This does not necessarily map to provider IDs. */ @property (nonatomic, readonly) NSString *signInProvider; diff --git a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h index 301939e16da..587d64ccedb 100644 --- a/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h +++ b/Firebase/Auth/Source/Public/FIRPhoneAuthProvider.h @@ -61,7 +61,7 @@ NS_SWIFT_NAME(PhoneAuthProvider) + (instancetype)providerWithAuth:(FIRAuth *)auth NS_SWIFT_NAME(provider(auth:)); /** @fn verifyPhoneNumber:UIDelegate:completion: - @brief Starts the phone number authentication flow by sending a verifcation code to the + @brief Starts the phone number authentication flow by sending a verification code to the specified phone number. @param phoneNumber The phone number to be verified. @param UIDelegate An object used to present the SFSafariViewController. The object is retained diff --git a/Firebase/Database/Public/FIRDatabaseQuery.h b/Firebase/Database/Public/FIRDatabaseQuery.h index ef5664386d5..fc6d27ea89f 100644 --- a/Firebase/Database/Public/FIRDatabaseQuery.h +++ b/Firebase/Database/Public/FIRDatabaseQuery.h @@ -22,8 +22,8 @@ NS_ASSUME_NONNULL_BEGIN /** * A FIRDatabaseHandle is used to identify listeners of Firebase Database events. These handles - * are returned by observeEventType: and and can later be passed to removeObserverWithHandle: to - * stop receiving updates. + * are returned by observeEventType: and can later be passed to removeObserverWithHandle: to stop + * receiving updates. */ typedef NSUInteger FIRDatabaseHandle NS_SWIFT_NAME(DatabaseHandle); From bc0329f48d5489874fe37c4f6319bab633147e4d Mon Sep 17 00:00:00 2001 From: Chen Liang Date: Mon, 17 Dec 2018 10:50:20 -0800 Subject: [PATCH 16/34] fix the unit test #1451 (#2187) --- ...FIRMessagingRemoteNotificationsProxyTest.m | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m b/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m index 6c7fcecc010..0e972798c12 100644 --- a/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m +++ b/Example/Messaging/Tests/FIRMessagingRemoteNotificationsProxyTest.m @@ -162,31 +162,23 @@ - (void)testSwizzlingAppDelegate { } - (void)testSwizzledIncompleteAppDelegateRemoteNotificationMethod { - IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc] init]; - [self.mockProxy swizzleAppDelegateMethods:incompleteAppDelegate]; -#ifdef BUG_1451 - SEL selector = @selector(application:didReceiveRemoteNotification:); - XCTAssertTrue([incompleteAppDelegate respondsToSelector:selector]); - [incompleteAppDelegate application:OCMClassMock([UIApplication class]) - didReceiveRemoteNotification:@{}]; - // Verify our swizzled method was called - OCMVerify(FCM_swizzle_appDidReceiveRemoteNotification); -#endif + IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc] init]; + [self.mockProxy swizzleAppDelegateMethods:incompleteAppDelegate]; + + [incompleteAppDelegate application:OCMClassMock([UIApplication class]) + didReceiveRemoteNotification:@{}]; + // Verify our swizzled method was called + OCMVerify(FCM_swizzle_appDidReceiveRemoteNotification); } -// If the remote notification with fetch handler is NOT implemented, we will force-implement -// the backup -application:didReceiveRemoteNotification: method - (void)testIncompleteAppDelegateRemoteNotificationWithFetchHandlerMethod { IncompleteAppDelegate *incompleteAppDelegate = [[IncompleteAppDelegate alloc] init]; [self.mockProxy swizzleAppDelegateMethods:incompleteAppDelegate]; SEL remoteNotificationWithFetchHandler = @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:); XCTAssertFalse([incompleteAppDelegate respondsToSelector:remoteNotificationWithFetchHandler]); - -#ifdef BUG_1451 SEL remoteNotification = @selector(application:didReceiveRemoteNotification:); XCTAssertTrue([incompleteAppDelegate respondsToSelector:remoteNotification]); -#endif } - (void)testSwizzledAppDelegateRemoteNotificationMethods { From e226001f9783c17224e008f8b975b89105668428 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Mon, 17 Dec 2018 13:24:49 -0800 Subject: [PATCH 17/34] Port FSTRemoteDocumentCacheTest to use C++ interface (#2194) --- .../FSTLevelDBRemoteDocumentCacheTests.mm | 13 ++- .../FSTMemoryRemoteDocumentCacheTests.mm | 19 +++- .../Tests/Local/FSTRemoteDocumentCacheTests.h | 4 +- .../Local/FSTRemoteDocumentCacheTests.mm | 43 ++++---- Firestore/Source/Local/FSTLevelDB.h | 2 + Firestore/Source/Local/FSTLevelDB.mm | 1 - .../local/leveldb_remote_document_cache.h | 13 ++- .../local/memory_remote_document_cache.h | 13 ++- .../firestore/local/remote_document_cache.h | 104 ++++++++++++++++++ 9 files changed, 173 insertions(+), 39 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/local/remote_document_cache.h diff --git a/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm index fc44a5a71b4..78e105c9dc7 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm @@ -14,18 +14,22 @@ * limitations under the License. */ +#include #include #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #import "Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h" #import "Firestore/Source/Local/FSTLevelDB.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/util/ordered_code.h" +#include "absl/memory/memory.h" #include "leveldb/db.h" NS_ASSUME_NONNULL_BEGIN using leveldb::WriteOptions; +using firebase::firestore::local::LevelDbRemoteDocumentCache; using firebase::firestore::util::OrderedCode; // A dummy document value, useful for testing code that's known to examine only document keys. @@ -41,13 +45,15 @@ @interface FSTLevelDBRemoteDocumentCacheTests : FSTRemoteDocumentCacheTests @implementation FSTLevelDBRemoteDocumentCacheTests { FSTLevelDB *_db; + std::unique_ptr _cache; } - (void)setUp { [super setUp]; _db = [FSTPersistenceTestHelpers levelDBPersistence]; self.persistence = _db; - self.remoteDocumentCache = [self.persistence remoteDocumentCache]; + HARD_ASSERT(!_cache, "Previous cache not torn down"); + _cache = absl::make_unique(_db, _db.serializer); // Write a couple dummy rows that should appear before/after the remote_documents table to make // sure the tests are unaffected. @@ -55,10 +61,15 @@ - (void)setUp { [self writeDummyRowWithSegments:@[ @"remote_documentsa", @"foo", @"bar" ]]; } +- (LevelDbRemoteDocumentCache *_Nullable)remoteDocumentCache { + return _cache.get(); +} + - (void)tearDown { [super tearDown]; self.remoteDocumentCache = nil; self.persistence = nil; + _cache.reset(); _db = nil; } diff --git a/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm index 3cbc3203496..c33ce4b63ee 100644 --- a/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm @@ -14,13 +14,17 @@ * limitations under the License. */ -#import "Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h" +#include #import "Firestore/Source/Local/FSTMemoryPersistence.h" +#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" +#include "absl/memory/memory.h" #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #import "Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h" +using firebase::firestore::local::MemoryRemoteDocumentCache; + @interface FSTMemoryRemoteDocumentCacheTests : FSTRemoteDocumentCacheTests @end @@ -29,18 +33,25 @@ @interface FSTMemoryRemoteDocumentCacheTests : FSTRemoteDocumentCacheTests * protocol in FSTRemoteDocumentCacheTests. This class is merely responsible for setting up and * tearing down the @a remoteDocumentCache. */ -@implementation FSTMemoryRemoteDocumentCacheTests +@implementation FSTMemoryRemoteDocumentCacheTests { + std::unique_ptr _cache; +} - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers eagerGCMemoryPersistence]; - self.remoteDocumentCache = [self.persistence remoteDocumentCache]; + HARD_ASSERT(!_cache, "Previous cache not torn down"); + _cache = absl::make_unique(); +} + +- (MemoryRemoteDocumentCache *)remoteDocumentCache { + return _cache.get(); } - (void)tearDown { + _cache.reset(); self.persistence = nil; - self.remoteDocumentCache = nil; [super tearDown]; } diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h index 29e7b86aa4f..71e0073f79a 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h @@ -18,6 +18,8 @@ #import +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" + @protocol FSTPersistence; NS_ASSUME_NONNULL_BEGIN @@ -32,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN * + override -tearDown, cleaning up remoteDocumentCache and persistence */ @interface FSTRemoteDocumentCacheTests : XCTestCase -@property(nonatomic, strong, nullable) id remoteDocumentCache; +@property(nonatomic, nullable) firebase::firestore::local::RemoteDocumentCache* remoteDocumentCache; @property(nonatomic, strong, nullable) id persistence; @end diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm index cd15d98b94f..e94224cdbdb 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm @@ -16,6 +16,8 @@ #import "Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h" +#include + #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Model/FSTDocument.h" @@ -23,6 +25,8 @@ #import "Firestore/Example/Tests/Util/FSTHelpers.h" +#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" @@ -32,6 +36,7 @@ namespace testutil = firebase::firestore::testutil; namespace util = firebase::firestore::util; +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::DocumentMap; @@ -62,7 +67,7 @@ - (void)testReadDocumentNotInCache { if (!self.remoteDocumentCache) return; self.persistence.run("testReadDocumentNotInCache", [&]() { - XCTAssertNil([self.remoteDocumentCache entryForKey:testutil::Key(kDocPath)]); + XCTAssertNil(self.remoteDocumentCache->Get(testutil::Key(kDocPath))); }); } @@ -70,7 +75,7 @@ - (void)testReadDocumentNotInCache { - (void)setAndReadADocumentAtPath:(const absl::string_view)path { self.persistence.run("setAndReadADocumentAtPath", [&]() { FSTDocument *written = [self setTestDocumentAtPath:path]; - FSTMaybeDocument *read = [self.remoteDocumentCache entryForKey:testutil::Key(path)]; + FSTMaybeDocument *read = self.remoteDocumentCache->Get(testutil::Key(path)); XCTAssertEqualObjects(read, written); }); } @@ -87,8 +92,8 @@ - (void)testSetAndReadSeveralDocuments { self.persistence.run("testSetAndReadSeveralDocuments", [=]() { NSArray *written = @[ [self setTestDocumentAtPath:kDocPath], [self setTestDocumentAtPath:kLongDocPath] ]; - MaybeDocumentMap read = [self.remoteDocumentCache - entriesForKeys:DocumentKeySet{testutil::Key(kDocPath), testutil::Key(kLongDocPath)}]; + MaybeDocumentMap read = self.remoteDocumentCache->GetAll( + DocumentKeySet{testutil::Key(kDocPath), testutil::Key(kLongDocPath)}); [self expectMap:read hasDocsInArray:written exactly:YES]; }); } @@ -99,12 +104,11 @@ - (void)testSetAndReadSeveralDocumentsIncludingMissingDocument { self.persistence.run("testSetAndReadSeveralDocumentsIncludingMissingDocument", [=]() { NSArray *written = @[ [self setTestDocumentAtPath:kDocPath], [self setTestDocumentAtPath:kLongDocPath] ]; - MaybeDocumentMap read = - [self.remoteDocumentCache entriesForKeys:DocumentKeySet{ - testutil::Key(kDocPath), - testutil::Key(kLongDocPath), - testutil::Key("foo/nonexistent"), - }]; + MaybeDocumentMap read = self.remoteDocumentCache->GetAll(DocumentKeySet{ + testutil::Key(kDocPath), + testutil::Key(kLongDocPath), + testutil::Key("foo/nonexistent"), + }); [self expectMap:read hasDocsInArray:written exactly:NO]; auto found = read.find(DocumentKey::FromPathString("foo/nonexistent")); XCTAssertTrue(found != read.end()); @@ -123,10 +127,9 @@ - (void)testSetAndReadDeletedDocument { self.persistence.run("testSetAndReadDeletedDocument", [&]() { FSTDeletedDocument *deletedDoc = FSTTestDeletedDoc(kDocPath, kVersion, NO); - [self.remoteDocumentCache addEntry:deletedDoc]; + self.remoteDocumentCache->AddEntry(deletedDoc); - XCTAssertEqualObjects([self.remoteDocumentCache entryForKey:testutil::Key(kDocPath)], - deletedDoc); + XCTAssertEqualObjects(self.remoteDocumentCache->Get(testutil::Key(kDocPath)), deletedDoc); }); } @@ -136,8 +139,8 @@ - (void)testSetDocumentToNewValue { self.persistence.run("testSetDocumentToNewValue", [&]() { [self setTestDocumentAtPath:kDocPath]; FSTDocument *newDoc = FSTTestDoc(kDocPath, kVersion, @{@"data" : @2}, FSTDocumentStateSynced); - [self.remoteDocumentCache addEntry:newDoc]; - XCTAssertEqualObjects([self.remoteDocumentCache entryForKey:testutil::Key(kDocPath)], newDoc); + self.remoteDocumentCache->AddEntry(newDoc); + XCTAssertEqualObjects(self.remoteDocumentCache->Get(testutil::Key(kDocPath)), newDoc); }); } @@ -146,9 +149,9 @@ - (void)testRemoveDocument { self.persistence.run("testRemoveDocument", [&]() { [self setTestDocumentAtPath:kDocPath]; - [self.remoteDocumentCache removeEntryForKey:testutil::Key(kDocPath)]; + self.remoteDocumentCache->RemoveEntry(testutil::Key(kDocPath)); - XCTAssertNil([self.remoteDocumentCache entryForKey:testutil::Key(kDocPath)]); + XCTAssertNil(self.remoteDocumentCache->Get(testutil::Key(kDocPath))); }); } @@ -157,7 +160,7 @@ - (void)testRemoveNonExistentDocument { self.persistence.run("testRemoveNonExistentDocument", [&]() { // no-op, but make sure it doesn't throw. - XCTAssertNoThrow([self.remoteDocumentCache removeEntryForKey:testutil::Key(kDocPath)]); + XCTAssertNoThrow(self.remoteDocumentCache->RemoveEntry(testutil::Key(kDocPath))); }); } @@ -174,7 +177,7 @@ - (void)testDocumentsMatchingQuery { [self setTestDocumentAtPath:"c/1"]; FSTQuery *query = FSTTestQuery("b"); - DocumentMap results = [self.remoteDocumentCache documentsMatchingQuery:query]; + DocumentMap results = self.remoteDocumentCache->GetMatchingDocuments(query); [self expectMap:results.underlying_map() hasDocsInArray:@[ FSTTestDoc("b/1", kVersion, _kDocData, FSTDocumentStateSynced), @@ -189,7 +192,7 @@ - (void)testDocumentsMatchingQuery { - (FSTDocument *)setTestDocumentAtPath:(const absl::string_view)path { FSTDocument *doc = FSTTestDoc(path, kVersion, _kDocData, FSTDocumentStateSynced); - [self.remoteDocumentCache addEntry:doc]; + self.remoteDocumentCache->AddEntry(doc); return doc; } diff --git a/Firestore/Source/Local/FSTLevelDB.h b/Firestore/Source/Local/FSTLevelDB.h index b629d4861f1..de78f724629 100644 --- a/Firestore/Source/Local/FSTLevelDB.h +++ b/Firestore/Source/Local/FSTLevelDB.h @@ -83,6 +83,8 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, readonly, strong) FSTLevelDBLRUDelegate *referenceDelegate; +@property(nonatomic, readonly, strong) FSTLocalSerializer *serializer; + @end NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index 116bb65b903..cce7d313b35 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -83,7 +83,6 @@ @interface FSTLevelDB () - (size_t)byteSize; @property(nonatomic, assign, getter=isStarted) BOOL started; -@property(nonatomic, strong, readonly) FSTLocalSerializer *serializer; @end diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h index b4ba9e3d17a..ef8a83f429c 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h @@ -23,6 +23,7 @@ #include +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" @@ -41,16 +42,16 @@ namespace firestore { namespace local { /** Cached Remote Documents backed by leveldb. */ -class LevelDbRemoteDocumentCache { +class LevelDbRemoteDocumentCache : public RemoteDocumentCache { public: LevelDbRemoteDocumentCache(FSTLevelDB* db, FSTLocalSerializer* serializer); - void AddEntry(FSTMaybeDocument* document); - void RemoveEntry(const model::DocumentKey& key); + void AddEntry(FSTMaybeDocument* document) override; + void RemoveEntry(const model::DocumentKey& key) override; - FSTMaybeDocument* _Nullable Get(const model::DocumentKey& key); - model::MaybeDocumentMap GetAll(const model::DocumentKeySet& keys); - model::DocumentMap GetMatchingDocuments(FSTQuery* query); + FSTMaybeDocument* _Nullable Get(const model::DocumentKey& key) override; + model::MaybeDocumentMap GetAll(const model::DocumentKeySet& keys) override; + model::DocumentMap GetMatchingDocuments(FSTQuery* query) override; private: FSTMaybeDocument* DecodeMaybeDocument(absl::string_view encoded, diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h index 09538a0f4fa..ed9175bbd93 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h @@ -23,6 +23,7 @@ #include +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" @@ -39,14 +40,14 @@ namespace firebase { namespace firestore { namespace local { -class MemoryRemoteDocumentCache { +class MemoryRemoteDocumentCache : public RemoteDocumentCache { public: - void AddEntry(FSTMaybeDocument *document); - void RemoveEntry(const model::DocumentKey &key); + void AddEntry(FSTMaybeDocument *document) override; + void RemoveEntry(const model::DocumentKey &key) override; - FSTMaybeDocument *_Nullable Get(const model::DocumentKey &key); - model::MaybeDocumentMap GetAll(const model::DocumentKeySet &keys); - model::DocumentMap GetMatchingDocuments(FSTQuery *query); + FSTMaybeDocument *_Nullable Get(const model::DocumentKey &key) override; + model::MaybeDocumentMap GetAll(const model::DocumentKeySet &keys) override; + model::DocumentMap GetMatchingDocuments(FSTQuery *query) override; std::vector RemoveOrphanedDocuments( FSTMemoryLRUReferenceDelegate *reference_delegate, diff --git a/Firestore/core/src/firebase/firestore/local/remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/remote_document_cache.h new file mode 100644 index 00000000000..b9721281a35 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/remote_document_cache.h @@ -0,0 +1,104 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REMOTE_DOCUMENT_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REMOTE_DOCUMENT_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#import + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/document_map.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" + +@class FSTMaybeDocument; +@class FSTQuery; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +/** + * Represents cached documents received from the remote backend. + * + * The cache is keyed by DocumentKey and entries in the cache are + * FSTMaybeDocument instances, meaning we can cache both FSTDocument instances + * (an actual document with data) as well as FSTDeletedDocument instances + * (indicating that the document is known to not exist). + */ +class RemoteDocumentCache { + public: + virtual ~RemoteDocumentCache() { + } + + /** + * Adds or replaces an entry in the cache. + * + * The cache key is extracted from `document.key`. If there is already a cache + * entry for the key, it will be replaced. + * + * @param document A FSTDocument or FSTDeletedDocument to put in the cache. + */ + virtual void AddEntry(FSTMaybeDocument* document) = 0; + + /** Removes the cached entry for the given key (no-op if no entry exists). */ + virtual void RemoveEntry(const model::DocumentKey& key) = 0; + + /** + * Looks up an entry in the cache. + * + * @param documentKey The key of the entry to look up. + * @return The cached FSTDocument or FSTDeletedDocument entry, or nil if we + * have nothing cached. + */ + virtual FSTMaybeDocument* _Nullable Get(const model::DocumentKey& key) = 0; + + /** + * Looks up a set of entries in the cache. + * + * @param keys The keys of the entries to look up. + * @return The cached Document or NoDocument entries indexed by key. If an + * entry is not cached, the corresponding key will be mapped to a null value. + */ + virtual model::MaybeDocumentMap GetAll(const model::DocumentKeySet& keys) = 0; + + /** + * Executes a query against the cached FSTDocument entries + * + * Implementations may return extra documents if convenient. The results + * should be re-filtered by the consumer before presenting them to the user. + * + * Cached FSTDeletedDocument entries have no bearing on query results. + * + * @param query The query to match documents against. + * @return The set of matching documents. + */ + virtual model::DocumentMap GetMatchingDocuments(FSTQuery* query) = 0; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REMOTE_DOCUMENT_CACHE_H_ From dd9c760c0763e7c7176fcbb5fcd028982c0175f5 Mon Sep 17 00:00:00 2001 From: Benoit St-Pierre Date: Mon, 17 Dec 2018 19:57:13 -0500 Subject: [PATCH 18/34] Release 5.15.0 (#2195) * Update versions for Release 5.15.0 * Create 5.15.0.json * Update CHANGELOG for Firestore v0.16.1 (#2164) * Update the name of certificates bundle (#2171) To accommodate for release 5.14.0. * Fix format string in FSTRemoteStore error logging (#2172) * Update CHANGELOG.md * Update 5.15.0.json --- Example/Podfile | 2 +- Firebase/Core/CHANGELOG.md | 3 +++ Firebase/Core/FIROptions.m | 2 +- FirebaseAuth.podspec | 2 +- FirebaseCore.podspec | 4 ++-- FirebaseFirestore.podspec | 2 +- FirebaseFunctions.podspec | 2 +- Firestore/Example/Podfile | 2 +- Releases/Manifests/5.15.0.json | 7 +++++++ SymbolCollisionTest/Podfile | 2 +- 10 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 Releases/Manifests/5.15.0.json diff --git a/Example/Podfile b/Example/Podfile index 7c3a2350145..c8965874a4f 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -15,7 +15,7 @@ target 'Core_Example_iOS' do # The next line is the forcing function for the Firebase pod. The Firebase # version's subspecs should depend on the component versions in their # corresponding podspec's. - pod 'Firebase/CoreOnly', '5.14.0' + pod 'Firebase/CoreOnly', '5.15.0' target 'Core_Tests_iOS' do inherit! :search_paths diff --git a/Firebase/Core/CHANGELOG.md b/Firebase/Core/CHANGELOG.md index aa3d88ef2c4..c58379c91d8 100644 --- a/Firebase/Core/CHANGELOG.md +++ b/Firebase/Core/CHANGELOG.md @@ -1,5 +1,8 @@ # Unreleased +# 2018-12-18 -- v5.1.10 -- M40 +- [changed] Removed some internal authentication methods on FIRApp which are no longer used thanks to the interop platform. + # 2018-10-31 -- v5.1.7 -- M37 - [fixed] Fixed static analysis warning for improper `nil` comparison. (#2034) - [changed] Assign the default app before posting notifications. (#2024) diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index 54643f1090b..fe708514be6 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -43,7 +43,7 @@ NSString *const kFIRLibraryVersionID = @"5" // Major version (one or more digits) @"01" // Minor version (exactly 2 digits) - @"09" // Build number (exactly 2 digits) + @"10" // Build number (exactly 2 digits) @"000"; // Fixed "000" // Plist file name. NSString *const kServiceInfoFileName = @"GoogleService-Info"; diff --git a/FirebaseAuth.podspec b/FirebaseAuth.podspec index f0b3b74de19..eed0a489f03 100644 --- a/FirebaseAuth.podspec +++ b/FirebaseAuth.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseAuth' - s.version = '5.1.0' + s.version = '5.2.0' s.summary = 'The official iOS client for Firebase Authentication (plus community support for macOS and tvOS)' s.description = <<-DESC diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec index 6c1b0e81277..591dac5e4f7 100644 --- a/FirebaseCore.podspec +++ b/FirebaseCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseCore' - s.version = '5.1.9' + s.version = '5.1.10' s.summary = 'Firebase Core for iOS (plus community support for macOS and tvOS)' s.description = <<-DESC @@ -32,7 +32,7 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration s.pod_target_xcconfig = { 'GCC_C_LANGUAGE_STANDARD' => 'c99', 'GCC_PREPROCESSOR_DEFINITIONS' => - 'FIRCore_VERSION=' + s.version.to_s + ' Firebase_VERSION=5.14.0', + 'FIRCore_VERSION=' + s.version.to_s + ' Firebase_VERSION=5.15.0', 'OTHER_CFLAGS' => '-fno-autolink' } end diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec index f163a18976b..3639183c97b 100644 --- a/FirebaseFirestore.podspec +++ b/FirebaseFirestore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseFirestore' - s.version = '0.16.0' + s.version = '0.16.1' s.summary = 'Google Cloud Firestore for iOS' s.description = <<-DESC diff --git a/FirebaseFunctions.podspec b/FirebaseFunctions.podspec index 5c85eaf71d5..1de5a32cb45 100644 --- a/FirebaseFunctions.podspec +++ b/FirebaseFunctions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FirebaseFunctions' - s.version = '2.1.1' + s.version = '2.1.2' s.summary = 'Cloud Functions for Firebase iOS SDK.' s.description = <<-DESC diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile index dda93d05fd5..2d4191f700d 100644 --- a/Firestore/Example/Podfile +++ b/Firestore/Example/Podfile @@ -10,7 +10,7 @@ target 'Firestore_Example_iOS' do # The next line is the forcing function for the Firebase pod. The Firebase # version's subspecs should depend on the component versions in their # corresponding podspec's. - pod 'Firebase/CoreOnly', '5.14.0' + pod 'Firebase/CoreOnly', '5.15.0' pod 'FirebaseAuth', :path => '../../' pod 'FirebaseAuthInterop', :path => '../../' diff --git a/Releases/Manifests/5.15.0.json b/Releases/Manifests/5.15.0.json new file mode 100644 index 00000000000..d61a2198746 --- /dev/null +++ b/Releases/Manifests/5.15.0.json @@ -0,0 +1,7 @@ +{ + "FirebaseAuth":"5.2.0", + "FirebaseCore":"5.1.10", + "FirebaseFirestore":"0.16.1", + "FirebaseFunctions":"2.1.2", + "FirebasePerformance":"2.2.2" +} diff --git a/SymbolCollisionTest/Podfile b/SymbolCollisionTest/Podfile index 1ec80c2f4c6..ed076ea6c82 100644 --- a/SymbolCollisionTest/Podfile +++ b/SymbolCollisionTest/Podfile @@ -6,7 +6,7 @@ target 'SymbolCollisionTest' do # use_frameworks! # Firebase Pods - pod 'Firebase', '5.14.0' + pod 'Firebase', '5.15.0' pod 'FirebaseAnalytics' pod 'FirebaseAuth' pod 'FirebaseCore' From ab05b968101e01108f1698c93729c91acce38fa6 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Tue, 18 Dec 2018 13:24:35 -0800 Subject: [PATCH 19/34] Port FSTRemoteDocumentCache (#2196) * Remove FSTRemoteDocumentCache --- .../Local/FSTLRUGarbageCollectorTests.mm | 18 ++-- .../FSTLevelDBRemoteDocumentCacheTests.mm | 4 +- .../FSTMemoryRemoteDocumentCacheTests.mm | 4 +- .../Tests/Local/FSTRemoteDocumentCacheTests.h | 2 - .../Local/FSTRemoteDocumentCacheTests.mm | 15 ++-- Firestore/Source/Local/FSTLevelDB.h | 2 +- Firestore/Source/Local/FSTLevelDB.mm | 13 ++- .../Local/FSTLevelDBRemoteDocumentCache.h | 43 ---------- .../Local/FSTLevelDBRemoteDocumentCache.mm | 82 ------------------ .../Source/Local/FSTLocalDocumentsView.h | 5 +- .../Source/Local/FSTLocalDocumentsView.mm | 21 +++-- Firestore/Source/Local/FSTLocalStore.mm | 21 +++-- .../Source/Local/FSTMemoryPersistence.mm | 22 +++-- .../Local/FSTMemoryRemoteDocumentCache.h | 41 --------- .../Local/FSTMemoryRemoteDocumentCache.mm | 74 ---------------- Firestore/Source/Local/FSTPersistence.h | 4 +- .../Source/Local/FSTRemoteDocumentCache.h | 84 ------------------- .../local/leveldb_remote_document_cache.h | 6 +- .../local/leveldb_remote_document_cache.mm | 6 +- .../local/memory_remote_document_cache.h | 6 +- .../local/memory_remote_document_cache.mm | 34 ++++---- .../firestore/local/remote_document_cache.h | 8 +- 22 files changed, 98 insertions(+), 417 deletions(-) delete mode 100644 Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h delete mode 100644 Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm delete mode 100644 Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h delete mode 100644 Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm delete mode 100644 Firestore/Source/Local/FSTRemoteDocumentCache.h diff --git a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm index 93f1968323d..296791b1ce9 100644 --- a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm +++ b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm @@ -26,12 +26,12 @@ #import "Firestore/Source/Local/FSTMutationQueue.h" #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Local/FSTQueryCache.h" -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Util/FSTClasses.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/precondition.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @@ -42,6 +42,7 @@ using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; using firebase::firestore::local::LruResults; +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeyHash; using firebase::firestore::model::DocumentKeySet; @@ -58,7 +59,7 @@ @implementation FSTLRUGarbageCollectorTests { FSTObjectValue *_bigObjectValue; id _persistence; id _queryCache; - id _documentCache; + RemoteDocumentCache *_documentCache; id _mutationQueue; id _lruDelegate; FSTLRUGarbageCollector *_gc; @@ -209,7 +210,7 @@ - (void)removeDocument:(const DocumentKey &)docKey fromTarget:(TargetId)targetId */ - (FSTDocument *)cacheADocumentInTransaction { FSTDocument *doc = [self nextTestDocument]; - [_documentCache addEntry:doc]; + _documentCache->Add(doc); return doc; } @@ -461,12 +462,11 @@ - (void)testRemoveOrphanedDocuments { XCTAssertEqual(toBeRemoved.size(), removed); _persistence.run("verify", [&]() { for (const DocumentKey &key : toBeRemoved) { - XCTAssertNil([_documentCache entryForKey:key]); + XCTAssertNil(_documentCache->Get(key)); XCTAssertFalse([_queryCache containsKey:key]); } for (const DocumentKey &key : expectedRetained) { - XCTAssertNotNil([_documentCache entryForKey:key], @"Missing document %s", - key.ToString().c_str()); + XCTAssertNotNil(_documentCache->Get(key), @"Missing document %s", key.ToString().c_str()); } }); [_persistence shutdown]; @@ -618,7 +618,7 @@ - (void)testRemoveTargetsThenGC { key:middleDocToUpdate version:testutil::Version(version) state:FSTDocumentStateSynced]; - [_documentCache addEntry:doc]; + _documentCache->Add(doc); [self updateTargetInTransaction:middleTarget]; }); @@ -643,14 +643,14 @@ - (void)testRemoveTargetsThenGC { XCTAssertEqual(expectedRemoved.size(), docsRemoved); _persistence.run("verify results", [&]() { for (const DocumentKey &key : expectedRemoved) { - XCTAssertNil([_documentCache entryForKey:key], @"Did not expect to find %s in document cache", + XCTAssertNil(_documentCache->Get(key), @"Did not expect to find %s in document cache", key.ToString().c_str()); XCTAssertFalse([_queryCache containsKey:key], @"Did not expect to find %s in queryCache", key.ToString().c_str()); [self expectSentinelRemoved:key]; } for (const DocumentKey &key : expectedRetained) { - XCTAssertNotNil([_documentCache entryForKey:key], @"Expected to find %s in document cache", + XCTAssertNotNil(_documentCache->Get(key), @"Expected to find %s in document cache", key.ToString().c_str()); } }); diff --git a/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm index 78e105c9dc7..ac106caad0d 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBRemoteDocumentCacheTests.mm @@ -21,6 +21,7 @@ #import "Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h" #import "Firestore/Source/Local/FSTLevelDB.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/util/ordered_code.h" #include "absl/memory/memory.h" @@ -30,6 +31,7 @@ using leveldb::WriteOptions; using firebase::firestore::local::LevelDbRemoteDocumentCache; +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::util::OrderedCode; // A dummy document value, useful for testing code that's known to examine only document keys. @@ -61,7 +63,7 @@ - (void)setUp { [self writeDummyRowWithSegments:@[ @"remote_documentsa", @"foo", @"bar" ]]; } -- (LevelDbRemoteDocumentCache *_Nullable)remoteDocumentCache { +- (RemoteDocumentCache *_Nullable)remoteDocumentCache { return _cache.get(); } diff --git a/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm index c33ce4b63ee..c39a15f1fbf 100644 --- a/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTMemoryRemoteDocumentCacheTests.mm @@ -18,12 +18,14 @@ #import "Firestore/Source/Local/FSTMemoryPersistence.h" #include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "absl/memory/memory.h" #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #import "Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h" using firebase::firestore::local::MemoryRemoteDocumentCache; +using firebase::firestore::local::RemoteDocumentCache; @interface FSTMemoryRemoteDocumentCacheTests : FSTRemoteDocumentCacheTests @end @@ -45,7 +47,7 @@ - (void)setUp { _cache = absl::make_unique(); } -- (MemoryRemoteDocumentCache *)remoteDocumentCache { +- (RemoteDocumentCache *)remoteDocumentCache { return _cache.get(); } diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h index 71e0073f79a..8b660eae0ef 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.h @@ -14,8 +14,6 @@ * limitations under the License. */ -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" - #import #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" diff --git a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm index e94224cdbdb..c13d967bf89 100644 --- a/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTRemoteDocumentCacheTests.mm @@ -21,7 +21,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Example/Tests/Util/FSTHelpers.h" @@ -127,7 +126,7 @@ - (void)testSetAndReadDeletedDocument { self.persistence.run("testSetAndReadDeletedDocument", [&]() { FSTDeletedDocument *deletedDoc = FSTTestDeletedDoc(kDocPath, kVersion, NO); - self.remoteDocumentCache->AddEntry(deletedDoc); + self.remoteDocumentCache->Add(deletedDoc); XCTAssertEqualObjects(self.remoteDocumentCache->Get(testutil::Key(kDocPath)), deletedDoc); }); @@ -139,7 +138,7 @@ - (void)testSetDocumentToNewValue { self.persistence.run("testSetDocumentToNewValue", [&]() { [self setTestDocumentAtPath:kDocPath]; FSTDocument *newDoc = FSTTestDoc(kDocPath, kVersion, @{@"data" : @2}, FSTDocumentStateSynced); - self.remoteDocumentCache->AddEntry(newDoc); + self.remoteDocumentCache->Add(newDoc); XCTAssertEqualObjects(self.remoteDocumentCache->Get(testutil::Key(kDocPath)), newDoc); }); } @@ -149,7 +148,7 @@ - (void)testRemoveDocument { self.persistence.run("testRemoveDocument", [&]() { [self setTestDocumentAtPath:kDocPath]; - self.remoteDocumentCache->RemoveEntry(testutil::Key(kDocPath)); + self.remoteDocumentCache->Remove(testutil::Key(kDocPath)); XCTAssertNil(self.remoteDocumentCache->Get(testutil::Key(kDocPath))); }); @@ -160,7 +159,7 @@ - (void)testRemoveNonExistentDocument { self.persistence.run("testRemoveNonExistentDocument", [&]() { // no-op, but make sure it doesn't throw. - XCTAssertNoThrow(self.remoteDocumentCache->RemoveEntry(testutil::Key(kDocPath))); + XCTAssertNoThrow(self.remoteDocumentCache->Remove(testutil::Key(kDocPath))); }); } @@ -177,7 +176,7 @@ - (void)testDocumentsMatchingQuery { [self setTestDocumentAtPath:"c/1"]; FSTQuery *query = FSTTestQuery("b"); - DocumentMap results = self.remoteDocumentCache->GetMatchingDocuments(query); + DocumentMap results = self.remoteDocumentCache->GetMatching(query); [self expectMap:results.underlying_map() hasDocsInArray:@[ FSTTestDoc("b/1", kVersion, _kDocData, FSTDocumentStateSynced), @@ -188,11 +187,9 @@ - (void)testDocumentsMatchingQuery { } #pragma mark - Helpers -// TODO(gsoltis): reevaluate if any of these helpers are still needed - - (FSTDocument *)setTestDocumentAtPath:(const absl::string_view)path { FSTDocument *doc = FSTTestDoc(path, kVersion, _kDocData, FSTDocumentStateSynced); - self.remoteDocumentCache->AddEntry(doc); + self.remoteDocumentCache->Add(doc); return doc; } diff --git a/Firestore/Source/Local/FSTLevelDB.h b/Firestore/Source/Local/FSTLevelDB.h index de78f724629..2ef3f6eb47e 100644 --- a/Firestore/Source/Local/FSTLevelDB.h +++ b/Firestore/Source/Local/FSTLevelDB.h @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN serializer:(FSTLocalSerializer *)serializer lruParams: (firebase::firestore::local::LruParams)lruParams - ptr:(FSTLevelDB **)ptr; + ptr:(FSTLevelDB *_Nullable *_Nonnull)ptr; - (instancetype)init NS_UNAVAILABLE; diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index cce7d313b35..04caa3830d3 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -24,7 +24,6 @@ #import "Firestore/Source/Local/FSTLRUGarbageCollector.h" #import "Firestore/Source/Local/FSTLevelDBMutationQueue.h" #import "Firestore/Source/Local/FSTLevelDBQueryCache.h" -#import "Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h" #import "Firestore/Source/Local/FSTReferenceSet.h" #import "Firestore/Source/Remote/FSTSerializerBeta.h" @@ -33,8 +32,10 @@ #include "Firestore/core/src/firebase/firestore/core/database_info.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_migrations.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_util.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" @@ -60,8 +61,10 @@ using firebase::firestore::local::LevelDbDocumentTargetKey; using firebase::firestore::local::LevelDbMigrations; using firebase::firestore::local::LevelDbMutationKey; +using firebase::firestore::local::LevelDbRemoteDocumentCache; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::local::LruParams; +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::ListenSequenceNumber; @@ -210,7 +213,7 @@ - (int)removeOrphanedDocumentsThroughSequenceNumber:(ListenSequenceNumber)upperB if (sequenceNumber <= upperBound) { if (![self isPinned:docKey]) { count++; - [self->_db.remoteDocumentCache removeEntryForKey:docKey]; + self->_db.remoteDocumentCache->Remove(docKey); [self removeSentinel:docKey]; } } @@ -266,6 +269,7 @@ @implementation FSTLevelDB { Path _directory; std::unique_ptr _transaction; std::unique_ptr _ptr; + std::unique_ptr _documentCache; FSTTransactionRunner _transactionRunner; FSTLevelDBLRUDelegate *_referenceDelegate; FSTLevelDBQueryCache *_queryCache; @@ -336,6 +340,7 @@ - (instancetype)initWithLevelDB:(std::unique_ptr)db _directory = std::move(directory); _serializer = serializer; _queryCache = [[FSTLevelDBQueryCache alloc] initWithDB:self serializer:self.serializer]; + _documentCache = absl::make_unique(self, _serializer); _referenceDelegate = [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self lruParams:lruParams]; _transactionRunner.SetBackingPersistence(self); @@ -460,8 +465,8 @@ - (LevelDbTransaction *)currentTransaction { return _queryCache; } -- (id)remoteDocumentCache { - return [[FSTLevelDBRemoteDocumentCache alloc] initWithDB:self serializer:self.serializer]; +- (RemoteDocumentCache *)remoteDocumentCache { + return _documentCache.get(); } - (void)startTransaction:(absl::string_view)label { diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h deleted file mode 100644 index 381d308d203..00000000000 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include - -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" - -@class FSTLevelDB; -@class FSTLocalSerializer; - -NS_ASSUME_NONNULL_BEGIN - -/** Cached Remote Documents backed by leveldb. */ -@interface FSTLevelDBRemoteDocumentCache : NSObject - -- (instancetype)init NS_UNAVAILABLE; - -/** - * Creates a new remote documents cache in the given leveldb. - * - * @param db The leveldb in which to create the cache. - */ -- (instancetype)initWithDB:(FSTLevelDB *)db - serializer:(FSTLocalSerializer *)serializer NS_DESIGNATED_INITIALIZER; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm b/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm deleted file mode 100644 index f4a4a3bdbf7..00000000000 --- a/Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.mm +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTLevelDBRemoteDocumentCache.h" - -#include - -#import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" -#import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Local/FSTLevelDB.h" -#import "Firestore/Source/Local/FSTLocalSerializer.h" -#import "Firestore/Source/Model/FSTDocument.h" -#import "Firestore/Source/Model/FSTDocumentSet.h" - -#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" -#include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" -#include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/util/hard_assert.h" -#include "absl/memory/memory.h" -#include "leveldb/db.h" -#include "leveldb/write_batch.h" - -NS_ASSUME_NONNULL_BEGIN - -using firebase::firestore::local::LevelDbRemoteDocumentCache; -using firebase::firestore::local::LevelDbRemoteDocumentKey; -using firebase::firestore::local::LevelDbTransaction; -using firebase::firestore::model::DocumentKey; -using firebase::firestore::model::DocumentKeySet; -using firebase::firestore::model::DocumentMap; -using firebase::firestore::model::MaybeDocumentMap; -using leveldb::DB; -using leveldb::Status; - -@implementation FSTLevelDBRemoteDocumentCache { - std::unique_ptr _cache; -} - -- (instancetype)initWithDB:(FSTLevelDB *)db serializer:(FSTLocalSerializer *)serializer { - if (self = [super init]) { - _cache = absl::make_unique(db, serializer); - } - return self; -} - -- (void)addEntry:(FSTMaybeDocument *)document { - _cache->AddEntry(document); -} - -- (void)removeEntryForKey:(const DocumentKey &)documentKey { - _cache->RemoveEntry(documentKey); -} - -- (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)documentKey { - return _cache->Get(documentKey); -} - -- (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { - return _cache->GetAll(keys); -} - -- (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { - return _cache->GetMatchingDocuments(query); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.h b/Firestore/Source/Local/FSTLocalDocumentsView.h index 6ec6570e548..a559b7c2136 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.h +++ b/Firestore/Source/Local/FSTLocalDocumentsView.h @@ -16,6 +16,7 @@ #import +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" @@ -23,7 +24,6 @@ @class FSTMaybeDocument; @class FSTQuery; @protocol FSTMutationQueue; -@protocol FSTRemoteDocumentCache; NS_ASSUME_NONNULL_BEGIN @@ -34,7 +34,8 @@ NS_ASSUME_NONNULL_BEGIN */ @interface FSTLocalDocumentsView : NSObject -+ (instancetype)viewWithRemoteDocumentCache:(id)remoteDocumentCache ++ (instancetype)viewWithRemoteDocumentCache: + (firebase::firestore::local::RemoteDocumentCache *)remoteDocumentCache mutationQueue:(id)mutationQueue; - (instancetype)init __attribute__((unavailable("Use a static constructor"))); diff --git a/Firestore/Source/Local/FSTLocalDocumentsView.mm b/Firestore/Source/Local/FSTLocalDocumentsView.mm index e1820df16e5..bdc92a8dc08 100644 --- a/Firestore/Source/Local/FSTLocalDocumentsView.mm +++ b/Firestore/Source/Local/FSTLocalDocumentsView.mm @@ -18,17 +18,18 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTMutationQueue.h" -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::DocumentMap; @@ -39,22 +40,24 @@ NS_ASSUME_NONNULL_BEGIN @interface FSTLocalDocumentsView () -- (instancetype)initWithRemoteDocumentCache:(id)remoteDocumentCache +- (instancetype)initWithRemoteDocumentCache:(RemoteDocumentCache *)remoteDocumentCache mutationQueue:(id)mutationQueue NS_DESIGNATED_INITIALIZER; -@property(nonatomic, strong, readonly) id remoteDocumentCache; + @property(nonatomic, strong, readonly) id mutationQueue; @end -@implementation FSTLocalDocumentsView +@implementation FSTLocalDocumentsView { + RemoteDocumentCache *_remoteDocumentCache; +} -+ (instancetype)viewWithRemoteDocumentCache:(id)remoteDocumentCache ++ (instancetype)viewWithRemoteDocumentCache:(RemoteDocumentCache *)remoteDocumentCache mutationQueue:(id)mutationQueue { return [[FSTLocalDocumentsView alloc] initWithRemoteDocumentCache:remoteDocumentCache mutationQueue:mutationQueue]; } -- (instancetype)initWithRemoteDocumentCache:(id)remoteDocumentCache +- (instancetype)initWithRemoteDocumentCache:(RemoteDocumentCache *)remoteDocumentCache mutationQueue:(id)mutationQueue { if (self = [super init]) { _remoteDocumentCache = remoteDocumentCache; @@ -72,7 +75,7 @@ - (nullable FSTMaybeDocument *)documentForKey:(const DocumentKey &)key { // Internal version of documentForKey: which allows reusing `batches`. - (nullable FSTMaybeDocument *)documentForKey:(const DocumentKey &)key inBatches:(NSArray *)batches { - FSTMaybeDocument *_Nullable document = [self.remoteDocumentCache entryForKey:key]; + FSTMaybeDocument *_Nullable document = _remoteDocumentCache->Get(key); for (FSTMutationBatch *batch in batches) { document = [batch applyToLocalDocument:document documentKey:key]; } @@ -98,7 +101,7 @@ - (MaybeDocumentMap)applyLocalMutationsToDocuments:(const MaybeDocumentMap &)doc } - (MaybeDocumentMap)documentsForKeys:(const DocumentKeySet &)keys { - MaybeDocumentMap docs = [self.remoteDocumentCache entriesForKeys:keys]; + MaybeDocumentMap docs = _remoteDocumentCache->GetAll(keys); return [self localViewsForDocuments:docs]; } @@ -153,7 +156,7 @@ - (DocumentMap)documentsMatchingDocumentQuery:(const ResourcePath &)docPath { } - (DocumentMap)documentsMatchingCollectionQuery:(FSTQuery *)query { - DocumentMap results = [self.remoteDocumentCache documentsMatchingQuery:query]; + DocumentMap results = _remoteDocumentCache->GetMatching(query); // Get locally persisted mutation batches. NSArray *matchingBatches = [self.mutationQueue allMutationBatchesAffectingQuery:query]; diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index 7d04c080f4a..684ce15543b 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -31,7 +31,6 @@ #import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Local/FSTReferenceSet.h" -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" @@ -40,6 +39,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" #include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" #include "Firestore/core/src/firebase/firestore/util/log.h" @@ -47,6 +47,7 @@ using firebase::firestore::auth::User; using firebase::firestore::core::TargetIdGenerator; using firebase::firestore::local::LruResults; +using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; @@ -75,9 +76,6 @@ @interface FSTLocalStore () /** The set of all mutations that have been sent but not yet been applied to the backend. */ @property(nonatomic, strong) id mutationQueue; -/** The set of all cached remote documents. */ -@property(nonatomic, strong) id remoteDocumentCache; - /** The "local" view of all documents (layering mutationQueue on top of remoteDocumentCache). */ @property(nonatomic, strong) FSTLocalDocumentsView *localDocuments; @@ -95,6 +93,8 @@ @interface FSTLocalStore () @implementation FSTLocalStore { /** Used to generate targetIDs for queries tracked locally. */ TargetIdGenerator _targetIDGenerator; + /** The set of all cached remote documents. */ + RemoteDocumentCache *_remoteDocumentCache; } - (instancetype)initWithPersistence:(id)persistence @@ -140,9 +140,8 @@ - (MaybeDocumentMap)userDidChange:(const User &)user { NSArray *newBatches = [self.mutationQueue allMutationBatches]; // Recreate our LocalDocumentsView using the new MutationQueue. - self.localDocuments = - [FSTLocalDocumentsView viewWithRemoteDocumentCache:self.remoteDocumentCache - mutationQueue:self.mutationQueue]; + self.localDocuments = [FSTLocalDocumentsView viewWithRemoteDocumentCache:_remoteDocumentCache + mutationQueue:self.mutationQueue]; // Union the old/new changed keys. DocumentKeySet changedKeys; @@ -272,7 +271,7 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { } // Each loop iteration only affects its "own" doc, so it's safe to get all the remote // documents in advance in a single call. - MaybeDocumentMap existingDocs = [self.remoteDocumentCache entriesForKeys:updatedKeys]; + MaybeDocumentMap existingDocs = _remoteDocumentCache->GetAll(updatedKeys); for (const auto &kv : remoteEvent.documentUpdates) { const DocumentKey &key = kv.first; @@ -289,7 +288,7 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { if (!existingDoc || doc.version == SnapshotVersion::None() || (authoritativeUpdates.contains(doc.key) && !existingDoc.hasPendingWrites) || doc.version >= existingDoc.version) { - [self.remoteDocumentCache addEntry:doc]; + _remoteDocumentCache->Add(doc); changedDocs = changedDocs.insert(key, doc); } else { LOG_DEBUG( @@ -453,7 +452,7 @@ - (void)applyBatchResult:(FSTMutationBatchResult *)batchResult { DocumentKeySet docKeys = batch.keys; const DocumentVersionMap &versions = batchResult.docVersions; for (const DocumentKey &docKey : docKeys) { - FSTMaybeDocument *_Nullable remoteDoc = [self.remoteDocumentCache entryForKey:docKey]; + FSTMaybeDocument *_Nullable remoteDoc = _remoteDocumentCache->Get(docKey); FSTMaybeDocument *_Nullable doc = remoteDoc; auto ackVersionIter = versions.find(docKey); @@ -466,7 +465,7 @@ - (void)applyBatchResult:(FSTMutationBatchResult *)batchResult { HARD_ASSERT(!remoteDoc, "Mutation batch %s applied to document %s resulted in nil.", batch, remoteDoc); } else { - [self.remoteDocumentCache addEntry:doc]; + _remoteDocumentCache->Add(doc); } } } diff --git a/Firestore/Source/Local/FSTMemoryPersistence.mm b/Firestore/Source/Local/FSTMemoryPersistence.mm index 6aa8d6738e8..d246f2a9c60 100644 --- a/Firestore/Source/Local/FSTMemoryPersistence.mm +++ b/Firestore/Source/Local/FSTMemoryPersistence.mm @@ -24,17 +24,18 @@ #import "Firestore/Source/Core/FSTListenSequence.h" #import "Firestore/Source/Local/FSTMemoryMutationQueue.h" #import "Firestore/Source/Local/FSTMemoryQueryCache.h" -#import "Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h" #import "Firestore/Source/Local/FSTReferenceSet.h" #include "absl/memory/memory.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" using firebase::firestore::auth::HashUser; using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; +using firebase::firestore::local::MemoryRemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeyHash; using firebase::firestore::model::ListenSequenceNumber; @@ -48,7 +49,7 @@ @interface FSTMemoryPersistence () - (FSTMemoryQueryCache *)queryCache; -- (FSTMemoryRemoteDocumentCache *)remoteDocumentCache; +- (MemoryRemoteDocumentCache *)remoteDocumentCache; @property(nonatomic, readonly) MutationQueues &mutationQueues; @@ -70,8 +71,8 @@ @implementation FSTMemoryPersistence { */ FSTMemoryQueryCache *_queryCache; - /** The FSTRemoteDocumentCache representing the persisted cache of remote documents. */ - FSTMemoryRemoteDocumentCache *_remoteDocumentCache; + /** The RemoteDocumentCache representing the persisted cache of remote documents. */ + MemoryRemoteDocumentCache _remoteDocumentCache; FSTTransactionRunner _transactionRunner; @@ -98,7 +99,6 @@ + (instancetype)persistenceWithLruParams:(firebase::firestore::local::LruParams) - (instancetype)init { if (self = [super init]) { _queryCache = [[FSTMemoryQueryCache alloc] initWithPersistence:self]; - _remoteDocumentCache = [[FSTMemoryRemoteDocumentCache alloc] init]; self.started = YES; } return self; @@ -143,8 +143,8 @@ - (FSTMemoryQueryCache *)queryCache { return _queryCache; } -- (id)remoteDocumentCache { - return _remoteDocumentCache; +- (MemoryRemoteDocumentCache *)remoteDocumentCache { + return &_remoteDocumentCache; } @end @@ -249,9 +249,7 @@ - (int32_t)sequenceNumberCount { - (int)removeOrphanedDocumentsThroughSequenceNumber:(ListenSequenceNumber)upperBound { std::vector removed = - [(FSTMemoryRemoteDocumentCache *)_persistence.remoteDocumentCache - removeOrphanedDocuments:self - throughSequenceNumber:upperBound]; + _persistence.remoteDocumentCache->RemoveOrphanedDocuments(self, upperBound); for (const auto &key : removed) { _sequenceNumbers.erase(key); } @@ -304,7 +302,7 @@ - (size_t)byteSize { // and count bytes) is inefficient and inexact, but won't run in production. size_t count = 0; count += [_persistence.queryCache byteSizeWithSerializer:_serializer]; - count += [_persistence.remoteDocumentCache byteSizeWithSerializer:_serializer]; + count += _persistence.remoteDocumentCache->CalculateByteSize(_serializer); const MutationQueues &queues = [_persistence mutationQueues]; for (const auto &entry : queues) { count += [entry.second byteSizeWithSerializer:_serializer]; @@ -397,7 +395,7 @@ - (BOOL)mutationQueuesContainKey:(const DocumentKey &)key { - (void)commitTransaction { for (const auto &key : *_orphaned) { if (![self isReferenced:key]) { - [[_persistence remoteDocumentCache] removeEntryForKey:key]; + _persistence.remoteDocumentCache->Remove(key); } } _orphaned.reset(); diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h deleted file mode 100644 index 1f0884fe33a..00000000000 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include - -#import "Firestore/Source/Local/FSTRemoteDocumentCache.h" - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/types.h" - -NS_ASSUME_NONNULL_BEGIN - -@class FSTLocalSerializer; -@class FSTMemoryLRUReferenceDelegate; - -@interface FSTMemoryRemoteDocumentCache : NSObject - -- (std::vector) - removeOrphanedDocuments:(FSTMemoryLRUReferenceDelegate *)referenceDelegate - throughSequenceNumber:(firebase::firestore::model::ListenSequenceNumber)upperBound; - -- (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm b/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm deleted file mode 100644 index 4f4070141aa..00000000000 --- a/Firestore/Source/Local/FSTMemoryRemoteDocumentCache.mm +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTMemoryRemoteDocumentCache.h" - -#import -#import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" -#import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Local/FSTMemoryPersistence.h" -#import "Firestore/Source/Model/FSTDocument.h" - -#include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/document_map.h" - -using firebase::firestore::local::MemoryRemoteDocumentCache; -using firebase::firestore::model::DocumentKey; -using firebase::firestore::model::DocumentKeySet; -using firebase::firestore::model::ListenSequenceNumber; -using firebase::firestore::model::DocumentMap; -using firebase::firestore::model::MaybeDocumentMap; - -NS_ASSUME_NONNULL_BEGIN - -@implementation FSTMemoryRemoteDocumentCache { - MemoryRemoteDocumentCache _cache; -} - -- (void)addEntry:(FSTMaybeDocument *)document { - _cache.AddEntry(document); -} - -- (void)removeEntryForKey:(const DocumentKey &)key { - _cache.RemoveEntry(key); -} - -- (nullable FSTMaybeDocument *)entryForKey:(const DocumentKey &)key { - return _cache.Get(key); -} - -- (MaybeDocumentMap)entriesForKeys:(const DocumentKeySet &)keys { - return _cache.GetAll(keys); -} - -- (DocumentMap)documentsMatchingQuery:(FSTQuery *)query { - return _cache.GetMatchingDocuments(query); -} - -- (std::vector)removeOrphanedDocuments: - (FSTMemoryLRUReferenceDelegate *)referenceDelegate - throughSequenceNumber:(ListenSequenceNumber)upperBound { - return _cache.RemoveOrphanedDocuments(referenceDelegate, upperBound); -} - -- (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer { - return _cache.CalculateByteSize(serializer); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index 4b106af5080..8c9b7a62136 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -17,6 +17,7 @@ #import #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @@ -27,7 +28,6 @@ @protocol FSTMutationQueue; @protocol FSTQueryCache; @protocol FSTReferenceDelegate; -@protocol FSTRemoteDocumentCache; struct FSTTransactionRunner; @@ -82,7 +82,7 @@ NS_ASSUME_NONNULL_BEGIN - (id)queryCache; /** Creates an FSTRemoteDocumentCache representing the persisted cache of remote documents. */ -- (id)remoteDocumentCache; +- (firebase::firestore::local::RemoteDocumentCache *)remoteDocumentCache; @property(nonatomic, readonly, assign) const FSTTransactionRunner &run; diff --git a/Firestore/Source/Local/FSTRemoteDocumentCache.h b/Firestore/Source/Local/FSTRemoteDocumentCache.h deleted file mode 100644 index 51a6cf1b72e..00000000000 --- a/Firestore/Source/Local/FSTRemoteDocumentCache.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" -#include "Firestore/core/src/firebase/firestore/model/document_map.h" - -@class FSTMaybeDocument; -@class FSTQuery; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Represents cached documents received from the remote backend. - * - * The cache is keyed by DocumentKey and entries in the cache are FSTMaybeDocument instances, - * meaning we can cache both FSTDocument instances (an actual document with data) as well as - * FSTDeletedDocument instances (indicating that the document is known to not exist). - */ -@protocol FSTRemoteDocumentCache - -/** - * Adds or replaces an entry in the cache. - * - * The cache key is extracted from `maybeDocument.key`. If there is already a cache entry for - * the key, it will be replaced. - * - * @param maybeDocument A FSTDocument or FSTDeletedDocument to put in the cache. - */ -- (void)addEntry:(FSTMaybeDocument *)maybeDocument; - -/** Removes the cached entry for the given key (no-op if no entry exists). */ -- (void)removeEntryForKey:(const firebase::firestore::model::DocumentKey &)documentKey; - -/** - * Looks up an entry in the cache. - * - * @param documentKey The key of the entry to look up. - * @return The cached FSTDocument or FSTDeletedDocument entry, or nil if we have nothing cached. - */ -- (nullable FSTMaybeDocument *)entryForKey: - (const firebase::firestore::model::DocumentKey &)documentKey; - -/** - * Looks up a set of entries in the cache. - * - * @param documentKeys The keys of the entries to look up. - * @return The cached Document or NoDocument entries indexed by key. If an entry is not cached, - * the corresponding key will be mapped to a null value. - */ -- (firebase::firestore::model::MaybeDocumentMap)entriesForKeys: - (const firebase::firestore::model::DocumentKeySet &)documentKeys; - -/** - * Executes a query against the cached FSTDocument entries - * - * Implementations may return extra documents if convenient. The results should be re-filtered - * by the consumer before presenting them to the user. - * - * Cached FSTDeletedDocument entries have no bearing on query results. - * - * @param query The query to match documents against. - * @return The set of matching documents. - */ -- (firebase::firestore::model::DocumentMap)documentsMatchingQuery:(FSTQuery *)query; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h index ef8a83f429c..536d74c1d33 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h @@ -46,12 +46,12 @@ class LevelDbRemoteDocumentCache : public RemoteDocumentCache { public: LevelDbRemoteDocumentCache(FSTLevelDB* db, FSTLocalSerializer* serializer); - void AddEntry(FSTMaybeDocument* document) override; - void RemoveEntry(const model::DocumentKey& key) override; + void Add(FSTMaybeDocument* document) override; + void Remove(const model::DocumentKey& key) override; FSTMaybeDocument* _Nullable Get(const model::DocumentKey& key) override; model::MaybeDocumentMap GetAll(const model::DocumentKeySet& keys) override; - model::DocumentMap GetMatchingDocuments(FSTQuery* query) override; + model::DocumentMap GetMatching(FSTQuery* query) override; private: FSTMaybeDocument* DecodeMaybeDocument(absl::string_view encoded, diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm index 341ce12fb09..1a8bbeaecc6 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm @@ -43,13 +43,13 @@ : db_(db), serializer_(serializer) { } -void LevelDbRemoteDocumentCache::AddEntry(FSTMaybeDocument* document) { +void LevelDbRemoteDocumentCache::Add(FSTMaybeDocument* document) { std::string ldb_key = LevelDbRemoteDocumentKey::Key(document.key); db_.currentTransaction->Put(ldb_key, [serializer_ encodedMaybeDocument:document]); } -void LevelDbRemoteDocumentCache::RemoveEntry(const DocumentKey& key) { +void LevelDbRemoteDocumentCache::Remove(const DocumentKey& key) { std::string ldb_key = LevelDbRemoteDocumentKey::Key(key); db_.currentTransaction->Delete(ldb_key); } @@ -89,7 +89,7 @@ return results; } -DocumentMap LevelDbRemoteDocumentCache::GetMatchingDocuments(FSTQuery* query) { +DocumentMap LevelDbRemoteDocumentCache::GetMatching(FSTQuery* query) { DocumentMap results; // Documents are ordered by key, so we can use a prefix scan to narrow down diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h index ed9175bbd93..d1eebd08e99 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h @@ -42,12 +42,12 @@ namespace local { class MemoryRemoteDocumentCache : public RemoteDocumentCache { public: - void AddEntry(FSTMaybeDocument *document) override; - void RemoveEntry(const model::DocumentKey &key) override; + void Add(FSTMaybeDocument *document) override; + void Remove(const model::DocumentKey &key) override; FSTMaybeDocument *_Nullable Get(const model::DocumentKey &key) override; model::MaybeDocumentMap GetAll(const model::DocumentKeySet &keys) override; - model::DocumentMap GetMatchingDocuments(FSTQuery *query) override; + model::DocumentMap GetMatching(FSTQuery *query) override; std::vector RemoveOrphanedDocuments( FSTMemoryLRUReferenceDelegate *reference_delegate, diff --git a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm index b7535309e83..2514eaaa16d 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.mm @@ -36,32 +36,32 @@ * document key in memory. This is only an estimate and includes the size * of the segments of the path, but not any object overhead or path separators. */ -size_t DocumentKeyByteSize(const DocumentKey &key) { +size_t DocumentKeyByteSize(const DocumentKey& key) { size_t count = 0; - for (const auto &segment : key.path()) { + for (const auto& segment : key.path()) { count += segment.size(); } return count; } } // namespace -void MemoryRemoteDocumentCache::AddEntry(FSTMaybeDocument *document) { +void MemoryRemoteDocumentCache::Add(FSTMaybeDocument* document) { docs_ = docs_.insert(document.key, document); } -void MemoryRemoteDocumentCache::RemoveEntry(const DocumentKey &key) { +void MemoryRemoteDocumentCache::Remove(const DocumentKey& key) { docs_ = docs_.erase(key); } -FSTMaybeDocument *_Nullable MemoryRemoteDocumentCache::Get( - const DocumentKey &key) { +FSTMaybeDocument* _Nullable MemoryRemoteDocumentCache::Get( + const DocumentKey& key) { auto found = docs_.find(key); return found != docs_.end() ? found->second : nil; } -MaybeDocumentMap MemoryRemoteDocumentCache::GetAll(const DocumentKeySet &keys) { +MaybeDocumentMap MemoryRemoteDocumentCache::GetAll(const DocumentKeySet& keys) { MaybeDocumentMap results; - for (const DocumentKey &key : keys) { + for (const DocumentKey& key : keys) { // Make sure each key has a corresponding entry, which is null in case the // document is not found. // TODO(http://b/32275378): Don't conflate missing / deleted. @@ -70,22 +70,22 @@ size_t DocumentKeyByteSize(const DocumentKey &key) { return results; } -DocumentMap MemoryRemoteDocumentCache::GetMatchingDocuments(FSTQuery *query) { +DocumentMap MemoryRemoteDocumentCache::GetMatching(FSTQuery* query) { DocumentMap results; // Documents are ordered by key, so we can use a prefix scan to narrow down // the documents we need to match the query against. DocumentKey prefix{query.path.Append("")}; for (auto it = docs_.lower_bound(prefix); it != docs_.end(); ++it) { - const DocumentKey &key = it->first; + const DocumentKey& key = it->first; if (!query.path.IsPrefixOf(key.path())) { break; } - FSTMaybeDocument *maybeDoc = it->second; + FSTMaybeDocument* maybeDoc = it->second; if (![maybeDoc isKindOfClass:[FSTDocument class]]) { continue; } - FSTDocument *doc = static_cast(maybeDoc); + FSTDocument* doc = static_cast(maybeDoc); if ([query matchesDocument:doc]) { results = results.insert(key, doc); } @@ -94,12 +94,12 @@ size_t DocumentKeyByteSize(const DocumentKey &key) { } std::vector MemoryRemoteDocumentCache::RemoveOrphanedDocuments( - FSTMemoryLRUReferenceDelegate *reference_delegate, + FSTMemoryLRUReferenceDelegate* reference_delegate, ListenSequenceNumber upper_bound) { std::vector removed; MaybeDocumentMap updated_docs = docs_; - for (const auto &kv : docs_) { - const DocumentKey &key = kv.first; + for (const auto& kv : docs_) { + const DocumentKey& key = kv.first; if (![reference_delegate isPinnedAtSequenceNumber:upper_bound document:key]) { updated_docs = updated_docs.erase(key); @@ -111,9 +111,9 @@ size_t DocumentKeyByteSize(const DocumentKey &key) { } size_t MemoryRemoteDocumentCache::CalculateByteSize( - FSTLocalSerializer *serializer) { + FSTLocalSerializer* serializer) { size_t count = 0; - for (const auto &kv : docs_) { + for (const auto& kv : docs_) { count += DocumentKeyByteSize(kv.first); count += [[serializer encodedMaybeDocument:kv.second] serializedSize]; } diff --git a/Firestore/core/src/firebase/firestore/local/remote_document_cache.h b/Firestore/core/src/firebase/firestore/local/remote_document_cache.h index b9721281a35..f1ff54c354f 100644 --- a/Firestore/core/src/firebase/firestore/local/remote_document_cache.h +++ b/Firestore/core/src/firebase/firestore/local/remote_document_cache.h @@ -58,15 +58,15 @@ class RemoteDocumentCache { * * @param document A FSTDocument or FSTDeletedDocument to put in the cache. */ - virtual void AddEntry(FSTMaybeDocument* document) = 0; + virtual void Add(FSTMaybeDocument* document) = 0; /** Removes the cached entry for the given key (no-op if no entry exists). */ - virtual void RemoveEntry(const model::DocumentKey& key) = 0; + virtual void Remove(const model::DocumentKey& key) = 0; /** * Looks up an entry in the cache. * - * @param documentKey The key of the entry to look up. + * @param key The key of the entry to look up. * @return The cached FSTDocument or FSTDeletedDocument entry, or nil if we * have nothing cached. */ @@ -92,7 +92,7 @@ class RemoteDocumentCache { * @param query The query to match documents against. * @return The set of matching documents. */ - virtual model::DocumentMap GetMatchingDocuments(FSTQuery* query) = 0; + virtual model::DocumentMap GetMatching(FSTQuery* query) = 0; }; } // namespace local From 5063e9f45728e8773a7c0b5f19e9178f2e6d7863 Mon Sep 17 00:00:00 2001 From: Gil Date: Wed, 19 Dec 2018 08:57:55 -0800 Subject: [PATCH 20/34] Fix leaks in Firestore (#2199) * Clean up retain cycle in FSTLevelDB. * Explicitly CFRelease our SCNetworkReachabilityRef. * Make gRPC stream delegates weak --- .../Source/Local/FSTLRUGarbageCollector.mm | 2 +- .../Source/Local/FSTLevelDBMutationQueue.mm | 3 ++- .../Source/Local/FSTLevelDBQueryCache.mm | 3 ++- .../remote/connectivity_monitor_apple.mm | 22 ++++++++++++++----- .../firestore/remote/remote_objc_bridge.h | 4 ++-- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Firestore/Source/Local/FSTLRUGarbageCollector.mm b/Firestore/Source/Local/FSTLRUGarbageCollector.mm index 31919a375d0..cc368fd3f8f 100644 --- a/Firestore/Source/Local/FSTLRUGarbageCollector.mm +++ b/Firestore/Source/Local/FSTLRUGarbageCollector.mm @@ -81,7 +81,7 @@ size_t size() const { }; @implementation FSTLRUGarbageCollector { - id _delegate; + __weak id _delegate; LruParams _params; } diff --git a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm index 2fc941478ff..f28ba386051 100644 --- a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm +++ b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm @@ -86,7 +86,8 @@ - (instancetype)initWithUserID:(std::string)userID @end @implementation FSTLevelDBMutationQueue { - FSTLevelDB *_db; + // This instance is owned by FSTLevelDB; avoid a retain cycle. + __weak FSTLevelDB *_db; /** The normalized userID (e.g. nil UID => @"" userID) used in our LevelDB keys. */ std::string _userID; diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.mm b/Firestore/Source/Local/FSTLevelDBQueryCache.mm index 216ebce85a1..a1309edef9b 100644 --- a/Firestore/Source/Local/FSTLevelDBQueryCache.mm +++ b/Firestore/Source/Local/FSTLevelDBQueryCache.mm @@ -62,7 +62,8 @@ @interface FSTLevelDBQueryCache () @end @implementation FSTLevelDBQueryCache { - FSTLevelDB *_db; + // This instance is owned by FSTLevelDB; avoid a retain cycle. + __weak FSTLevelDB *_db; /** * The last received snapshot version. This is part of `metadata` but we store it separately to diff --git a/Firestore/core/src/firebase/firestore/remote/connectivity_monitor_apple.mm b/Firestore/core/src/firebase/firestore/remote/connectivity_monitor_apple.mm index 558b963536c..f77a3310283 100644 --- a/Firestore/core/src/firebase/firestore/remote/connectivity_monitor_apple.mm +++ b/Firestore/core/src/firebase/firestore/remote/connectivity_monitor_apple.mm @@ -77,7 +77,13 @@ void OnReachabilityChangedCallback(SCNetworkReachabilityRef /*unused*/, class ConnectivityMonitorApple : public ConnectivityMonitor { public: explicit ConnectivityMonitorApple(AsyncQueue* worker_queue) - : ConnectivityMonitor{worker_queue}, reachability_{CreateReachability()} { + : ConnectivityMonitor{worker_queue} { + reachability_ = CreateReachability(); + if (!reachability_) { + LOG_DEBUG("Failed to create reachability monitor."); + return; + } + SCNetworkReachabilityFlags flags; if (SCNetworkReachabilityGetFlags(reachability_, &flags)) { SetInitialStatus(ToNetworkStatus(flags)); @@ -108,10 +114,14 @@ explicit ConnectivityMonitorApple(AsyncQueue* worker_queue) } ~ConnectivityMonitorApple() { - bool success = - SCNetworkReachabilitySetDispatchQueue(reachability_, nullptr); - if (!success) { - LOG_DEBUG("Couldn't unset reachability queue"); + if (reachability_) { + bool success = + SCNetworkReachabilitySetDispatchQueue(reachability_, nullptr); + if (!success) { + LOG_DEBUG("Couldn't unset reachability queue"); + } + + CFRelease(reachability_); } } @@ -121,7 +131,7 @@ void OnReachabilityChanged(SCNetworkReachabilityFlags flags) { } private: - SCNetworkReachabilityRef reachability_; + SCNetworkReachabilityRef reachability_ = nil; }; namespace { diff --git a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h index 1ba7e347aef..8c7cbb951ba 100644 --- a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h +++ b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h @@ -185,7 +185,7 @@ class WatchStreamDelegate { void NotifyDelegateOnClose(const util::Status& status); private: - id delegate_; + __weak id delegate_; }; /** A C++ bridge that invokes methods on an `FSTWriteStreamDelegate`. */ @@ -202,7 +202,7 @@ class WriteStreamDelegate { void NotifyDelegateOnClose(const util::Status& status); private: - id delegate_; + __weak id delegate_; }; } // namespace bridge From f39cdf31eaa8c5535629743d92a05fd309c3afa0 Mon Sep 17 00:00:00 2001 From: rsgowman Date: Wed, 19 Dec 2018 12:45:57 -0500 Subject: [PATCH 21/34] Port DocumentState and UnknownDocument. (#2160) Part of heldwriteacks. Serialization work for this is largely deferred until after nanopb-master is merged with master. --- .../Firestore.xcodeproj/project.pbxproj | 28 ++++---- .../firestore/local/local_serializer.cc | 12 +++- .../firebase/firestore/model/CMakeLists.txt | 2 + .../src/firebase/firestore/model/document.cc | 6 +- .../src/firebase/firestore/model/document.h | 35 ++++++++-- .../firebase/firestore/model/maybe_document.h | 16 ++++- .../src/firebase/firestore/model/mutation.cc | 10 +-- .../firebase/firestore/model/no_document.cc | 7 +- .../firebase/firestore/model/no_document.h | 11 +++- .../firestore/model/unknown_document.cc | 32 +++++++++ .../firestore/model/unknown_document.h | 43 ++++++++++++ .../firebase/firestore/remote/serializer.cc | 8 ++- .../firebase/firestore/model/CMakeLists.txt | 1 - .../firebase/firestore/model/document_test.cc | 49 ++++++++------ .../firestore/model/maybe_document_test.cc | 66 ------------------- .../firebase/firestore/model/mutation_test.cc | 12 ++-- .../firestore/model/no_document_test.cc | 14 ++-- .../firestore/remote/serializer_test.cc | 9 ++- .../firebase/firestore/testutil/testutil.h | 14 ++-- 19 files changed, 230 insertions(+), 145 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/model/unknown_document.cc create mode 100644 Firestore/core/src/firebase/firestore/model/unknown_document.h delete mode 100644 Firestore/core/test/firebase/firestore/model/maybe_document_test.cc diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index edbdbad2c49..72a0bd9f734 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -187,7 +187,6 @@ AB380D04201BC6E400D97691 /* ordered_code_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB380D03201BC6E400D97691 /* ordered_code_test.cc */; }; AB38D93020236E21000A432D /* database_info_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB38D92E20235D22000A432D /* database_info_test.cc */; }; AB6B908420322E4D00CC290A /* document_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB6B908320322E4D00CC290A /* document_test.cc */; }; - AB6B908620322E6D00CC290A /* maybe_document_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB6B908520322E6D00CC290A /* maybe_document_test.cc */; }; AB6B908820322E8800CC290A /* no_document_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB6B908720322E8800CC290A /* no_document_test.cc */; }; AB7BAB342012B519001E0872 /* geo_point_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = AB7BAB332012B519001E0872 /* geo_point_test.cc */; }; ABA495BB202B7E80008A7851 /* snapshot_version_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = ABA495B9202B7E79008A7851 /* snapshot_version_test.cc */; }; @@ -203,7 +202,6 @@ B65D34A9203C995B0076A5E1 /* FIRTimestampTest.m in Sources */ = {isa = PBXBuildFile; fileRef = B65D34A7203C99090076A5E1 /* FIRTimestampTest.m */; }; B66D8996213609EE0086DA0C /* stream_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = B66D8995213609EE0086DA0C /* stream_test.mm */; }; B67BF449216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */ = {isa = PBXBuildFile; fileRef = B67BF448216EB43000CA9097 /* create_noop_connectivity_monitor.cc */; }; - B67BF44A216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */ = {isa = PBXBuildFile; fileRef = B67BF448216EB43000CA9097 /* create_noop_connectivity_monitor.cc */; }; B686F2AF2023DDEE0028D6BE /* field_path_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B686F2AD2023DDB20028D6BE /* field_path_test.cc */; }; B686F2B22025000D0028D6BE /* resource_path_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B686F2B02024FFD70028D6BE /* resource_path_test.cc */; }; B6BBE43121262CF400C6A53E /* grpc_stream_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6BBE42F21262CF400C6A53E /* grpc_stream_test.cc */; }; @@ -505,7 +503,6 @@ AB38D9342023966E000A432D /* credentials_provider_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = credentials_provider_test.cc; sourceTree = ""; }; AB38D93620239689000A432D /* empty_credentials_provider_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = empty_credentials_provider_test.cc; sourceTree = ""; }; AB6B908320322E4D00CC290A /* document_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = document_test.cc; sourceTree = ""; }; - AB6B908520322E6D00CC290A /* maybe_document_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = maybe_document_test.cc; sourceTree = ""; }; AB6B908720322E8800CC290A /* no_document_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = no_document_test.cc; sourceTree = ""; }; AB71064B201FA60300344F18 /* database_id_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = database_id_test.cc; sourceTree = ""; }; AB7BAB332012B519001E0872 /* geo_point_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = geo_point_test.cc; sourceTree = ""; }; @@ -665,12 +662,12 @@ 546854A720A3681B004BDBD5 /* remote */ = { isa = PBXGroup; children = ( - B6D964942163E63900EB9CFB /* grpc_unary_call_test.cc */, - B6D9649021544D4F00EB9CFB /* grpc_connection_test.cc */, - B6D964922154AB8F00EB9CFB /* grpc_streaming_reader_test.cc */, 546854A820A36867004BDBD5 /* datastore_test.mm */, B6D1B68420E2AB1A00B35856 /* exponential_backoff_test.cc */, + B6D9649021544D4F00EB9CFB /* grpc_connection_test.cc */, B6BBE42F21262CF400C6A53E /* grpc_stream_test.cc */, + B6D964922154AB8F00EB9CFB /* grpc_streaming_reader_test.cc */, + B6D964942163E63900EB9CFB /* grpc_unary_call_test.cc */, 61F72C5520BC48FD001A68CB /* serializer_test.cc */, B66D8995213609EE0086DA0C /* stream_test.mm */, ); @@ -680,10 +677,6 @@ 54740A561FC913EB00713A1A /* util */ = { isa = PBXGroup; children = ( - B60894F62170207100EBC644 /* fake_credentials_provider.cc */, - B60894F52170207100EBC644 /* fake_credentials_provider.h */, - B67BF448216EB43000CA9097 /* create_noop_connectivity_monitor.cc */, - B67BF447216EB42F00CA9097 /* create_noop_connectivity_monitor.h */, B6FB4680208EA0BE00554BA2 /* async_queue_libdispatch_test.mm */, B6FB4681208EA0BE00554BA2 /* async_queue_std_test.cc */, B6FB467B208E9A8200554BA2 /* async_queue_test.cc */, @@ -692,10 +685,14 @@ 54740A521FC913E500713A1A /* autoid_test.cc */, AB380D01201BC69F00D97691 /* bits_test.cc */, 548DB928200D59F600E00ABC /* comparison_test.cc */, + B67BF448216EB43000CA9097 /* create_noop_connectivity_monitor.cc */, + B67BF447216EB42F00CA9097 /* create_noop_connectivity_monitor.h */, B6FB4689208F9B9100554BA2 /* executor_libdispatch_test.mm */, B6FB4687208F9B9100554BA2 /* executor_std_test.cc */, B6FB4688208F9B9100554BA2 /* executor_test.cc */, B6FB468A208F9B9100554BA2 /* executor_test.h */, + B60894F62170207100EBC644 /* fake_credentials_provider.cc */, + B60894F52170207100EBC644 /* fake_credentials_provider.h */, F51859B394D01C0C507282F1 /* filesystem_test.cc */, B1A7E1959AF8141FA7E6B888 /* grpc_stream_tester.cc */, ED4B3E3EA0EBF3ED19A07060 /* grpc_stream_tester.h */, @@ -1044,7 +1041,6 @@ 549CCA5320A36E1F00BCEB75 /* field_mask_test.cc */, B686F2AD2023DDB20028D6BE /* field_path_test.cc */, AB356EF6200EA5EB0089B766 /* field_value_test.cc */, - AB6B908520322E6D00CC290A /* maybe_document_test.cc */, C8522DE226C467C54E6788D8 /* mutation_test.cc */, AB6B908720322E8800CC290A /* no_document_test.cc */, 549CCA5520A36E1F00BCEB75 /* precondition_test.cc */, @@ -1870,7 +1866,6 @@ 5467FB01203E5717009C9584 /* FIRFirestoreTests.mm in Sources */, 5492E052202154AB00B64F25 /* FIRGeoPointTests.mm in Sources */, 5492E059202154AB00B64F25 /* FIRQuerySnapshotTests.mm in Sources */, - B60894F72170207200EBC644 /* fake_credentials_provider.cc in Sources */, 5492E051202154AA00B64F25 /* FIRQueryTests.mm in Sources */, 5492E057202154AB00B64F25 /* FIRSnapshotMetadataTests.mm in Sources */, B65D34A9203C995B0076A5E1 /* FIRTimestampTest.m in Sources */, @@ -1905,7 +1900,6 @@ 5492E0A42021552D00B64F25 /* FSTMemoryQueryCacheTests.mm in Sources */, 5492E0A52021552D00B64F25 /* FSTMemoryRemoteDocumentCacheTests.mm in Sources */, 5492E03420213FFC00B64F25 /* FSTMemorySpecTests.mm in Sources */, - B6D964952163E63900EB9CFB /* grpc_unary_call_test.cc in Sources */, 5492E03220213FFC00B64F25 /* FSTMockDatastore.mm in Sources */, 5492E0AC2021552D00B64F25 /* FSTMutationQueueTests.mm in Sources */, 5492E0BE2021555100B64F25 /* FSTMutationTests.mm in Sources */, @@ -1935,6 +1929,7 @@ AB380D02201BC69F00D97691 /* bits_test.cc in Sources */, 618BBEA920B89AAC00B5BCE7 /* common.pb.cc in Sources */, 548DB929200D59F600E00ABC /* comparison_test.cc in Sources */, + B67BF449216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */, ABC1D7DC2023A04B00BA84F0 /* credentials_provider_test.cc in Sources */, ABE6637A201FA81900ED349A /* database_id_test.cc in Sources */, AB38D93020236E21000A432D /* database_info_test.cc in Sources */, @@ -1947,6 +1942,7 @@ B6FB468F208F9BAE00554BA2 /* executor_std_test.cc in Sources */, B6FB4690208F9BB300554BA2 /* executor_test.cc in Sources */, B6D1B68520E2AB1B00B35856 /* exponential_backoff_test.cc in Sources */, + B60894F72170207200EBC644 /* fake_credentials_provider.cc in Sources */, 549CCA5720A36E1F00BCEB75 /* field_mask_test.cc in Sources */, B686F2AF2023DDEE0028D6BE /* field_path_test.cc in Sources */, 54A0352620A3AED0003E0143 /* field_transform_test.mm in Sources */, @@ -1955,9 +1951,11 @@ ABC1D7E42024AFDE00BA84F0 /* firebase_credentials_provider_test.mm in Sources */, 618BBEAA20B89AAC00B5BCE7 /* firestore.pb.cc in Sources */, AB7BAB342012B519001E0872 /* geo_point_test.cc in Sources */, + B6D9649121544D4F00EB9CFB /* grpc_connection_test.cc in Sources */, B6BBE43121262CF400C6A53E /* grpc_stream_test.cc in Sources */, 333FCB7BB0C9986B5DF28FC8 /* grpc_stream_tester.cc in Sources */, B6D964932154AB8F00EB9CFB /* grpc_streaming_reader_test.cc in Sources */, + B6D964952163E63900EB9CFB /* grpc_unary_call_test.cc in Sources */, 73FE5066020EF9B2892C86BF /* hard_assert_test.cc in Sources */, 54511E8E209805F8005BD28F /* hashing_test.cc in Sources */, 618BBEB020B89AAC00B5BCE7 /* http.pb.cc in Sources */, @@ -1968,7 +1966,6 @@ 020AFD89BB40E5175838BB76 /* local_serializer_test.cc in Sources */, 54C2294F1FECABAE007D065B /* log_test.cc in Sources */, 618BBEA720B89AAC00B5BCE7 /* maybe_document.pb.cc in Sources */, - AB6B908620322E6D00CC290A /* maybe_document_test.cc in Sources */, 618BBEA820B89AAC00B5BCE7 /* mutation.pb.cc in Sources */, 32F022CB75AEE48CDDAF2982 /* mutation_test.cc in Sources */, 84DBE646DCB49305879D3500 /* nanopb_string_test.cc in Sources */, @@ -2001,9 +1998,7 @@ ABC1D7E12023A40C00BA84F0 /* token_test.cc in Sources */, 54A0352720A3AED0003E0143 /* transform_operations_test.mm in Sources */, 549CCA5120A36DBC00BCEB75 /* tree_sorted_map_test.cc in Sources */, - B6D9649121544D4F00EB9CFB /* grpc_connection_test.cc in Sources */, C80B10E79CDD7EF7843C321E /* type_traits_apple_test.mm in Sources */, - B67BF449216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */, ABC1D7DE2023A05300BA84F0 /* user_test.cc in Sources */, 618BBEAD20B89AAC00B5BCE7 /* write.pb.cc in Sources */, ); @@ -2041,7 +2036,6 @@ 5492E080202154EC00B64F25 /* FSTSmokeTests.mm in Sources */, 5492E07F202154EC00B64F25 /* FSTTransactionTests.mm in Sources */, 5492E0442021457E00B64F25 /* XCTestCase+Await.mm in Sources */, - B67BF44A216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */, EBFC611B1BF195D0EC710AF4 /* app_testing.mm in Sources */, CA989C0E6020C372A62B7062 /* testutil.cc in Sources */, ); diff --git a/Firestore/core/src/firebase/firestore/local/local_serializer.cc b/Firestore/core/src/firebase/firestore/local/local_serializer.cc index 97246d90d61..99154967460 100644 --- a/Firestore/core/src/firebase/firestore/local/local_serializer.cc +++ b/Firestore/core/src/firebase/firestore/local/local_serializer.cc @@ -64,8 +64,12 @@ void LocalSerializer::EncodeMaybeDocument( }); return; + case MaybeDocument::Type::UnknownDocument: + // TODO(rsgowman): Implement + abort(); + case MaybeDocument::Type::Unknown: - // TODO(rsgowman) + // TODO(rsgowman): Error handling abort(); } @@ -168,8 +172,12 @@ std::unique_ptr LocalSerializer::DecodeNoDocument( } if (!reader->status().ok()) return nullptr; + // TODO(rsgowman): Fix hardcoding of has_committed_mutations. + // Instead, we should grab this from the proto (see other ports). However, + // we'll defer until the nanopb-master gets merged to master. return absl::make_unique(rpc_serializer_.DecodeKey(name), - *std::move(version)); + *std::move(version), + /*has_committed_mutations=*/false); } void LocalSerializer::EncodeQueryData(Writer* writer, diff --git a/Firestore/core/src/firebase/firestore/model/CMakeLists.txt b/Firestore/core/src/firebase/firestore/model/CMakeLists.txt index cd8d7876f60..fd208c32e66 100644 --- a/Firestore/core/src/firebase/firestore/model/CMakeLists.txt +++ b/Firestore/core/src/firebase/firestore/model/CMakeLists.txt @@ -43,6 +43,8 @@ cc_library( snapshot_version.h transform_operations.h types.h + unknown_document.cc + unknown_document.h DEPENDS absl_optional absl_strings diff --git a/Firestore/core/src/firebase/firestore/model/document.cc b/Firestore/core/src/firebase/firestore/model/document.cc index 7adf684b241..06deb50576b 100644 --- a/Firestore/core/src/firebase/firestore/model/document.cc +++ b/Firestore/core/src/firebase/firestore/model/document.cc @@ -27,10 +27,10 @@ namespace model { Document::Document(FieldValue&& data, DocumentKey key, SnapshotVersion version, - bool has_local_mutations) + DocumentState document_state) : MaybeDocument(std::move(key), std::move(version)), data_(std::move(data)), - has_local_mutations_(has_local_mutations) { + document_state_(document_state) { set_type(Type::Document); HARD_ASSERT(FieldValue::Type::Object == data.type()); } @@ -41,7 +41,7 @@ bool Document::Equals(const MaybeDocument& other) const { } auto& other_doc = static_cast(other); return MaybeDocument::Equals(other) && - has_local_mutations_ == other_doc.has_local_mutations_ && + document_state_ == other_doc.document_state_ && data_ == other_doc.data_; } diff --git a/Firestore/core/src/firebase/firestore/model/document.h b/Firestore/core/src/firebase/firestore/model/document.h index 1b7cc1388f3..9afa327f64b 100644 --- a/Firestore/core/src/firebase/firestore/model/document.h +++ b/Firestore/core/src/firebase/firestore/model/document.h @@ -26,6 +26,23 @@ namespace firebase { namespace firestore { namespace model { +enum class DocumentState { + /** + * Local mutations applied via the mutation queue. Document is potentially + * inconsistent. + */ + kLocalMutations, + + /** + * Mutations applied based on a write acknowledgment. Document is potentially + * inconsistent. + */ + kCommittedMutations, + + /** No mutations applied. Document was sent to us by Watch. */ + kSynced, +}; + /** * Represents a document in Firestore with a key, version, data and whether the * data has local mutations applied to it. @@ -38,7 +55,7 @@ class Document : public MaybeDocument { Document(FieldValue&& data, DocumentKey key, SnapshotVersion version, - bool has_local_mutations); + DocumentState document_state); const FieldValue& data() const { return data_; @@ -48,8 +65,16 @@ class Document : public MaybeDocument { return data_.Get(path); } - bool has_local_mutations() const { - return has_local_mutations_; + bool HasLocalMutations() const { + return document_state_ == DocumentState::kLocalMutations; + } + + bool HasCommittedMutations() const { + return document_state_ == DocumentState::kCommittedMutations; + } + + bool HasPendingWrites() const override { + return HasLocalMutations() || HasCommittedMutations(); } protected: @@ -57,13 +82,13 @@ class Document : public MaybeDocument { private: FieldValue data_; // This is of type Object. - bool has_local_mutations_; + DocumentState document_state_; }; /** Compares against another Document. */ inline bool operator==(const Document& lhs, const Document& rhs) { return lhs.version() == rhs.version() && lhs.key() == rhs.key() && - lhs.has_local_mutations() == rhs.has_local_mutations() && + lhs.HasLocalMutations() == rhs.HasLocalMutations() && lhs.data() == rhs.data(); } diff --git a/Firestore/core/src/firebase/firestore/model/maybe_document.h b/Firestore/core/src/firebase/firestore/model/maybe_document.h index c2ffb86a0de..1039de19e44 100644 --- a/Firestore/core/src/firebase/firestore/model/maybe_document.h +++ b/Firestore/core/src/firebase/firestore/model/maybe_document.h @@ -35,12 +35,20 @@ class MaybeDocument { public: /** * All the different kinds of documents, including MaybeDocument and its - * subclasses. This is used to provide RTTI for documents. + * subclasses. This is used to provide RTTI for documents. See the docstrings + * of the subclasses for details. */ enum class Type { + // An unknown subclass of MaybeDocument. This should never happen. + // + // TODO(rsgowman): Since it's no longer possible to directly create + // MaybeDocument's, we can likely remove this value entirely. But + // investigate impact on the serializers first. Unknown, + Document, NoDocument, + UnknownDocument, }; MaybeDocument(DocumentKey key, SnapshotVersion version); @@ -66,6 +74,12 @@ class MaybeDocument { return version_; } + /** + * Whether this document has a local mutation applied that has not yet been + * acknowledged by Watch. + */ + virtual bool HasPendingWrites() const = 0; + protected: // Only allow subclass to set their types. void set_type(Type type) { diff --git a/Firestore/core/src/firebase/firestore/model/mutation.cc b/Firestore/core/src/firebase/firestore/model/mutation.cc index a2577221ce7..17bbe0fc421 100644 --- a/Firestore/core/src/firebase/firestore/model/mutation.cc +++ b/Firestore/core/src/firebase/firestore/model/mutation.cc @@ -65,7 +65,7 @@ std::shared_ptr SetMutation::ApplyToLocalView( SnapshotVersion version = GetPostMutationVersion(maybe_doc.get()); return absl::make_unique(FieldValue(value_), key(), version, - /*has_local_mutations=*/true); + DocumentState::kLocalMutations); } PatchMutation::PatchMutation(DocumentKey&& key, @@ -84,17 +84,13 @@ std::shared_ptr PatchMutation::ApplyToLocalView( VerifyKeyMatches(maybe_doc.get()); if (!precondition().IsValidFor(maybe_doc.get())) { - if (maybe_doc) { - return absl::make_unique(maybe_doc->key(), - maybe_doc->version()); - } - return nullptr; + return maybe_doc; } SnapshotVersion version = GetPostMutationVersion(maybe_doc.get()); FieldValue new_data = PatchDocument(maybe_doc.get()); return absl::make_unique(std::move(new_data), key(), version, - /*has_local_mutations=*/true); + DocumentState::kLocalMutations); } FieldValue PatchMutation::PatchDocument(const MaybeDocument* maybe_doc) const { diff --git a/Firestore/core/src/firebase/firestore/model/no_document.cc b/Firestore/core/src/firebase/firestore/model/no_document.cc index 98cb428843b..5f348af4ea3 100644 --- a/Firestore/core/src/firebase/firestore/model/no_document.cc +++ b/Firestore/core/src/firebase/firestore/model/no_document.cc @@ -22,8 +22,11 @@ namespace firebase { namespace firestore { namespace model { -NoDocument::NoDocument(DocumentKey key, SnapshotVersion version) - : MaybeDocument(std::move(key), std::move(version)) { +NoDocument::NoDocument(DocumentKey key, + SnapshotVersion version, + bool has_committed_mutations) + : MaybeDocument(std::move(key), std::move(version)), + has_committed_mutations_(has_committed_mutations) { set_type(Type::NoDocument); } diff --git a/Firestore/core/src/firebase/firestore/model/no_document.h b/Firestore/core/src/firebase/firestore/model/no_document.h index 7cfd47c66cc..da2cac0f4e6 100644 --- a/Firestore/core/src/firebase/firestore/model/no_document.h +++ b/Firestore/core/src/firebase/firestore/model/no_document.h @@ -26,7 +26,16 @@ namespace model { /** Represents that no documents exists for the key at the given version. */ class NoDocument : public MaybeDocument { public: - NoDocument(DocumentKey key, SnapshotVersion version); + NoDocument(DocumentKey key, + SnapshotVersion version, + bool has_committed_mutations); + + bool HasPendingWrites() const override { + return has_committed_mutations_; + } + + private: + bool has_committed_mutations_; }; } // namespace model diff --git a/Firestore/core/src/firebase/firestore/model/unknown_document.cc b/Firestore/core/src/firebase/firestore/model/unknown_document.cc new file mode 100644 index 00000000000..ea42c577c6f --- /dev/null +++ b/Firestore/core/src/firebase/firestore/model/unknown_document.cc @@ -0,0 +1,32 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/model/unknown_document.h" + +#include + +namespace firebase { +namespace firestore { +namespace model { + +UnknownDocument::UnknownDocument(DocumentKey key, SnapshotVersion version) + : MaybeDocument(std::move(key), std::move(version)) { + set_type(Type::UnknownDocument); +} + +} // namespace model +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/model/unknown_document.h b/Firestore/core/src/firebase/firestore/model/unknown_document.h new file mode 100644 index 00000000000..fb031c74320 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/model/unknown_document.h @@ -0,0 +1,43 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_UNKNOWN_DOCUMENT_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_UNKNOWN_DOCUMENT_H_ + +#include "Firestore/core/src/firebase/firestore/model/maybe_document.h" + +namespace firebase { +namespace firestore { +namespace model { + +/** + * A class representing an existing document whose data is unknown (e.g. a + * document that was updated without a known base document). + */ +class UnknownDocument : public MaybeDocument { + public: + UnknownDocument(DocumentKey key, SnapshotVersion version); + + bool HasPendingWrites() const override { + return true; + } +}; + +} // namespace model +} // namespace firestore +} // namespace firebase + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_UNKNOWN_DOCUMENT_H_ diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc index f588133c126..4fd71c10737 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.cc +++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc @@ -48,6 +48,7 @@ using firebase::firestore::core::Query; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::Document; using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentState; using firebase::firestore::model::FieldValue; using firebase::firestore::model::MaybeDocument; using firebase::firestore::model::NoDocument; @@ -497,8 +498,9 @@ std::unique_ptr Serializer::DecodeBatchGetDocumentsResponse( } else if (found != nullptr) { return found; } else if (!missing.empty()) { - return absl::make_unique( - DecodeKey(missing), SnapshotVersion{*std::move(read_time)}); + return absl::make_unique(DecodeKey(missing), + SnapshotVersion{*std::move(read_time)}, + /*has_committed_mutations=*/false); } else { reader->Fail( "Invalid BatchGetDocumentsReponse message: " @@ -551,7 +553,7 @@ std::unique_ptr Serializer::DecodeDocument(Reader* reader) const { if (!reader->status().ok()) return nullptr; return absl::make_unique(FieldValue::FromMap(fields_internal), DecodeKey(name), *std::move(version), - /*has_local_modifications=*/false); + DocumentState::kSynced); } void Serializer::EncodeQueryTarget(Writer* writer, diff --git a/Firestore/core/test/firebase/firestore/model/CMakeLists.txt b/Firestore/core/test/firebase/firestore/model/CMakeLists.txt index 9d872d49a01..e90c0c73d35 100644 --- a/Firestore/core/test/firebase/firestore/model/CMakeLists.txt +++ b/Firestore/core/test/firebase/firestore/model/CMakeLists.txt @@ -21,7 +21,6 @@ cc_test( field_mask_test.cc field_path_test.cc field_value_test.cc - maybe_document_test.cc mutation_test.cc no_document_test.cc precondition_test.cc diff --git a/Firestore/core/test/firebase/firestore/model/document_test.cc b/Firestore/core/test/firebase/firestore/model/document_test.cc index 5955b854312..ba62782889b 100644 --- a/Firestore/core/test/firebase/firestore/model/document_test.cc +++ b/Firestore/core/test/firebase/firestore/model/document_test.cc @@ -16,6 +16,8 @@ #include "Firestore/core/src/firebase/firestore/model/document.h" +#include "Firestore/core/src/firebase/firestore/model/unknown_document.h" + #include "absl/strings/string_view.h" #include "gtest/gtest.h" @@ -28,46 +30,55 @@ namespace { inline Document MakeDocument(const absl::string_view data, const absl::string_view path, const Timestamp& timestamp, - bool has_local_mutations) { + DocumentState document_state) { return Document( FieldValue::FromMap({{"field", FieldValue::FromString(data.data())}}), DocumentKey::FromPathString(path.data()), SnapshotVersion(timestamp), - has_local_mutations); + document_state); } } // anonymous namespace TEST(Document, Getter) { - const Document& doc = - MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true); + const Document& doc = MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations); EXPECT_EQ(MaybeDocument::Type::Document, doc.type()); EXPECT_EQ(FieldValue::FromMap({{"field", FieldValue::FromString("foo")}}), doc.data()); EXPECT_EQ(DocumentKey::FromPathString("i/am/a/path"), doc.key()); EXPECT_EQ(SnapshotVersion(Timestamp(123, 456)), doc.version()); - EXPECT_TRUE(doc.has_local_mutations()); + EXPECT_TRUE(doc.HasLocalMutations()); } TEST(Document, Comparison) { - EXPECT_EQ(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true), - MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true)); - EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true), - MakeDocument("bar", "i/am/a/path", Timestamp(123, 456), true)); - EXPECT_NE( - MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true), - MakeDocument("foo", "i/am/another/path", Timestamp(123, 456), true)); - EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true), - MakeDocument("foo", "i/am/a/path", Timestamp(456, 123), true)); - EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), true), - MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), false)); + EXPECT_EQ(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations), + MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations)); + EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations), + MakeDocument("bar", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations)); + EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations), + MakeDocument("foo", "i/am/another/path", Timestamp(123, 456), + DocumentState::kLocalMutations)); + EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations), + MakeDocument("foo", "i/am/a/path", Timestamp(456, 123), + DocumentState::kLocalMutations)); + EXPECT_NE(MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kLocalMutations), + MakeDocument("foo", "i/am/a/path", Timestamp(123, 456), + DocumentState::kSynced)); // Document and MaybeDocument will not equal. In particular, Document and // NoDocument will not equal, which I won't test here. EXPECT_NE(Document(FieldValue::FromMap({}), DocumentKey::FromPathString("same/path"), - SnapshotVersion(Timestamp()), false), - MaybeDocument(DocumentKey::FromPathString("same/path"), - SnapshotVersion(Timestamp()))); + SnapshotVersion(Timestamp()), DocumentState::kSynced), + UnknownDocument(DocumentKey::FromPathString("same/path"), + SnapshotVersion(Timestamp()))); } } // namespace model diff --git a/Firestore/core/test/firebase/firestore/model/maybe_document_test.cc b/Firestore/core/test/firebase/firestore/model/maybe_document_test.cc deleted file mode 100644 index 70ae319624f..00000000000 --- a/Firestore/core/test/firebase/firestore/model/maybe_document_test.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Firestore/core/src/firebase/firestore/model/maybe_document.h" - -#include "absl/strings/string_view.h" -#include "gtest/gtest.h" - -namespace firebase { -namespace firestore { -namespace model { - -namespace { - -inline MaybeDocument MakeMaybeDocument(const absl::string_view path, - const Timestamp& timestamp) { - return MaybeDocument(DocumentKey::FromPathString(path.data()), - SnapshotVersion(timestamp)); -} - -inline bool operator<(const MaybeDocument& lhs, const MaybeDocument& rhs) { - static const DocumentKeyComparator less; - return less(lhs, rhs); -} - -} // anonymous namespace - -TEST(MaybeDocument, Getter) { - const MaybeDocument& doc = - MakeMaybeDocument("i/am/a/path", Timestamp(123, 456)); - EXPECT_EQ(MaybeDocument::Type::Unknown, doc.type()); - EXPECT_EQ(DocumentKey::FromPathString("i/am/a/path"), doc.key()); - EXPECT_EQ(SnapshotVersion(Timestamp(123, 456)), doc.version()); -} - -TEST(MaybeDocument, Comparison) { - EXPECT_TRUE(MakeMaybeDocument("root/123", Timestamp(456, 123)) < - MakeMaybeDocument("root/456", Timestamp(123, 456))); - // MaybeDocument comparison is purely key-based. - EXPECT_FALSE(MakeMaybeDocument("root/123", Timestamp(111, 111)) < - MakeMaybeDocument("root/123", Timestamp(222, 222))); - - EXPECT_EQ(MakeMaybeDocument("root/123", Timestamp(456, 123)), - MakeMaybeDocument("root/123", Timestamp(456, 123))); - EXPECT_NE(MakeMaybeDocument("root/123", Timestamp(456, 123)), - MakeMaybeDocument("root/456", Timestamp(456, 123))); - EXPECT_NE(MakeMaybeDocument("root/123", Timestamp(456, 123)), - MakeMaybeDocument("root/123", Timestamp(123, 456))); -} - -} // namespace model -} // namespace firestore -} // namespace firebase diff --git a/Firestore/core/test/firebase/firestore/model/mutation_test.cc b/Firestore/core/test/firebase/firestore/model/mutation_test.cc index fd0e0b8ccad..cfd2a7fa62e 100644 --- a/Firestore/core/test/firebase/firestore/model/mutation_test.cc +++ b/Firestore/core/test/firebase/firestore/model/mutation_test.cc @@ -47,7 +47,7 @@ TEST(Mutation, AppliesSetsToDocuments) { ASSERT_EQ(set_doc->type(), MaybeDocument::Type::Document); EXPECT_EQ(*set_doc.get(), Doc("collection/key", 0, {{"bar", FieldValue::FromString("bar-value")}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } TEST(Mutation, AppliesPatchToDocuments) { @@ -68,7 +68,7 @@ TEST(Mutation, AppliesPatchToDocuments) { {{"foo", FieldValue::FromMap( {{"bar", FieldValue::FromString("new-bar-value")}})}, {"baz", FieldValue::FromString("baz-value")}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } TEST(Mutation, AppliesPatchWithMergeToDocuments) { @@ -85,7 +85,7 @@ TEST(Mutation, AppliesPatchWithMergeToDocuments) { Doc("collection/key", 0, {{"foo", FieldValue::FromMap( {{"bar", FieldValue::FromString("new-bar-value")}})}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } TEST(Mutation, AppliesPatchToNullDocWithMergeToDocuments) { @@ -102,7 +102,7 @@ TEST(Mutation, AppliesPatchToNullDocWithMergeToDocuments) { Doc("collection/key", 0, {{"foo", FieldValue::FromMap( {{"bar", FieldValue::FromString("new-bar-value")}})}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } TEST(Mutation, DeletesValuesFromTheFieldMask) { @@ -122,7 +122,7 @@ TEST(Mutation, DeletesValuesFromTheFieldMask) { Doc("collection/key", 0, {{"foo", FieldValue::FromMap( {{"baz", FieldValue::FromString("baz-value")}})}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } TEST(Mutation, PatchesPrimitiveValue) { @@ -143,7 +143,7 @@ TEST(Mutation, PatchesPrimitiveValue) { {{"foo", FieldValue::FromMap( {{"bar", FieldValue::FromString("new-bar-value")}})}, {"baz", FieldValue::FromString("baz-value")}}, - /*has_local_mutations=*/true)); + DocumentState::kLocalMutations)); } } // namespace model diff --git a/Firestore/core/test/firebase/firestore/model/no_document_test.cc b/Firestore/core/test/firebase/firestore/model/no_document_test.cc index 825820f068c..974ddbf3a31 100644 --- a/Firestore/core/test/firebase/firestore/model/no_document_test.cc +++ b/Firestore/core/test/firebase/firestore/model/no_document_test.cc @@ -16,6 +16,8 @@ #include "Firestore/core/src/firebase/firestore/model/no_document.h" +#include "Firestore/core/src/firebase/firestore/model/unknown_document.h" + #include "absl/strings/string_view.h" #include "gtest/gtest.h" @@ -28,7 +30,8 @@ namespace { inline NoDocument MakeNoDocument(const absl::string_view path, const Timestamp& timestamp) { return NoDocument(DocumentKey::FromPathString(path.data()), - SnapshotVersion(timestamp)); + SnapshotVersion(timestamp), + /*has_committed_mutations=*/false); } } // anonymous namespace @@ -39,11 +42,12 @@ TEST(NoDocument, Getter) { EXPECT_EQ(DocumentKey::FromPathString("i/am/a/path"), doc.key()); EXPECT_EQ(SnapshotVersion(Timestamp(123, 456)), doc.version()); - // NoDocument and MaybeDocument will not equal. + // NoDocument and UnknownDocument will not equal. EXPECT_NE(NoDocument(DocumentKey::FromPathString("same/path"), - SnapshotVersion(Timestamp())), - MaybeDocument(DocumentKey::FromPathString("same/path"), - SnapshotVersion(Timestamp()))); + SnapshotVersion(Timestamp()), + /*has_committed_mutations=*/false), + UnknownDocument(DocumentKey::FromPathString("same/path"), + SnapshotVersion(Timestamp()))); } } // namespace model diff --git a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc index 483bcb7cf3d..4250388911f 100644 --- a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc +++ b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc @@ -357,6 +357,12 @@ class SerializerTest : public ::testing::Test { case MaybeDocument::Type::NoDocument: EXPECT_FALSE(value.has_value()); break; + case MaybeDocument::Type::UnknownDocument: + // TODO(rsgowman): implement. + // In particular, since this statement isn't hit, it implies a missing + // test for UnknownDocument. However, we'll defer that until after + // nanopb-master is merged to master. + abort(); case MaybeDocument::Type::Unknown: FAIL() << "We somehow created an invalid model object"; } @@ -888,7 +894,8 @@ TEST_F(SerializerTest, // Ensure the decoded model is as expected. NoDocument expected_model = - NoDocument(Key("one/two"), SnapshotVersion::None()); + NoDocument(Key("one/two"), SnapshotVersion::None(), + /*has_committed_mutations=*/false); EXPECT_EQ(expected_model, *actual_model); } diff --git a/Firestore/core/test/firebase/firestore/testutil/testutil.h b/Firestore/core/test/firebase/firestore/testutil/testutil.h index 4f35472f768..ff2da5a6e1d 100644 --- a/Firestore/core/test/firebase/firestore/testutil/testutil.h +++ b/Firestore/core/test/firebase/firestore/testutil/testutil.h @@ -76,16 +76,18 @@ inline model::SnapshotVersion Version(int64_t version) { return model::SnapshotVersion{Timestamp::FromTimePoint(timepoint)}; } -inline model::Document Doc(absl::string_view key, - int64_t version = 0, - const model::ObjectValue::Map& data = {}, - bool has_local_mutations = false) { +inline model::Document Doc( + absl::string_view key, + int64_t version = 0, + const model::ObjectValue::Map& data = {}, + model::DocumentState document_state = model::DocumentState::kSynced) { return model::Document{model::FieldValue::FromMap(data), Key(key), - Version(version), has_local_mutations}; + Version(version), document_state}; } inline model::NoDocument DeletedDoc(absl::string_view key, int64_t version) { - return model::NoDocument{Key(key), Version(version)}; + return model::NoDocument{Key(key), Version(version), + /*has_committed_mutations=*/false}; } inline core::RelationFilter::Operator OperatorFromString(absl::string_view s) { From 65f27099eb7e2357a1250a42c8f99013bed25a1f Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Wed, 19 Dec 2018 14:22:34 -0800 Subject: [PATCH 22/34] Port FSTMemoryQueryCache to C++ (#2197) --- Firestore/Source/Local/FSTMemoryQueryCache.mm | 100 +++---------- .../firestore/local/memory_query_cache.h | 123 ++++++++++++++++ .../firestore/local/memory_query_cache.mm | 137 ++++++++++++++++++ 3 files changed, 283 insertions(+), 77 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/local/memory_query_cache.h create mode 100644 Firestore/core/src/firebase/firestore/local/memory_query_cache.mm diff --git a/Firestore/Source/Local/FSTMemoryQueryCache.mm b/Firestore/Source/Local/FSTMemoryQueryCache.mm index 44bf33f7458..0708ecd45c3 100644 --- a/Firestore/Source/Local/FSTMemoryQueryCache.mm +++ b/Firestore/Source/Local/FSTMemoryQueryCache.mm @@ -18,6 +18,7 @@ #import +#include #include #import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" @@ -26,9 +27,12 @@ #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Local/FSTReferenceSet.h" +#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" +#include "absl/memory/memory.h" +using firebase::firestore::local::MemoryQueryCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; using firebase::firestore::model::ListenSequenceNumber; @@ -37,33 +41,13 @@ NS_ASSUME_NONNULL_BEGIN -@interface FSTMemoryQueryCache () - -/** Maps a query to the data about that query. */ -@property(nonatomic, strong, readonly) NSMutableDictionary *queries; - -/** A ordered bidirectional mapping between documents and the remote target IDs. */ -@property(nonatomic, strong, readonly) FSTReferenceSet *references; - -/** The highest numbered target ID encountered. */ -@property(nonatomic, assign) TargetId highestTargetID; - -@property(nonatomic, assign) ListenSequenceNumber highestListenSequenceNumber; - -@end - @implementation FSTMemoryQueryCache { - FSTMemoryPersistence *_persistence; - /** The last received snapshot version. */ - SnapshotVersion _lastRemoteSnapshotVersion; + std::unique_ptr _cache; } - (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence { if (self = [super init]) { - _persistence = persistence; - _queries = [NSMutableDictionary dictionary]; - _references = [[FSTReferenceSet alloc] init]; - _lastRemoteSnapshotVersion = SnapshotVersion::None(); + _cache = absl::make_unique(persistence); } return self; } @@ -72,112 +56,74 @@ - (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence { #pragma mark Query tracking - (TargetId)highestTargetID { - return _highestTargetID; + return _cache->highest_target_id(); } - (ListenSequenceNumber)highestListenSequenceNumber { - return _highestListenSequenceNumber; + return _cache->highest_listen_sequence_number(); } - (const SnapshotVersion &)lastRemoteSnapshotVersion { - return _lastRemoteSnapshotVersion; + return _cache->last_remote_snapshot_version(); } - (void)setLastRemoteSnapshotVersion:(SnapshotVersion)snapshotVersion { - _lastRemoteSnapshotVersion = std::move(snapshotVersion); + _cache->set_last_remote_snapshot_version(std::move(snapshotVersion)); } - (void)addQueryData:(FSTQueryData *)queryData { - self.queries[queryData.query] = queryData; - if (queryData.targetID > self.highestTargetID) { - self.highestTargetID = queryData.targetID; - } - if (queryData.sequenceNumber > self.highestListenSequenceNumber) { - self.highestListenSequenceNumber = queryData.sequenceNumber; - } + _cache->AddTarget(queryData); } - (void)updateQueryData:(FSTQueryData *)queryData { - self.queries[queryData.query] = queryData; - if (queryData.targetID > self.highestTargetID) { - self.highestTargetID = queryData.targetID; - } - if (queryData.sequenceNumber > self.highestListenSequenceNumber) { - self.highestListenSequenceNumber = queryData.sequenceNumber; - } + _cache->UpdateTarget(queryData); } - (int32_t)count { - return (int32_t)[self.queries count]; + return _cache->count(); } - (void)removeQueryData:(FSTQueryData *)queryData { - [self.queries removeObjectForKey:queryData.query]; - [self.references removeReferencesForID:queryData.targetID]; + _cache->RemoveTarget(queryData); } - (nullable FSTQueryData *)queryDataForQuery:(FSTQuery *)query { - return self.queries[query]; + return _cache->GetTarget(query); } - (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - [self.queries - enumerateKeysAndObjectsUsingBlock:^(FSTQuery *key, FSTQueryData *queryData, BOOL *stop) { - block(queryData, stop); - }]; + _cache->EnumerateTargets(block); } - (int)removeQueriesThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber liveQueries:(NSDictionary *)liveQueries { - NSMutableArray *toRemove = [NSMutableArray array]; - [self.queries - enumerateKeysAndObjectsUsingBlock:^(FSTQuery *query, FSTQueryData *queryData, BOOL *stop) { - if (queryData.sequenceNumber <= sequenceNumber) { - if (liveQueries[@(queryData.targetID)] == nil) { - [toRemove addObject:query]; - [self.references removeReferencesForID:queryData.targetID]; - } - } - }]; - [self.queries removeObjectsForKeys:toRemove]; - return (int)[toRemove count]; + return _cache->RemoveTargets(sequenceNumber, liveQueries); } #pragma mark Reference tracking - (void)addMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - [self.references addReferencesToKeys:keys forID:targetID]; - for (const DocumentKey &key : keys) { - [_persistence.referenceDelegate addReference:key]; - } + _cache->AddMatchingKeys(keys, targetID); } - (void)removeMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - [self.references removeReferencesToKeys:keys forID:targetID]; - for (const DocumentKey &key : keys) { - [_persistence.referenceDelegate removeReference:key]; - } + _cache->RemoveMatchingKeys(keys, targetID); } - (void)removeMatchingKeysForTargetID:(TargetId)targetID { - [self.references removeReferencesForID:targetID]; + _cache->RemoveAllKeysForTarget(targetID); } - (DocumentKeySet)matchingKeysForTargetID:(TargetId)targetID { - return [self.references referencedKeysForID:targetID]; + return _cache->GetMatchingKeys(targetID); } - (BOOL)containsKey:(const firebase::firestore::model::DocumentKey &)key { - return [self.references containsKey:key]; + return _cache->Contains(key); } - (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer { - __block size_t count = 0; - [self.queries - enumerateKeysAndObjectsUsingBlock:^(FSTQuery *key, FSTQueryData *queryData, BOOL *stop) { - count += [[serializer encodedQueryData:queryData] serializedSize]; - }]; - return count; + return _cache->CalculateByteSize(serializer); } @end diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h new file mode 100644 index 00000000000..83d99af4d1b --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h @@ -0,0 +1,123 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_QUERY_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_QUERY_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#import + +#include +#include + +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" + +@class FSTLocalSerializer; +@class FSTMemoryPersistence; +@class FSTQuery; +@class FSTQueryData; +@class FSTReferenceSet; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +typedef void (^TargetEnumerator)(FSTQueryData*, BOOL*); + +class MemoryQueryCache { + public: + explicit MemoryQueryCache(FSTMemoryPersistence* persistence); + + // Target-related methods + void AddTarget(FSTQueryData* query_data); + + void UpdateTarget(FSTQueryData* query_data); + + void RemoveTarget(FSTQueryData* query_data); + + FSTQueryData* _Nullable GetTarget(FSTQuery* query); + + void EnumerateTargets(TargetEnumerator block); + + int RemoveTargets(model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets); + + // Key-related methods + void AddMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id); + + void RemoveMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id); + + void RemoveAllKeysForTarget(model::TargetId target_id); + + model::DocumentKeySet GetMatchingKeys(model::TargetId target_id); + + bool Contains(const model::DocumentKey& key); + + // Other methods and accessors + size_t CalculateByteSize(FSTLocalSerializer* serializer); + + int32_t count() const { + return static_cast([queries_ count]); + } + + model::ListenSequenceNumber highest_listen_sequence_number() const { + return highest_listen_sequence_number_; + } + + model::TargetId highest_target_id() const { + return highest_target_id_; + } + + const model::SnapshotVersion& last_remote_snapshot_version() const { + return last_remote_snapshot_version_; + } + + void set_last_remote_snapshot_version(model::SnapshotVersion version) { + last_remote_snapshot_version_ = std::move(version); + } + + private: + FSTMemoryPersistence* persistence_; + /** The highest sequence number encountered */ + model::ListenSequenceNumber highest_listen_sequence_number_; + /** The highest numbered target ID encountered. */ + model::TargetId highest_target_id_; + /** The last received snapshot version. */ + model::SnapshotVersion last_remote_snapshot_version_; + + /** Maps a query to the data about that query. */ + NSMutableDictionary* queries_; + /** A ordered bidirectional mapping between documents and the remote target + * IDs. */ + FSTReferenceSet* references_; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_MEMORY_QUERY_CACHE_H_ diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm new file mode 100644 index 00000000000..6d0c1ba0b80 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm @@ -0,0 +1,137 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" +#import + +#import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" +#import "Firestore/Source/Core/FSTQuery.h" +#import "Firestore/Source/Local/FSTMemoryPersistence.h" +#import "Firestore/Source/Local/FSTQueryData.h" +#import "Firestore/Source/Local/FSTReferenceSet.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" + +using firebase::firestore::model::DocumentKey; +using firebase::firestore::model::DocumentKeySet; +using firebase::firestore::model::ListenSequenceNumber; +using firebase::firestore::model::SnapshotVersion; +using firebase::firestore::model::TargetId; + +namespace firebase { +namespace firestore { +namespace local { + +NS_ASSUME_NONNULL_BEGIN + +MemoryQueryCache::MemoryQueryCache(FSTMemoryPersistence* persistence) + : persistence_(persistence), + highest_listen_sequence_number_(ListenSequenceNumber(0)), + highest_target_id_(TargetId(0)), + last_remote_snapshot_version_(SnapshotVersion::None()), + queries_([NSMutableDictionary dictionary]), + references_([[FSTReferenceSet alloc] init]) { +} + +void MemoryQueryCache::AddTarget(FSTQueryData* query_data) { + queries_[query_data.query] = query_data; + if (query_data.targetID > highest_target_id_) { + highest_target_id_ = query_data.targetID; + } + if (query_data.sequenceNumber > highest_listen_sequence_number_) { + highest_listen_sequence_number_ = query_data.sequenceNumber; + } +} + +void MemoryQueryCache::UpdateTarget(FSTQueryData* query_data) { + // For the memory query cache, adds and updates are treated the same. + AddTarget(query_data); +} + +void MemoryQueryCache::RemoveTarget(FSTQueryData* query_data) { + [queries_ removeObjectForKey:query_data.query]; + [references_ removeReferencesForID:query_data.targetID]; +} + +FSTQueryData* _Nullable MemoryQueryCache::GetTarget(FSTQuery* query) { + return queries_[query]; +} + +void MemoryQueryCache::EnumerateTargets(TargetEnumerator block) { + [queries_ enumerateKeysAndObjectsUsingBlock:^( + FSTQuery* query, FSTQueryData* query_data, BOOL* stop) { + block(query_data, stop); + }]; +} + +int MemoryQueryCache::RemoveTargets( + model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets) { + NSMutableArray* toRemove = [NSMutableArray array]; + [queries_ enumerateKeysAndObjectsUsingBlock:^( + FSTQuery* query, FSTQueryData* queryData, BOOL* stop) { + if (queryData.sequenceNumber <= upper_bound) { + if (live_targets[@(queryData.targetID)] == nil) { + [toRemove addObject:query]; + [references_ removeReferencesForID:queryData.targetID]; + } + } + }]; + [queries_ removeObjectsForKeys:toRemove]; + return (int)[toRemove count]; +} + +void MemoryQueryCache::AddMatchingKeys(const DocumentKeySet& keys, + TargetId target_id) { + [references_ addReferencesToKeys:keys forID:target_id]; + for (const DocumentKey& key : keys) { + [persistence_.referenceDelegate addReference:key]; + } +} + +void MemoryQueryCache::RemoveMatchingKeys(const DocumentKeySet& keys, + TargetId target_id) { + [references_ removeReferencesToKeys:keys forID:target_id]; + for (const DocumentKey& key : keys) { + [persistence_.referenceDelegate removeReference:key]; + } +} + +void MemoryQueryCache::RemoveAllKeysForTarget(TargetId target_id) { + [references_ removeReferencesForID:target_id]; +} + +DocumentKeySet MemoryQueryCache::GetMatchingKeys(TargetId target_id) { + return [references_ referencedKeysForID:target_id]; +} + +bool MemoryQueryCache::Contains(const DocumentKey& key) { + return [references_ containsKey:key]; +} + +size_t MemoryQueryCache::CalculateByteSize(FSTLocalSerializer* serializer) { + __block size_t count = 0; + [queries_ enumerateKeysAndObjectsUsingBlock:^( + FSTQuery* query, FSTQueryData* query_data, BOOL* stop) { + count += [[serializer encodedQueryData:query_data] serializedSize]; + }]; + return count; +} + +NS_ASSUME_NONNULL_END + +} // namespace local +} // namespace firestore +} // namespace firebase \ No newline at end of file From 7415a326aae8202162e24a4955391213ecda5bea Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Thu, 20 Dec 2018 15:14:36 -0800 Subject: [PATCH 23/34] Port FSTLevelDBQueryCache to C++ (#2202) * Port FSTLevelDBQueryCache to C++ --- Firestore/Source/Local/FSTLevelDB.mm | 1 + Firestore/Source/Local/FSTLevelDBQueryCache.h | 6 - .../Source/Local/FSTLevelDBQueryCache.mm | 328 ++------------- Firestore/Source/Local/FSTMemoryQueryCache.mm | 6 +- .../firestore/local/leveldb_query_cache.h | 143 +++++++ .../firestore/local/leveldb_query_cache.mm | 387 ++++++++++++++++++ .../firestore/local/memory_query_cache.h | 10 +- .../firestore/local/memory_query_cache.mm | 8 + 8 files changed, 569 insertions(+), 320 deletions(-) create mode 100644 Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h create mode 100644 Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index 04caa3830d3..365b36fe5a5 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -345,6 +345,7 @@ - (instancetype)initWithLevelDB:(std::unique_ptr)db [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self lruParams:lruParams]; _transactionRunner.SetBackingPersistence(self); _users = std::move(users); + // TODO(gsoltis): set up a leveldb transaction for these operations. [_queryCache start]; [_referenceDelegate start]; } diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.h b/Firestore/Source/Local/FSTLevelDBQueryCache.h index 35e52216592..f27ff8fcb03 100644 --- a/Firestore/Source/Local/FSTLevelDBQueryCache.h +++ b/Firestore/Source/Local/FSTLevelDBQueryCache.h @@ -38,12 +38,6 @@ NS_ASSUME_NONNULL_BEGIN */ + (nullable FSTPBTargetGlobal *)readTargetMetadataFromDB:(leveldb::DB *)db; -/** - * Retrieves the global singleton metadata row using the given transaction, if it exists. - */ -+ (nullable FSTPBTargetGlobal *)readTargetMetadataWithTransaction: - (firebase::firestore::local::LevelDbTransaction *)transaction; - - (instancetype)init NS_UNAVAILABLE; /** diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.mm b/Firestore/Source/Local/FSTLevelDBQueryCache.mm index a1309edef9b..800711d5912 100644 --- a/Firestore/Source/Local/FSTLevelDBQueryCache.mm +++ b/Firestore/Source/Local/FSTLevelDBQueryCache.mm @@ -27,10 +27,11 @@ #import "Firestore/Source/Local/FSTQueryData.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" -#include "Firestore/core/src/firebase/firestore/util/string_apple.h" +#include "absl/memory/memory.h" #include "absl/strings/match.h" NS_ASSUME_NONNULL_BEGIN @@ -38,6 +39,7 @@ using firebase::firestore::local::DescribeKey; using firebase::firestore::local::LevelDbDocumentTargetKey; using firebase::firestore::local::LevelDbQueryTargetKey; +using firebase::firestore::local::LevelDbQueryCache; using firebase::firestore::local::LevelDbTargetDocumentKey; using firebase::firestore::local::LevelDbTargetGlobalKey; using firebase::firestore::local::LevelDbTargetKey; @@ -47,384 +49,102 @@ using firebase::firestore::model::ListenSequenceNumber; using firebase::firestore::model::SnapshotVersion; using firebase::firestore::model::TargetId; -using firebase::firestore::util::MakeString; using leveldb::DB; using leveldb::Slice; using leveldb::Status; -@interface FSTLevelDBQueryCache () - -/** A write-through cached copy of the metadata for the query cache. */ -@property(nonatomic, strong, nullable) FSTPBTargetGlobal *metadata; - -@property(nonatomic, strong, readonly) FSTLocalSerializer *serializer; - -@end - @implementation FSTLevelDBQueryCache { - // This instance is owned by FSTLevelDB; avoid a retain cycle. - __weak FSTLevelDB *_db; - - /** - * The last received snapshot version. This is part of `metadata` but we store it separately to - * avoid extra conversion to/from GPBTimestamp. - */ - SnapshotVersion _lastRemoteSnapshotVersion; -} - -+ (nullable FSTPBTargetGlobal *)readTargetMetadataWithTransaction: - (firebase::firestore::local::LevelDbTransaction *)transaction { - std::string key = LevelDbTargetGlobalKey::Key(); - std::string value; - Status status = transaction->Get(key, &value); - if (status.IsNotFound()) { - return nil; - } else if (!status.ok()) { - HARD_FAIL("metadataForKey: failed loading key %s with status: %s", key, status.ToString()); - } - - NSData *data = - [[NSData alloc] initWithBytesNoCopy:(void *)value.data() length:value.size() freeWhenDone:NO]; - - NSError *error; - FSTPBTargetGlobal *proto = [FSTPBTargetGlobal parseFromData:data error:&error]; - if (!proto) { - HARD_FAIL("FSTPBTargetGlobal failed to parse: %s", error); - } - - return proto; + std::unique_ptr _cache; } + (nullable FSTPBTargetGlobal *)readTargetMetadataFromDB:(DB *)db { - std::string key = LevelDbTargetGlobalKey::Key(); - std::string value; - Status status = db->Get([FSTLevelDB standardReadOptions], key, &value); - if (status.IsNotFound()) { - return nil; - } else if (!status.ok()) { - HARD_FAIL("metadataForKey: failed loading key %s with status: %s", key, status.ToString()); - } - - NSData *data = - [[NSData alloc] initWithBytesNoCopy:(void *)value.data() length:value.size() freeWhenDone:NO]; - - NSError *error; - FSTPBTargetGlobal *proto = [FSTPBTargetGlobal parseFromData:data error:&error]; - if (!proto) { - HARD_FAIL("FSTPBTargetGlobal failed to parse: %s", error); - } - - return proto; + return LevelDbQueryCache::ReadMetadata(db); } - (instancetype)initWithDB:(FSTLevelDB *)db serializer:(FSTLocalSerializer *)serializer { if (self = [super init]) { HARD_ASSERT(db, "db must not be NULL"); - _db = db; - _serializer = serializer; + _cache = absl::make_unique(db, serializer); } return self; } - (void)start { - // TODO(gsoltis): switch this usage of ptr to currentTransaction - FSTPBTargetGlobal *metadata = [FSTLevelDBQueryCache readTargetMetadataFromDB:_db.ptr]; - HARD_ASSERT( - metadata != nil, - "Found nil metadata, expected schema to be at version 0 which ensures metadata existence"); - _lastRemoteSnapshotVersion = [self.serializer decodedVersion:metadata.lastRemoteSnapshotVersion]; - - self.metadata = metadata; + _cache->Start(); } #pragma mark - FSTQueryCache implementation - (TargetId)highestTargetID { - return self.metadata.highestTargetId; + return _cache->highest_target_id(); } - (ListenSequenceNumber)highestListenSequenceNumber { - return self.metadata.highestListenSequenceNumber; + return _cache->highest_listen_sequence_number(); } - (const SnapshotVersion &)lastRemoteSnapshotVersion { - return _lastRemoteSnapshotVersion; + return _cache->GetLastRemoteSnapshotVersion(); } - (void)setLastRemoteSnapshotVersion:(SnapshotVersion)snapshotVersion { - _lastRemoteSnapshotVersion = std::move(snapshotVersion); - self.metadata.lastRemoteSnapshotVersion = - [self.serializer encodedVersion:_lastRemoteSnapshotVersion]; - _db.currentTransaction->Put(LevelDbTargetGlobalKey::Key(), self.metadata); + _cache->SetLastRemoteSnapshotVersion(std::move(snapshotVersion)); } - (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - // Enumerate all targets, give their sequence numbers. - std::string targetPrefix = LevelDbTargetKey::KeyPrefix(); - auto it = _db.currentTransaction->NewIterator(); - it->Seek(targetPrefix); - BOOL stop = NO; - for (; !stop && it->Valid() && absl::StartsWith(it->key(), targetPrefix); it->Next()) { - FSTQueryData *target = [self decodedTarget:it->value()]; - block(target, &stop); - } + _cache->EnumerateTargets(block); } - (void)enumerateOrphanedDocumentsUsingBlock: (void (^)(const DocumentKey &docKey, ListenSequenceNumber sequenceNumber, BOOL *stop))block { - std::string documentTargetPrefix = LevelDbDocumentTargetKey::KeyPrefix(); - auto it = _db.currentTransaction->NewIterator(); - it->Seek(documentTargetPrefix); - ListenSequenceNumber nextToReport = 0; - DocumentKey keyToReport; - LevelDbDocumentTargetKey key; - BOOL stop = NO; - for (; !stop && it->Valid() && absl::StartsWith(it->key(), documentTargetPrefix); it->Next()) { - HARD_ASSERT(key.Decode(it->key()), "Failed to decode DocumentTarget key"); - if (key.IsSentinel()) { - // if nextToReport is non-zero, report it, this is a new key so the last one - // must be not be a member of any targets. - if (nextToReport != 0) { - block(keyToReport, nextToReport, &stop); - } - // set nextToReport to be this sequence number. It's the next one we might - // report, if we don't find any targets for this document. - nextToReport = LevelDbDocumentTargetKey::DecodeSentinelValue(it->value()); - keyToReport = key.document_key(); - } else { - // set nextToReport to be 0, we know we don't need to report this one since - // we found a target for it. - nextToReport = 0; - } - } - // if not stop and nextToReport is non-zero, report it. We didn't find any targets for - // that document, and we weren't asked to stop. - if (!stop && nextToReport != 0) { - block(keyToReport, nextToReport, &stop); - } -} - -- (void)saveQueryData:(FSTQueryData *)queryData { - TargetId targetID = queryData.targetID; - std::string key = LevelDbTargetKey::Key(targetID); - _db.currentTransaction->Put(key, [self.serializer encodedQueryData:queryData]); -} - -- (BOOL)updateMetadataForQueryData:(FSTQueryData *)queryData { - BOOL updatedMetadata = NO; - - if (queryData.targetID > self.metadata.highestTargetId) { - self.metadata.highestTargetId = queryData.targetID; - updatedMetadata = YES; - } - - if (queryData.sequenceNumber > self.metadata.highestListenSequenceNumber) { - self.metadata.highestListenSequenceNumber = queryData.sequenceNumber; - updatedMetadata = YES; - } - return updatedMetadata; + _cache->EnumerateOrphanedDocuments(block); } - (void)addQueryData:(FSTQueryData *)queryData { - [self saveQueryData:queryData]; - - NSString *canonicalID = queryData.query.canonicalID; - std::string indexKey = LevelDbQueryTargetKey::Key(MakeString(canonicalID), queryData.targetID); - std::string emptyBuffer; - _db.currentTransaction->Put(indexKey, emptyBuffer); - - self.metadata.targetCount += 1; - [self updateMetadataForQueryData:queryData]; - _db.currentTransaction->Put(LevelDbTargetGlobalKey::Key(), self.metadata); + _cache->AddTarget(queryData); } - (void)updateQueryData:(FSTQueryData *)queryData { - [self saveQueryData:queryData]; - - if ([self updateMetadataForQueryData:queryData]) { - _db.currentTransaction->Put(LevelDbTargetGlobalKey::Key(), self.metadata); - } + _cache->UpdateTarget(queryData); } - (void)removeQueryData:(FSTQueryData *)queryData { - TargetId targetID = queryData.targetID; - - [self removeMatchingKeysForTargetID:targetID]; - - std::string key = LevelDbTargetKey::Key(targetID); - _db.currentTransaction->Delete(key); - - std::string indexKey = - LevelDbQueryTargetKey::Key(MakeString(queryData.query.canonicalID), targetID); - _db.currentTransaction->Delete(indexKey); - self.metadata.targetCount -= 1; - _db.currentTransaction->Put(LevelDbTargetGlobalKey::Key(), self.metadata); + _cache->RemoveTarget(queryData); } - (int)removeQueriesThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber liveQueries:(NSDictionary *)liveQueries { - int count = 0; - std::string targetPrefix = LevelDbTargetKey::KeyPrefix(); - auto it = _db.currentTransaction->NewIterator(); - it->Seek(targetPrefix); - for (; it->Valid() && absl::StartsWith(it->key(), targetPrefix); it->Next()) { - FSTQueryData *queryData = [self decodedTarget:it->value()]; - if (queryData.sequenceNumber <= sequenceNumber && !liveQueries[@(queryData.targetID)]) { - [self removeQueryData:queryData]; - count++; - } - } - return count; + return _cache->RemoveTargets(sequenceNumber, liveQueries); } - (int32_t)count { - return self.metadata.targetCount; -} - -/** - * Parses the given bytes as an FSTPBTarget protocol buffer and then converts to the equivalent - * query data. - */ -- (FSTQueryData *)decodedTarget:(absl::string_view)encoded { - NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)encoded.data() - length:encoded.size() - freeWhenDone:NO]; - - NSError *error; - FSTPBTarget *proto = [FSTPBTarget parseFromData:data error:&error]; - if (!proto) { - HARD_FAIL("FSTPBTarget failed to parse: %s", error); - } - - return [self.serializer decodedQueryData:proto]; + return _cache->size(); } - (nullable FSTQueryData *)queryDataForQuery:(FSTQuery *)query { - // Scan the query-target index starting with a prefix starting with the given query's canonicalID. - // Note that this is a scan rather than a get because canonicalIDs are not required to be unique - // per target. - std::string canonicalID = MakeString(query.canonicalID); - auto indexItererator = _db.currentTransaction->NewIterator(); - std::string indexPrefix = LevelDbQueryTargetKey::KeyPrefix(canonicalID); - indexItererator->Seek(indexPrefix); - - // Simultaneously scan the targets table. This works because each (canonicalID, targetID) pair is - // unique and ordered, so when scanning a table prefixed by exactly one canonicalID, all the - // targetIDs will be unique and in order. - std::string targetPrefix = LevelDbTargetKey::KeyPrefix(); - auto targetIterator = _db.currentTransaction->NewIterator(); - - LevelDbQueryTargetKey rowKey; - for (; indexItererator->Valid(); indexItererator->Next()) { - // Only consider rows matching exactly the specific canonicalID of interest. - if (!absl::StartsWith(indexItererator->key(), indexPrefix) || - !rowKey.Decode(indexItererator->key()) || canonicalID != rowKey.canonical_id()) { - // End of this canonicalID's possible targets. - break; - } - - // Each row is a unique combination of canonicalID and targetID, so this foreign key reference - // can only occur once. - std::string targetKey = LevelDbTargetKey::Key(rowKey.target_id()); - targetIterator->Seek(targetKey); - if (!targetIterator->Valid() || targetIterator->key() != targetKey) { - HARD_FAIL( - "Dangling query-target reference found: " - "%s points to %s; seeking there found %s", - DescribeKey(indexItererator), DescribeKey(targetKey), DescribeKey(targetIterator)); - } - - // Finally after finding a potential match, check that the query is actually equal to the - // requested query. - FSTQueryData *target = [self decodedTarget:targetIterator->value()]; - if ([target.query isEqual:query]) { - return target; - } - } - - return nil; + return _cache->GetTarget(query); } #pragma mark Matching Key tracking - (void)addMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - // Store an empty value in the index which is equivalent to serializing a GPBEmpty message. In the - // future if we wanted to store some other kind of value here, we can parse these empty values as - // with some other protocol buffer (and the parser will see all default values). - std::string emptyBuffer; - - for (const DocumentKey &key : keys) { - self->_db.currentTransaction->Put(LevelDbTargetDocumentKey::Key(targetID, key), emptyBuffer); - self->_db.currentTransaction->Put(LevelDbDocumentTargetKey::Key(key, targetID), emptyBuffer); - [self->_db.referenceDelegate addReference:key]; - }; + _cache->AddMatchingKeys(keys, targetID); } - (void)removeMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - for (const DocumentKey &key : keys) { - self->_db.currentTransaction->Delete(LevelDbTargetDocumentKey::Key(targetID, key)); - self->_db.currentTransaction->Delete(LevelDbDocumentTargetKey::Key(key, targetID)); - [self->_db.referenceDelegate removeReference:key]; - } + _cache->RemoveMatchingKeys(keys, targetID); } - (void)removeMatchingKeysForTargetID:(TargetId)targetID { - std::string indexPrefix = LevelDbTargetDocumentKey::KeyPrefix(targetID); - auto indexIterator = _db.currentTransaction->NewIterator(); - indexIterator->Seek(indexPrefix); - - LevelDbTargetDocumentKey rowKey; - for (; indexIterator->Valid(); indexIterator->Next()) { - absl::string_view indexKey = indexIterator->key(); - - // Only consider rows matching this specific targetID. - if (!rowKey.Decode(indexKey) || rowKey.target_id() != targetID) { - break; - } - const DocumentKey &documentKey = rowKey.document_key(); - - // Delete both index rows - _db.currentTransaction->Delete(indexKey); - _db.currentTransaction->Delete(LevelDbDocumentTargetKey::Key(documentKey, targetID)); - } + _cache->RemoveAllKeysForTarget(targetID); } - (DocumentKeySet)matchingKeysForTargetID:(TargetId)targetID { - std::string indexPrefix = LevelDbTargetDocumentKey::KeyPrefix(targetID); - auto indexIterator = _db.currentTransaction->NewIterator(); - indexIterator->Seek(indexPrefix); - - DocumentKeySet result; - LevelDbTargetDocumentKey rowKey; - for (; indexIterator->Valid(); indexIterator->Next()) { - // Only consider rows matching this specific targetID. - if (!rowKey.Decode(indexIterator->key()) || rowKey.target_id() != targetID) { - break; - } - - result = result.insert(rowKey.document_key()); - } - - return result; + return _cache->GetMatchingKeys(targetID); } - (BOOL)containsKey:(const DocumentKey &)key { - // ignore sentinel rows when determining if a key belongs to a target. Sentinel row just says the - // document exists, not that it's a member of any particular target. - std::string indexPrefix = LevelDbDocumentTargetKey::KeyPrefix(key.path()); - auto indexIterator = _db.currentTransaction->NewIterator(); - indexIterator->Seek(indexPrefix); - - for (; indexIterator->Valid() && absl::StartsWith(indexIterator->key(), indexPrefix); - indexIterator->Next()) { - LevelDbDocumentTargetKey rowKey; - if (rowKey.Decode(indexIterator->key()) && !rowKey.IsSentinel() && - rowKey.document_key() == key) { - return YES; - } - } - - return NO; + return _cache->Contains(key); } @end diff --git a/Firestore/Source/Local/FSTMemoryQueryCache.mm b/Firestore/Source/Local/FSTMemoryQueryCache.mm index 0708ecd45c3..184735ad338 100644 --- a/Firestore/Source/Local/FSTMemoryQueryCache.mm +++ b/Firestore/Source/Local/FSTMemoryQueryCache.mm @@ -64,11 +64,11 @@ - (ListenSequenceNumber)highestListenSequenceNumber { } - (const SnapshotVersion &)lastRemoteSnapshotVersion { - return _cache->last_remote_snapshot_version(); + return _cache->GetLastRemoteSnapshotVersion(); } - (void)setLastRemoteSnapshotVersion:(SnapshotVersion)snapshotVersion { - _cache->set_last_remote_snapshot_version(std::move(snapshotVersion)); + _cache->SetLastRemoteSnapshotVersion(std::move(snapshotVersion)); } - (void)addQueryData:(FSTQueryData *)queryData { @@ -80,7 +80,7 @@ - (void)updateQueryData:(FSTQueryData *)queryData { } - (int32_t)count { - return _cache->count(); + return _cache->size(); } - (void)removeQueryData:(FSTQueryData *)queryData { diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h new file mode 100644 index 00000000000..159457fcbab --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h @@ -0,0 +1,143 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_QUERY_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_QUERY_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#import + +// TODO(gsoltis): temporary include for `TargetEnumerator`. This will move once +// the QueryCache interface is defined, and then likely be deleted or replaced +// in favor of an iterator. +#import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" +#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" +#include "absl/strings/string_view.h" +#include "leveldb/db.h" + +@class FSTLevelDB; +@class FSTLocalSerializer; +@class FSTQuery; +@class FSTQueryData; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +/** Cached Queries backed by LevelDB. */ +class LevelDbQueryCache { + public: + /** Enumerator callback type for orphaned documents */ + typedef void (^OrphanedDocumentEnumerator)(const model::DocumentKey&, + model::ListenSequenceNumber, + BOOL*); + + /** + * Retrieves the global singleton metadata row from the given database, if it + * exists. + * TODO(gsoltis): remove this method once fully ported to transactions. + */ + static FSTPBTargetGlobal* ReadMetadata(leveldb::DB* db); + + /** + * Creates a new query cache in the given LevelDB. + * + * @param db The LevelDB in which to create the cache. + */ + LevelDbQueryCache(FSTLevelDB* db, FSTLocalSerializer* serializer); + + // Target-related methods + void AddTarget(FSTQueryData* query_data); + + void UpdateTarget(FSTQueryData* query_data); + + void RemoveTarget(FSTQueryData* query_data); + + FSTQueryData* _Nullable GetTarget(FSTQuery* query); + + void EnumerateTargets(TargetEnumerator block); + + int RemoveTargets(model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets); + + // Key-related methods + void AddMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id); + + void RemoveMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id); + + void RemoveAllKeysForTarget(model::TargetId target_id); + + model::DocumentKeySet GetMatchingKeys(model::TargetId target_id); + + bool Contains(const model::DocumentKey& key); + + // Other methods and accessors + int32_t size() const { + return metadata_.targetCount; + } + + model::TargetId highest_target_id() const { + return metadata_.highestTargetId; + } + + model::ListenSequenceNumber highest_listen_sequence_number() const { + return metadata_.highestListenSequenceNumber; + } + + const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const; + + void SetLastRemoteSnapshotVersion(model::SnapshotVersion version); + + // Non-interface methods + void Start(); + + void EnumerateOrphanedDocuments(OrphanedDocumentEnumerator block); + + private: + void Save(FSTQueryData* query_data); + bool UpdateMetadata(FSTQueryData* query_data); + void SaveMetadata(); + /** + * Parses the given bytes as an FSTPBTarget protocol buffer and then converts + * to the equivalent query data. + */ + FSTQueryData* DecodeTarget(absl::string_view encoded); + + // This instance is owned by FSTLevelDB; avoid a retain cycle. + __weak FSTLevelDB* db_; + FSTLocalSerializer* serializer_; + /** A write-through cached copy of the metadata for the query cache. */ + FSTPBTargetGlobal* metadata_; + model::SnapshotVersion last_remote_snapshot_version_; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_LEVELDB_QUERY_CACHE_H_ diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm new file mode 100644 index 00000000000..454c2b625c7 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm @@ -0,0 +1,387 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" + +#include +#include + +#import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" +#import "Firestore/Source/Core/FSTQuery.h" +#import "Firestore/Source/Local/FSTLevelDB.h" +#import "Firestore/Source/Local/FSTLocalSerializer.h" +#import "Firestore/Source/Local/FSTQueryData.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/util/string_apple.h" +#include "absl/strings/match.h" + +namespace firebase { +namespace firestore { +namespace local { + +using model::DocumentKey; +using model::DocumentKeySet; +using model::ListenSequenceNumber; +using model::SnapshotVersion; +using model::TargetId; +using util::MakeString; +using leveldb::Status; + +FSTPBTargetGlobal* LevelDbQueryCache::ReadMetadata(leveldb::DB* db) { + std::string key = LevelDbTargetGlobalKey::Key(); + std::string value; + Status status = db->Get([FSTLevelDB standardReadOptions], key, &value); + if (status.IsNotFound()) { + return nil; + } else if (!status.ok()) { + HARD_FAIL("metadataForKey: failed loading key %s with status: %s", key, + status.ToString()); + } + + NSData* data = [[NSData alloc] initWithBytesNoCopy:(void*)value.data() + length:value.size() + freeWhenDone:NO]; + + NSError* error; + FSTPBTargetGlobal* proto = + [FSTPBTargetGlobal parseFromData:data error:&error]; + if (!proto) { + HARD_FAIL("FSTPBTargetGlobal failed to parse: %s", error); + } + + return proto; +} + +LevelDbQueryCache::LevelDbQueryCache(FSTLevelDB* db, + FSTLocalSerializer* serializer) + : db_(db), serializer_(serializer) { +} + +// TODO(gsoltis): revisit having a Start method vs a static factory function +// that returns a started instance. +void LevelDbQueryCache::Start() { + // TODO(gsoltis): switch this usage of ptr to currentTransaction + metadata_ = ReadMetadata(db_.ptr); + HARD_ASSERT(metadata_ != nil, + "Found nil metadata, expected schema to be at version 0 which " + "ensures metadata existence"); + last_remote_snapshot_version_ = + [serializer_ decodedVersion:metadata_.lastRemoteSnapshotVersion]; +} + +void LevelDbQueryCache::AddTarget(FSTQueryData* query_data) { + Save(query_data); + + NSString* canonical_id = query_data.query.canonicalID; + std::string index_key = + LevelDbQueryTargetKey::Key(MakeString(canonical_id), query_data.targetID); + std::string empty_buffer; + db_.currentTransaction->Put(index_key, empty_buffer); + + metadata_.targetCount++; + UpdateMetadata(query_data); + SaveMetadata(); +} + +void LevelDbQueryCache::UpdateTarget(FSTQueryData* query_data) { + Save(query_data); + + if (UpdateMetadata(query_data)) { + SaveMetadata(); + } +} + +void LevelDbQueryCache::RemoveTarget(FSTQueryData* query_data) { + TargetId target_id = query_data.targetID; + + RemoveAllKeysForTarget(target_id); + + std::string key = LevelDbTargetKey::Key(target_id); + db_.currentTransaction->Delete(key); + + std::string index_key = LevelDbQueryTargetKey::Key( + MakeString(query_data.query.canonicalID), target_id); + db_.currentTransaction->Delete(index_key); + + metadata_.targetCount--; + SaveMetadata(); +} + +FSTQueryData* _Nullable LevelDbQueryCache::GetTarget(FSTQuery* query) { + // Scan the query-target index starting with a prefix starting with the given + // query's canonicalID. Note that this is a scan rather than a get because + // canonicalIDs are not required to be unique per target. + std::string canonical_id = MakeString(query.canonicalID); + auto index_iterator = db_.currentTransaction->NewIterator(); + std::string index_prefix = LevelDbQueryTargetKey::KeyPrefix(canonical_id); + index_iterator->Seek(index_prefix); + + // Simultaneously scan the targets table. This works because each + // (canonicalID, targetID) pair is unique and ordered, so when scanning a + // table prefixed by exactly one canonicalID, all the targetIDs will be unique + // and in order. + std::string target_prefix = LevelDbTargetKey::KeyPrefix(); + auto target_iterator = db_.currentTransaction->NewIterator(); + + LevelDbQueryTargetKey row_key; + for (; index_iterator->Valid(); index_iterator->Next()) { + // Only consider rows matching exactly the specific canonicalID of interest. + if (!absl::StartsWith(index_iterator->key(), index_prefix) || + !row_key.Decode(index_iterator->key()) || + canonical_id != row_key.canonical_id()) { + // End of this canonicalID's possible targets. + break; + } + + // Each row is a unique combination of canonicalID and targetID, so this + // foreign key reference can only occur once. + std::string target_key = LevelDbTargetKey::Key(row_key.target_id()); + target_iterator->Seek(target_key); + if (!target_iterator->Valid() || target_iterator->key() != target_key) { + HARD_FAIL( + "Dangling query-target reference found: " + "%s points to %s; seeking there found %s", + DescribeKey(index_iterator), DescribeKey(target_key), + DescribeKey(target_iterator)); + } + + // Finally after finding a potential match, check that the query is actually + // equal to the requested query. + FSTQueryData* target = DecodeTarget(target_iterator->value()); + if ([target.query isEqual:query]) { + return target; + } + } + + return nil; +} + +void LevelDbQueryCache::EnumerateTargets(TargetEnumerator block) { + // Enumerate all targets, give their sequence numbers. + std::string target_prefix = LevelDbTargetKey::KeyPrefix(); + auto it = db_.currentTransaction->NewIterator(); + it->Seek(target_prefix); + BOOL stop = NO; + for (; !stop && it->Valid() && absl::StartsWith(it->key(), target_prefix); + it->Next()) { + FSTQueryData* target = DecodeTarget(it->value()); + block(target, &stop); + } +} + +int LevelDbQueryCache::RemoveTargets( + ListenSequenceNumber upper_bound, + NSDictionary* live_targets) { + int count = 0; + std::string target_prefix = LevelDbTargetKey::KeyPrefix(); + auto it = db_.currentTransaction->NewIterator(); + it->Seek(target_prefix); + for (; it->Valid() && absl::StartsWith(it->key(), target_prefix); + it->Next()) { + FSTQueryData* query_data = DecodeTarget(it->value()); + if (query_data.sequenceNumber <= upper_bound && + !live_targets[@(query_data.targetID)]) { + RemoveTarget(query_data); + count++; + } + } + return count; +} + +void LevelDbQueryCache::AddMatchingKeys(const DocumentKeySet& keys, + TargetId target_id) { + // Store an empty value in the index which is equivalent to serializing a + // GPBEmpty message. In the future if we wanted to store some other kind of + // value here, we can parse these empty values as with some other protocol + // buffer (and the parser will see all default values). + std::string empty_buffer; + + for (const DocumentKey& key : keys) { + db_.currentTransaction->Put(LevelDbTargetDocumentKey::Key(target_id, key), + empty_buffer); + db_.currentTransaction->Put(LevelDbDocumentTargetKey::Key(key, target_id), + empty_buffer); + [db_.referenceDelegate addReference:key]; + }; +} + +void LevelDbQueryCache::RemoveMatchingKeys(const DocumentKeySet& keys, + TargetId target_id) { + for (const DocumentKey& key : keys) { + db_.currentTransaction->Delete( + LevelDbTargetDocumentKey::Key(target_id, key)); + db_.currentTransaction->Delete( + LevelDbDocumentTargetKey::Key(key, target_id)); + [db_.referenceDelegate removeReference:key]; + } +} + +void LevelDbQueryCache::RemoveAllKeysForTarget(TargetId target_id) { + std::string index_prefix = LevelDbTargetDocumentKey::KeyPrefix(target_id); + auto index_iterator = db_.currentTransaction->NewIterator(); + index_iterator->Seek(index_prefix); + + LevelDbTargetDocumentKey row_key; + for (; index_iterator->Valid(); index_iterator->Next()) { + absl::string_view index_key = index_iterator->key(); + + // Only consider rows matching this specific targetID. + if (!row_key.Decode(index_key) || row_key.target_id() != target_id) { + break; + } + const DocumentKey& document_key = row_key.document_key(); + + // Delete both index rows + db_.currentTransaction->Delete(index_key); + db_.currentTransaction->Delete( + LevelDbDocumentTargetKey::Key(document_key, target_id)); + } +} + +DocumentKeySet LevelDbQueryCache::GetMatchingKeys(TargetId target_id) { + std::string index_prefix = LevelDbTargetDocumentKey::KeyPrefix(target_id); + auto index_iterator = db_.currentTransaction->NewIterator(); + index_iterator->Seek(index_prefix); + + DocumentKeySet result; + LevelDbTargetDocumentKey row_key; + for (; index_iterator->Valid(); index_iterator->Next()) { + // TODO(gsoltis): could we use a StartsWith instead? + // Only consider rows matching this specific target_id. + if (!row_key.Decode(index_iterator->key()) || + row_key.target_id() != target_id) { + break; + } + + result = result.insert(row_key.document_key()); + } + + return result; +} + +bool LevelDbQueryCache::Contains(const DocumentKey& key) { + // ignore sentinel rows when determining if a key belongs to a target. + // Sentinel row just says the document exists, not that it's a member of any + // particular target. + std::string index_prefix = LevelDbDocumentTargetKey::KeyPrefix(key.path()); + auto index_iterator = db_.currentTransaction->NewIterator(); + index_iterator->Seek(index_prefix); + + for (; index_iterator->Valid() && + absl::StartsWith(index_iterator->key(), index_prefix); + index_iterator->Next()) { + LevelDbDocumentTargetKey row_key; + if (row_key.Decode(index_iterator->key()) && !row_key.IsSentinel() && + row_key.document_key() == key) { + return true; + } + } + + return false; +} + +const SnapshotVersion& LevelDbQueryCache::GetLastRemoteSnapshotVersion() const { + return last_remote_snapshot_version_; +} + +void LevelDbQueryCache::SetLastRemoteSnapshotVersion(SnapshotVersion version) { + last_remote_snapshot_version_ = std::move(version); + metadata_.lastRemoteSnapshotVersion = + [serializer_ encodedVersion:last_remote_snapshot_version_]; + SaveMetadata(); +} + +void LevelDbQueryCache::EnumerateOrphanedDocuments( + OrphanedDocumentEnumerator block) { + std::string document_target_prefix = LevelDbDocumentTargetKey::KeyPrefix(); + auto it = db_.currentTransaction->NewIterator(); + it->Seek(document_target_prefix); + ListenSequenceNumber next_to_report = 0; + DocumentKey key_to_report; + LevelDbDocumentTargetKey key; + BOOL stop = NO; + for (; !stop && it->Valid() && + absl::StartsWith(it->key(), document_target_prefix); + it->Next()) { + HARD_ASSERT(key.Decode(it->key()), "Failed to decode DocumentTarget key"); + if (key.IsSentinel()) { + // if next_to_report is non-zero, report it, this is a new key so the last + // one must be not be a member of any targets. + if (next_to_report != 0) { + block(key_to_report, next_to_report, &stop); + } + // set next_to_report to be this sequence number. It's the next one we + // might report, if we don't find any targets for this document. + next_to_report = + LevelDbDocumentTargetKey::DecodeSentinelValue(it->value()); + key_to_report = key.document_key(); + } else { + // set next_to_report to be 0, we know we don't need to report this one + // since we found a target for it. + next_to_report = 0; + } + } + // if not stop and next_to_report is non-zero, report it. We didn't find any + // targets for that document, and we weren't asked to stop. + if (!stop && next_to_report != 0) { + block(key_to_report, next_to_report, &stop); + } +} + +void LevelDbQueryCache::Save(FSTQueryData* query_data) { + TargetId target_id = query_data.targetID; + std::string key = LevelDbTargetKey::Key(target_id); + db_.currentTransaction->Put(key, [serializer_ encodedQueryData:query_data]); +} + +bool LevelDbQueryCache::UpdateMetadata(FSTQueryData* query_data) { + bool updated = false; + if (query_data.targetID > metadata_.highestTargetId) { + metadata_.highestTargetId = query_data.targetID; + updated = true; + } + + if (query_data.sequenceNumber > metadata_.highestListenSequenceNumber) { + metadata_.highestListenSequenceNumber = query_data.sequenceNumber; + updated = true; + } + + return updated; +} + +void LevelDbQueryCache::SaveMetadata() { + db_.currentTransaction->Put(LevelDbTargetGlobalKey::Key(), metadata_); +} + +FSTQueryData* LevelDbQueryCache::DecodeTarget(absl::string_view encoded) { + NSData* data = [[NSData alloc] initWithBytesNoCopy:(void*)encoded.data() + length:encoded.size() + freeWhenDone:NO]; + + NSError* error; + FSTPBTarget* proto = [FSTPBTarget parseFromData:data error:&error]; + if (!proto) { + HARD_FAIL("FSTPBTarget failed to parse: %s", error); + } + + return [serializer_ decodedQueryData:proto]; +} + +} // namespace local +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h index 83d99af4d1b..3afd5328085 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h @@ -78,7 +78,7 @@ class MemoryQueryCache { // Other methods and accessors size_t CalculateByteSize(FSTLocalSerializer* serializer); - int32_t count() const { + int32_t size() const { return static_cast([queries_ count]); } @@ -90,13 +90,9 @@ class MemoryQueryCache { return highest_target_id_; } - const model::SnapshotVersion& last_remote_snapshot_version() const { - return last_remote_snapshot_version_; - } + const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const; - void set_last_remote_snapshot_version(model::SnapshotVersion version) { - last_remote_snapshot_version_ = std::move(version); - } + void SetLastRemoteSnapshotVersion(model::SnapshotVersion version); private: FSTMemoryPersistence* persistence_; diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm index 6d0c1ba0b80..78762713d71 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm @@ -130,6 +130,14 @@ return count; } +const SnapshotVersion& MemoryQueryCache::GetLastRemoteSnapshotVersion() const { + return last_remote_snapshot_version_; +} + +void MemoryQueryCache::SetLastRemoteSnapshotVersion(SnapshotVersion version) { + last_remote_snapshot_version_ = std::move(version); +} + NS_ASSUME_NONNULL_END } // namespace local From 22f67015f1d8b1e7480df385adc3680a2030a1a9 Mon Sep 17 00:00:00 2001 From: Ryan Wilson Date: Thu, 20 Dec 2018 22:06:36 -0500 Subject: [PATCH 24/34] Fix Storage private imports. (#2206) --- Firebase/Storage/Private/FIRStorageDownloadTask_Private.h | 5 +++++ Firebase/Storage/Private/FIRStorageObservableTask_Private.h | 6 +++++- Firebase/Storage/Private/FIRStorageTaskSnapshot_Private.h | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Firebase/Storage/Private/FIRStorageDownloadTask_Private.h b/Firebase/Storage/Private/FIRStorageDownloadTask_Private.h index 8b5a0d86d2f..f79638a7f32 100644 --- a/Firebase/Storage/Private/FIRStorageDownloadTask_Private.h +++ b/Firebase/Storage/Private/FIRStorageDownloadTask_Private.h @@ -14,6 +14,11 @@ * limitations under the License. */ +#import + +#import "FIRStorageDownloadTask.h" + +@class FIRStorageReference; @class GTMSessionFetcherService; NS_ASSUME_NONNULL_BEGIN diff --git a/Firebase/Storage/Private/FIRStorageObservableTask_Private.h b/Firebase/Storage/Private/FIRStorageObservableTask_Private.h index 404ec9e328f..47aeb0a28db 100644 --- a/Firebase/Storage/Private/FIRStorageObservableTask_Private.h +++ b/Firebase/Storage/Private/FIRStorageObservableTask_Private.h @@ -14,10 +14,14 @@ * limitations under the License. */ +#import + +#import "FIRStorageObservableTask.h" + NS_ASSUME_NONNULL_BEGIN +@class FIRStorageReference; @class FIRStorageTaskSnapshot; - @class GTMSessionFetcherService; @interface FIRStorageObservableTask () diff --git a/Firebase/Storage/Private/FIRStorageTaskSnapshot_Private.h b/Firebase/Storage/Private/FIRStorageTaskSnapshot_Private.h index 1762a61e858..c302832782f 100644 --- a/Firebase/Storage/Private/FIRStorageTaskSnapshot_Private.h +++ b/Firebase/Storage/Private/FIRStorageTaskSnapshot_Private.h @@ -14,6 +14,10 @@ * limitations under the License. */ +#import + +#import "FIRStorageTaskSnapshot.h" + #import "FIRStorageConstants_Private.h" NS_ASSUME_NONNULL_BEGIN From fa2cbe77b73f3008323de626281276b5102a4501 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Thu, 20 Dec 2018 19:17:44 -0800 Subject: [PATCH 25/34] Add missing Foundation imports to Interop headers (#2207) --- Interop/Analytics/Public/FIRInteropEventNames.h | 2 ++ Interop/Analytics/Public/FIRInteropParameterNames.h | 2 ++ Interop/Auth/Public/FIRAuthInterop.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/Interop/Analytics/Public/FIRInteropEventNames.h b/Interop/Analytics/Public/FIRInteropEventNames.h index dc0422612b6..efc54ab2218 100644 --- a/Interop/Analytics/Public/FIRInteropEventNames.h +++ b/Interop/Analytics/Public/FIRInteropEventNames.h @@ -16,6 +16,8 @@ /// @file FIRInteropEventNames.h +#import + /// Notification open event name. static NSString *const kFIRIEventNotificationOpen = @"_no"; diff --git a/Interop/Analytics/Public/FIRInteropParameterNames.h b/Interop/Analytics/Public/FIRInteropParameterNames.h index 9cd962348e4..ae440becf8b 100644 --- a/Interop/Analytics/Public/FIRInteropParameterNames.h +++ b/Interop/Analytics/Public/FIRInteropParameterNames.h @@ -14,6 +14,8 @@ * limitations under the License. */ +#import + /// @file FIRInteropParameterNames.h /// /// Predefined event parameter names used by Firebase. This file is a subset of the diff --git a/Interop/Auth/Public/FIRAuthInterop.h b/Interop/Auth/Public/FIRAuthInterop.h index 5c365a3cd13..a33da7c9f4b 100644 --- a/Interop/Auth/Public/FIRAuthInterop.h +++ b/Interop/Auth/Public/FIRAuthInterop.h @@ -17,6 +17,8 @@ #ifndef FIRAuthInterop_h #define FIRAuthInterop_h +#import + NS_ASSUME_NONNULL_BEGIN /** @typedef FIRTokenCallback From 6af931d4e8c89c2b13a9fde84104a25b7bf43f97 Mon Sep 17 00:00:00 2001 From: Gil Date: Fri, 21 Dec 2018 11:28:48 -0800 Subject: [PATCH 26/34] Migrate Firestore to the v1 protocol (#2200) * Use python executable directly * python2 is not guaranteed to exist * scripts aren't directly executable on Windows * Add Firestore v1 protos * Point cmake at Firestore v1 protos * Regenerate protobuf-related sources * Make local protos refer to v1 protos * fixup! Regenerate protobuf-related sources * Remove v1beta1 protos * s/v1beta1/v1/g in source. * s/v1beta1/v1/ in the Xcode project * Remove stale bug comments. This was fixed by adding an explicit FieldPath API rather than exposing escaping to the end user. --- .../Firestore.xcodeproj/project.pbxproj | 76 +- .../Serializer/Corpus/ConvertTextToBinary.sh | 4 +- .../Tests/Local/FSTLocalSerializerTests.mm | 10 +- .../Example/Tests/Model/FSTFieldValueTests.mm | 6 +- .../Tests/Remote/FSTSerializerBetaTests.mm | 10 +- Firestore/Protos/CMakeLists.txt | 14 +- .../cpp/firestore/local/maybe_document.pb.cc | 54 +- .../cpp/firestore/local/maybe_document.pb.h | 28 +- .../Protos/cpp/firestore/local/mutation.pb.cc | 43 +- .../Protos/cpp/firestore/local/mutation.pb.h | 54 +- .../Protos/cpp/firestore/local/target.pb.cc | 79 +- .../Protos/cpp/firestore/local/target.pb.h | 54 +- .../firestore/{v1beta1 => v1}/common.pb.cc | 457 ++- .../firestore/{v1beta1 => v1}/common.pb.h | 182 +- .../firestore/{v1beta1 => v1}/document.pb.cc | 583 ++-- .../firestore/{v1beta1 => v1}/document.pb.h | 316 +- .../firestore/{v1beta1 => v1}/firestore.pb.cc | 3004 ++++++++--------- .../firestore/{v1beta1 => v1}/firestore.pb.h | 2146 ++++++------ .../firestore/{v1beta1 => v1}/query.pb.cc | 1143 ++++--- .../firestore/{v1beta1 => v1}/query.pb.h | 838 ++--- .../firestore/{v1beta1 => v1}/write.pb.cc | 1083 +++--- .../firestore/{v1beta1 => v1}/write.pb.h | 750 ++-- .../firestore/local/maybe_document.nanopb.cc | 2 +- .../firestore/local/maybe_document.nanopb.h | 6 +- .../nanopb/firestore/local/mutation.nanopb.cc | 4 +- .../nanopb/firestore/local/mutation.nanopb.h | 6 +- .../nanopb/firestore/local/target.nanopb.cc | 4 +- .../nanopb/firestore/local/target.nanopb.h | 10 +- .../{v1beta1 => v1}/common.nanopb.cc | 28 +- .../google/firestore/v1/common.nanopb.h | 125 + .../google/firestore/v1/document.nanopb.cc | 105 + .../google/firestore/v1/document.nanopb.h | 161 + .../google/firestore/v1/firestore.nanopb.cc | 265 ++ .../google/firestore/v1/firestore.nanopb.h | 537 +++ .../google/firestore/v1/query.nanopb.cc | 130 + .../nanopb/google/firestore/v1/query.nanopb.h | 246 ++ .../google/firestore/v1/write.nanopb.cc | 120 + .../nanopb/google/firestore/v1/write.nanopb.h | 204 ++ .../google/firestore/v1beta1/common.nanopb.h | 125 - .../firestore/v1beta1/document.nanopb.cc | 105 - .../firestore/v1beta1/document.nanopb.h | 161 - .../firestore/v1beta1/firestore.nanopb.cc | 265 -- .../firestore/v1beta1/firestore.nanopb.h | 537 --- .../google/firestore/v1beta1/query.nanopb.cc | 130 - .../google/firestore/v1beta1/query.nanopb.h | 246 -- .../google/firestore/v1beta1/write.nanopb.cc | 118 - .../google/firestore/v1beta1/write.nanopb.h | 200 -- .../objc/firestore/local/Target.pbobjc.h | 4 +- .../firestore/{v1beta1 => v1}/Common.pbobjc.h | 6 +- .../firestore/{v1beta1 => v1}/Common.pbobjc.m | 4 +- .../{v1beta1 => v1}/Document.pbobjc.h | 5 +- .../{v1beta1 => v1}/Document.pbobjc.m | 4 +- .../{v1beta1 => v1}/Firestore.pbobjc.h | 64 +- .../{v1beta1 => v1}/Firestore.pbobjc.m | 4 +- .../firestore/{v1beta1 => v1}/Query.pbobjc.h | 2 +- .../firestore/{v1beta1 => v1}/Query.pbobjc.m | 4 +- .../firestore/{v1beta1 => v1}/Write.pbobjc.h | 76 +- .../firestore/{v1beta1 => v1}/Write.pbobjc.m | 36 +- .../firestore/local/maybe_document.proto | 4 +- .../protos/firestore/local/mutation.proto | 6 +- .../protos/firestore/local/target.proto | 10 +- .../firestore/{v1beta1 => v1}/common.proto | 13 +- .../firestore/{v1beta1 => v1}/document.proto | 12 +- .../firestore/{v1beta1 => v1}/firestore.proto | 112 +- .../firestore/{v1beta1 => v1}/query.proto | 11 +- .../firestore/{v1beta1 => v1}/write.proto | 75 +- Firestore/Source/Local/FSTLocalSerializer.h | 2 +- Firestore/Source/Local/FSTLocalSerializer.mm | 7 +- Firestore/Source/Remote/FSTSerializerBeta.mm | 10 +- .../firestore/local/local_serializer.cc | 12 +- .../firestore/local/local_serializer.h | 8 +- .../firebase/firestore/model/field_path.cc | 7 - .../src/firebase/firestore/nanopb/reader.cc | 2 +- .../core/src/firebase/firestore/nanopb/tag.h | 2 +- .../src/firebase/firestore/nanopb/writer.cc | 2 +- .../firebase/firestore/remote/CMakeLists.txt | 2 +- .../firebase/firestore/remote/datastore.mm | 5 +- .../firestore/remote/remote_objc_bridge.h | 2 +- .../firebase/firestore/remote/serializer.cc | 113 +- .../firebase/firestore/remote/serializer.h | 2 +- .../firebase/firestore/remote/watch_stream.mm | 6 +- .../firebase/firestore/remote/write_stream.mm | 6 +- .../firestore/local/local_serializer_test.cc | 10 +- .../firestore/remote/datastore_test.mm | 4 +- .../firestore/remote/serializer_test.cc | 141 +- 85 files changed, 7932 insertions(+), 7637 deletions(-) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/common.pb.cc (78%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/common.pb.h (82%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/document.pb.cc (79%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/document.pb.h (82%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/firestore.pb.cc (79%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/firestore.pb.h (77%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/query.pb.cc (74%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/query.pb.h (69%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/write.pb.cc (76%) rename Firestore/Protos/cpp/google/firestore/{v1beta1 => v1}/write.pb.h (72%) rename Firestore/Protos/nanopb/google/firestore/{v1beta1 => v1}/common.nanopb.cc (50%) create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc create mode 100644 Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.cc delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.cc delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.cc delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.cc delete mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Common.pbobjc.h (96%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Common.pbobjc.m (99%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Document.pbobjc.h (98%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Document.pbobjc.m (99%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Firestore.pbobjc.h (95%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Firestore.pbobjc.m (99%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Query.pbobjc.h (99%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Query.pbobjc.m (99%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Write.pbobjc.h (83%) rename Firestore/Protos/objc/google/firestore/{v1beta1 => v1}/Write.pbobjc.m (96%) rename Firestore/Protos/protos/google/firestore/{v1beta1 => v1}/common.proto (88%) rename Firestore/Protos/protos/google/firestore/{v1beta1 => v1}/document.proto (95%) rename Firestore/Protos/protos/google/firestore/{v1beta1 => v1}/firestore.proto (86%) rename Firestore/Protos/protos/google/firestore/{v1beta1 => v1}/query.proto (97%) rename Firestore/Protos/protos/google/firestore/{v1beta1 => v1}/write.proto (70%) diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 72a0bd9f734..5fad47bf7ef 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -34,6 +34,11 @@ 3B843E4C1F3A182900548890 /* remote_store_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */; }; 4AA4ABE36065DB79CD76DD8D /* Pods_Firestore_Benchmarks_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F694C3CE4B77B3C0FA4BBA53 /* Pods_Firestore_Benchmarks_iOS.framework */; }; 54131E9720ADE679001DF3FF /* string_format_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54131E9620ADE678001DF3FF /* string_format_test.cc */; }; + 544129DA21C2DDC800EFB9CC /* common.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D221C2DDC800EFB9CC /* common.pb.cc */; }; + 544129DB21C2DDC800EFB9CC /* firestore.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D421C2DDC800EFB9CC /* firestore.pb.cc */; }; + 544129DC21C2DDC800EFB9CC /* query.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D621C2DDC800EFB9CC /* query.pb.cc */; }; + 544129DD21C2DDC800EFB9CC /* document.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D821C2DDC800EFB9CC /* document.pb.cc */; }; + 544129DE21C2DDC800EFB9CC /* write.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 544129D921C2DDC800EFB9CC /* write.pb.cc */; }; 544A20EE20F6C10C004E52CD /* BasicCompileTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE0761F61F2FE68D003233AF /* BasicCompileTests.swift */; }; 54511E8E209805F8005BD28F /* hashing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54511E8D209805F8005BD28F /* hashing_test.cc */; }; 5467FB01203E5717009C9584 /* FIRFirestoreTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5467FAFF203E56F8009C9584 /* FIRFirestoreTests.mm */; }; @@ -156,11 +161,6 @@ 618BBEA620B89AAC00B5BCE7 /* target.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE7D20B89AAC00B5BCE7 /* target.pb.cc */; }; 618BBEA720B89AAC00B5BCE7 /* maybe_document.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE7E20B89AAC00B5BCE7 /* maybe_document.pb.cc */; }; 618BBEA820B89AAC00B5BCE7 /* mutation.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8220B89AAC00B5BCE7 /* mutation.pb.cc */; }; - 618BBEA920B89AAC00B5BCE7 /* common.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8820B89AAC00B5BCE7 /* common.pb.cc */; }; - 618BBEAA20B89AAC00B5BCE7 /* firestore.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8A20B89AAC00B5BCE7 /* firestore.pb.cc */; }; - 618BBEAB20B89AAC00B5BCE7 /* query.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8C20B89AAC00B5BCE7 /* query.pb.cc */; }; - 618BBEAC20B89AAC00B5BCE7 /* document.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8E20B89AAC00B5BCE7 /* document.pb.cc */; }; - 618BBEAD20B89AAC00B5BCE7 /* write.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE8F20B89AAC00B5BCE7 /* write.pb.cc */; }; 618BBEAE20B89AAC00B5BCE7 /* latlng.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9220B89AAC00B5BCE7 /* latlng.pb.cc */; }; 618BBEAF20B89AAC00B5BCE7 /* annotations.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9520B89AAC00B5BCE7 /* annotations.pb.cc */; }; 618BBEB020B89AAC00B5BCE7 /* http.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9720B89AAC00B5BCE7 /* http.pb.cc */; }; @@ -313,6 +313,16 @@ 403DBF6EFB541DFD01582AA3 /* path_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = path_test.cc; sourceTree = ""; }; 444B7AB3F5A2929070CB1363 /* hard_assert_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = hard_assert_test.cc; sourceTree = ""; }; 54131E9620ADE678001DF3FF /* string_format_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_format_test.cc; sourceTree = ""; }; + 544129D021C2DDC800EFB9CC /* query.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = query.pb.h; sourceTree = ""; }; + 544129D121C2DDC800EFB9CC /* common.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.pb.h; sourceTree = ""; }; + 544129D221C2DDC800EFB9CC /* common.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common.pb.cc; sourceTree = ""; }; + 544129D321C2DDC800EFB9CC /* firestore.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = firestore.pb.h; sourceTree = ""; }; + 544129D421C2DDC800EFB9CC /* firestore.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = firestore.pb.cc; sourceTree = ""; }; + 544129D521C2DDC800EFB9CC /* write.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = write.pb.h; sourceTree = ""; }; + 544129D621C2DDC800EFB9CC /* query.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = query.pb.cc; sourceTree = ""; }; + 544129D721C2DDC800EFB9CC /* document.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = document.pb.h; sourceTree = ""; }; + 544129D821C2DDC800EFB9CC /* document.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = document.pb.cc; sourceTree = ""; }; + 544129D921C2DDC800EFB9CC /* write.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = write.pb.cc; sourceTree = ""; }; 54511E8D209805F8005BD28F /* hashing_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hashing_test.cc; sourceTree = ""; }; 5467FAFF203E56F8009C9584 /* FIRFirestoreTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRFirestoreTests.mm; sourceTree = ""; }; 5467FB06203E6A44009C9584 /* app_testing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = app_testing.h; sourceTree = ""; }; @@ -456,16 +466,6 @@ 618BBE8020B89AAC00B5BCE7 /* maybe_document.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = maybe_document.pb.h; sourceTree = ""; }; 618BBE8120B89AAC00B5BCE7 /* mutation.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mutation.pb.h; sourceTree = ""; }; 618BBE8220B89AAC00B5BCE7 /* mutation.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mutation.pb.cc; sourceTree = ""; }; - 618BBE8620B89AAC00B5BCE7 /* query.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = query.pb.h; sourceTree = ""; }; - 618BBE8720B89AAC00B5BCE7 /* common.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.pb.h; sourceTree = ""; }; - 618BBE8820B89AAC00B5BCE7 /* common.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common.pb.cc; sourceTree = ""; }; - 618BBE8920B89AAC00B5BCE7 /* firestore.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = firestore.pb.h; sourceTree = ""; }; - 618BBE8A20B89AAC00B5BCE7 /* firestore.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = firestore.pb.cc; sourceTree = ""; }; - 618BBE8B20B89AAC00B5BCE7 /* write.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = write.pb.h; sourceTree = ""; }; - 618BBE8C20B89AAC00B5BCE7 /* query.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = query.pb.cc; sourceTree = ""; }; - 618BBE8D20B89AAC00B5BCE7 /* document.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = document.pb.h; sourceTree = ""; }; - 618BBE8E20B89AAC00B5BCE7 /* document.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = document.pb.cc; sourceTree = ""; }; - 618BBE8F20B89AAC00B5BCE7 /* write.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = write.pb.cc; sourceTree = ""; }; 618BBE9120B89AAC00B5BCE7 /* latlng.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = latlng.pb.h; sourceTree = ""; }; 618BBE9220B89AAC00B5BCE7 /* latlng.pb.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = latlng.pb.cc; sourceTree = ""; }; 618BBE9420B89AAC00B5BCE7 /* http.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = http.pb.h; sourceTree = ""; }; @@ -640,6 +640,23 @@ path = App; sourceTree = ""; }; + 544129CF21C2DDC800EFB9CC /* v1 */ = { + isa = PBXGroup; + children = ( + 544129D221C2DDC800EFB9CC /* common.pb.cc */, + 544129D121C2DDC800EFB9CC /* common.pb.h */, + 544129D821C2DDC800EFB9CC /* document.pb.cc */, + 544129D721C2DDC800EFB9CC /* document.pb.h */, + 544129D421C2DDC800EFB9CC /* firestore.pb.cc */, + 544129D321C2DDC800EFB9CC /* firestore.pb.h */, + 544129D621C2DDC800EFB9CC /* query.pb.cc */, + 544129D021C2DDC800EFB9CC /* query.pb.h */, + 544129D921C2DDC800EFB9CC /* write.pb.cc */, + 544129D521C2DDC800EFB9CC /* write.pb.h */, + ); + path = v1; + sourceTree = ""; + }; 544A20ED20F6C046004E52CD /* API */ = { isa = PBXGroup; children = ( @@ -940,28 +957,11 @@ 618BBE8420B89AAC00B5BCE7 /* firestore */ = { isa = PBXGroup; children = ( - 618BBE8520B89AAC00B5BCE7 /* v1beta1 */, + 544129CF21C2DDC800EFB9CC /* v1 */, ); path = firestore; sourceTree = ""; }; - 618BBE8520B89AAC00B5BCE7 /* v1beta1 */ = { - isa = PBXGroup; - children = ( - 618BBE8820B89AAC00B5BCE7 /* common.pb.cc */, - 618BBE8720B89AAC00B5BCE7 /* common.pb.h */, - 618BBE8E20B89AAC00B5BCE7 /* document.pb.cc */, - 618BBE8D20B89AAC00B5BCE7 /* document.pb.h */, - 618BBE8A20B89AAC00B5BCE7 /* firestore.pb.cc */, - 618BBE8920B89AAC00B5BCE7 /* firestore.pb.h */, - 618BBE8C20B89AAC00B5BCE7 /* query.pb.cc */, - 618BBE8620B89AAC00B5BCE7 /* query.pb.h */, - 618BBE8F20B89AAC00B5BCE7 /* write.pb.cc */, - 618BBE8B20B89AAC00B5BCE7 /* write.pb.h */, - ); - path = v1beta1; - sourceTree = ""; - }; 618BBE9020B89AAC00B5BCE7 /* type */ = { isa = PBXGroup; children = ( @@ -1927,14 +1927,14 @@ B6FB467D208E9D3C00554BA2 /* async_queue_test.cc in Sources */, 54740A581FC914F000713A1A /* autoid_test.cc in Sources */, AB380D02201BC69F00D97691 /* bits_test.cc in Sources */, - 618BBEA920B89AAC00B5BCE7 /* common.pb.cc in Sources */, + 544129DA21C2DDC800EFB9CC /* common.pb.cc in Sources */, 548DB929200D59F600E00ABC /* comparison_test.cc in Sources */, B67BF449216EB43000CA9097 /* create_noop_connectivity_monitor.cc in Sources */, ABC1D7DC2023A04B00BA84F0 /* credentials_provider_test.cc in Sources */, ABE6637A201FA81900ED349A /* database_id_test.cc in Sources */, AB38D93020236E21000A432D /* database_info_test.cc in Sources */, 546854AA20A36867004BDBD5 /* datastore_test.mm in Sources */, - 618BBEAC20B89AAC00B5BCE7 /* document.pb.cc in Sources */, + 544129DD21C2DDC800EFB9CC /* document.pb.cc in Sources */, B6152AD7202A53CB000E5744 /* document_key_test.cc in Sources */, AB6B908420322E4D00CC290A /* document_test.cc in Sources */, ABC1D7DD2023A04F00BA84F0 /* empty_credentials_provider_test.cc in Sources */, @@ -1949,7 +1949,7 @@ AB356EF7200EA5EB0089B766 /* field_value_test.cc in Sources */, D94A1862B8FB778225DB54A1 /* filesystem_test.cc in Sources */, ABC1D7E42024AFDE00BA84F0 /* firebase_credentials_provider_test.mm in Sources */, - 618BBEAA20B89AAC00B5BCE7 /* firestore.pb.cc in Sources */, + 544129DB21C2DDC800EFB9CC /* firestore.pb.cc in Sources */, AB7BAB342012B519001E0872 /* geo_point_test.cc in Sources */, B6D9649121544D4F00EB9CFB /* grpc_connection_test.cc in Sources */, B6BBE43121262CF400C6A53E /* grpc_stream_test.cc in Sources */, @@ -1973,7 +1973,7 @@ AB380D04201BC6E400D97691 /* ordered_code_test.cc in Sources */, 5A080105CCBFDB6BF3F3772D /* path_test.cc in Sources */, 549CCA5920A36E1F00BCEB75 /* precondition_test.cc in Sources */, - 618BBEAB20B89AAC00B5BCE7 /* query.pb.cc in Sources */, + 544129DC21C2DDC800EFB9CC /* query.pb.cc in Sources */, 6F3CAC76D918D6B0917EDF92 /* query_test.cc in Sources */, B686F2B22025000D0028D6BE /* resource_path_test.cc in Sources */, 54740A571FC914BA00713A1A /* secure_random_test.cc in Sources */, @@ -2000,7 +2000,7 @@ 549CCA5120A36DBC00BCEB75 /* tree_sorted_map_test.cc in Sources */, C80B10E79CDD7EF7843C321E /* type_traits_apple_test.mm in Sources */, ABC1D7DE2023A05300BA84F0 /* user_test.cc in Sources */, - 618BBEAD20B89AAC00B5BCE7 /* write.pb.cc in Sources */, + 544129DE21C2DDC800EFB9CC /* write.pb.cc in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh index 3d499c6b9ac..93ced123945 100755 --- a/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh +++ b/Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh @@ -53,6 +53,6 @@ for text_proto_file in "${text_protos_dir}"/*; do echo "${file_content}" \ | "${SRCROOT}/Pods/!ProtoCompiler/protoc" \ -I"${SRCROOT}/../../Firestore/Protos/protos" \ - --encode=google.firestore.v1beta1."${message_type}" \ - google/firestore/v1beta1/document.proto > "${binary_protos_dir}/${file_name}" + --encode=google.firestore.v1."${message_type}" \ + google/firestore/v1/document.proto > "${binary_protos_dir}/${file_name}" done diff --git a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm index ca868f19397..99d5600273a 100644 --- a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm @@ -22,11 +22,11 @@ #import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" #import "Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h" #import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h" #import "Firestore/Protos/objc/google/type/Latlng.pbobjc.h" #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTQueryData.h" diff --git a/Firestore/Example/Tests/Model/FSTFieldValueTests.mm b/Firestore/Example/Tests/Model/FSTFieldValueTests.mm index 1d29276f95f..c522464ab2a 100644 --- a/Firestore/Example/Tests/Model/FSTFieldValueTests.mm +++ b/Firestore/Example/Tests/Model/FSTFieldValueTests.mm @@ -134,9 +134,9 @@ - (void)testWrapsBooleans { }; - (void)testNormalizesNaNs { - // NOTE: With v1beta1 query semantics, it's no longer as important that our NaN representation - // matches the backend, since all NaNs are defined to sort as equal, but we preserve the - // normalization and this test regardless for now. + // NOTE: With v1 query semantics, it's no longer as important that our NaN representation matches + // the backend, since all NaNs are defined to sort as equal, but we preserve the normalization and + // this test regardless for now. // We use a canonical NaN bit pattern that's common for both Java and Objective-C. Specifically: // - sign: 0 diff --git a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm index f9a28a43610..131a1df4e10 100644 --- a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm +++ b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm @@ -27,11 +27,11 @@ #import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" #import "Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h" #import "Firestore/Protos/objc/google/rpc/Status.pbobjc.h" #import "Firestore/Protos/objc/google/type/Latlng.pbobjc.h" #import "Firestore/Source/API/FIRFieldValue+Internal.h" diff --git a/Firestore/Protos/CMakeLists.txt b/Firestore/Protos/CMakeLists.txt index b30c1874871..ed2c6a1889b 100644 --- a/Firestore/Protos/CMakeLists.txt +++ b/Firestore/Protos/CMakeLists.txt @@ -25,11 +25,11 @@ set( firestore/local/target google/api/annotations google/api/http - google/firestore/v1beta1/common - google/firestore/v1beta1/document - google/firestore/v1beta1/firestore - google/firestore/v1beta1/query - google/firestore/v1beta1/write + google/firestore/v1/common + google/firestore/v1/document + google/firestore/v1/firestore + google/firestore/v1/query + google/firestore/v1/write google/rpc/status google/type/latlng ) @@ -113,8 +113,8 @@ endfunction() # omitted here. set( PROTOBUF_OBJC_GENERATED_SOURCES - ${OUTPUT_DIR}/objc/google/firestore/v1beta1/Firestore.pbrpc.h - ${OUTPUT_DIR}/objc/google/firestore/v1beta1/Firestore.pbrpc.m + ${OUTPUT_DIR}/objc/google/firestore/v1/Firestore.pbrpc.h + ${OUTPUT_DIR}/objc/google/firestore/v1/Firestore.pbrpc.m ) foreach(root ${PROTO_FILE_ROOTS}) get_filename_component(dir ${root} DIRECTORY) diff --git a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc index c4913254e0c..55f3f3c354f 100644 --- a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc +++ b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.cc @@ -52,7 +52,7 @@ class MaybeDocumentDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; const ::firestore::client::NoDocument* no_document_; - const ::google::firestore::v1beta1::Document* document_; + const ::google::firestore::v1::Document* document_; const ::firestore::client::UnknownDocument* unknown_document_; } _MaybeDocument_default_instance_; } // namespace client @@ -111,7 +111,7 @@ void InitDefaultsMaybeDocumentImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsNoDocument(); - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); protobuf_firestore_2flocal_2fmaybe_5fdocument_2eproto::InitDefaultsUnknownDocument(); { void* ptr = &::firestore::client::_MaybeDocument_default_instance_; @@ -189,26 +189,26 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n$firestore/local/maybe_document.proto\022\020" - "firestore.client\032\'google/firestore/v1bet" - "a1/document.proto\032\037google/protobuf/times" - "tamp.proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-" - "\n\tread_time\030\002 \001(\0132\032.google.protobuf.Time" - "stamp\"L\n\017UnknownDocument\022\014\n\004name\030\001 \001(\t\022+" - "\n\007version\030\002 \001(\0132\032.google.protobuf.Timest" - "amp\"\355\001\n\rMaybeDocument\0223\n\013no_document\030\001 \001" - "(\0132\034.firestore.client.NoDocumentH\000\0226\n\010do" - "cument\030\002 \001(\0132\".google.firestore.v1beta1." - "DocumentH\000\022=\n\020unknown_document\030\003 \001(\0132!.f" - "irestore.client.UnknownDocumentH\000\022\037\n\027has" - "_committed_mutations\030\004 \001(\010B\017\n\rdocument_t" - "ypeB/\n#com.google.firebase.firestore.pro" - "toP\001\242\002\005FSTPBb\006proto3" + "firestore.client\032\"google/firestore/v1/do" + "cument.proto\032\037google/protobuf/timestamp." + "proto\"I\n\nNoDocument\022\014\n\004name\030\001 \001(\t\022-\n\trea" + "d_time\030\002 \001(\0132\032.google.protobuf.Timestamp" + "\"L\n\017UnknownDocument\022\014\n\004name\030\001 \001(\t\022+\n\007ver" + "sion\030\002 \001(\0132\032.google.protobuf.Timestamp\"\350" + "\001\n\rMaybeDocument\0223\n\013no_document\030\001 \001(\0132\034." + "firestore.client.NoDocumentH\000\0221\n\010documen" + "t\030\002 \001(\0132\035.google.firestore.v1.DocumentH\000" + "\022=\n\020unknown_document\030\003 \001(\0132!.firestore.c" + "lient.UnknownDocumentH\000\022\037\n\027has_committed" + "_mutations\030\004 \001(\010B\017\n\rdocument_typeB/\n#com" + ".google.firebase.firestore.protoP\001\242\002\005FST" + "PBb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 580); + descriptor, 570); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "firestore/local/maybe_document.proto", &protobuf_RegisterTypes); - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::AddDescriptors(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors(); } @@ -855,8 +855,8 @@ ::google::protobuf::Metadata UnknownDocument::GetMetadata() const { void MaybeDocument::InitAsDefaultInstance() { ::firestore::client::_MaybeDocument_default_instance_.no_document_ = const_cast< ::firestore::client::NoDocument*>( ::firestore::client::NoDocument::internal_default_instance()); - ::firestore::client::_MaybeDocument_default_instance_.document_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); + ::firestore::client::_MaybeDocument_default_instance_.document_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); ::firestore::client::_MaybeDocument_default_instance_.unknown_document_ = const_cast< ::firestore::client::UnknownDocument*>( ::firestore::client::UnknownDocument::internal_default_instance()); } @@ -874,7 +874,7 @@ void MaybeDocument::set_allocated_no_document(::firestore::client::NoDocument* n } // @@protoc_insertion_point(field_set_allocated:firestore.client.MaybeDocument.no_document) } -void MaybeDocument::set_allocated_document(::google::firestore::v1beta1::Document* document) { +void MaybeDocument::set_allocated_document(::google::firestore::v1::Document* document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_document_type(); if (document) { @@ -936,7 +936,7 @@ MaybeDocument::MaybeDocument(const MaybeDocument& from) break; } case kDocument: { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); break; } case kUnknownDocument: { @@ -1046,7 +1046,7 @@ bool MaybeDocument::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Document document = 2; + // .google.firestore.v1.Document document = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1116,7 +1116,7 @@ void MaybeDocument::SerializeWithCachedSizes( 1, *document_type_.no_document_, output); } - // .google.firestore.v1beta1.Document document = 2; + // .google.firestore.v1.Document document = 2; if (has_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *document_type_.document_, output); @@ -1154,7 +1154,7 @@ ::google::protobuf::uint8* MaybeDocument::InternalSerializeWithCachedSizesToArra 1, *document_type_.no_document_, deterministic, target); } - // .google.firestore.v1beta1.Document document = 2; + // .google.firestore.v1.Document document = 2; if (has_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1203,7 +1203,7 @@ size_t MaybeDocument::ByteSizeLong() const { *document_type_.no_document_); break; } - // .google.firestore.v1beta1.Document document = 2; + // .google.firestore.v1.Document document = 2; case kDocument: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1259,7 +1259,7 @@ void MaybeDocument::MergeFrom(const MaybeDocument& from) { break; } case kDocument: { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); break; } case kUnknownDocument: { diff --git a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h index 56c7408952e..0a84d290e15 100644 --- a/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h +++ b/Firestore/Protos/cpp/firestore/local/maybe_document.pb.h @@ -45,7 +45,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -#include "google/firestore/v1beta1/document.pb.h" +#include "google/firestore/v1/document.pb.h" #include // @@protoc_insertion_point(includes) @@ -428,14 +428,14 @@ class MaybeDocument : public ::google::protobuf::Message /* @@protoc_insertion_p ::firestore::client::NoDocument* mutable_no_document(); void set_allocated_no_document(::firestore::client::NoDocument* no_document); - // .google.firestore.v1beta1.Document document = 2; + // .google.firestore.v1.Document document = 2; bool has_document() const; void clear_document(); static const int kDocumentFieldNumber = 2; - const ::google::firestore::v1beta1::Document& document() const; - ::google::firestore::v1beta1::Document* release_document(); - ::google::firestore::v1beta1::Document* mutable_document(); - void set_allocated_document(::google::firestore::v1beta1::Document* 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); // .firestore.client.UnknownDocument unknown_document = 3; bool has_unknown_document() const; @@ -462,7 +462,7 @@ class MaybeDocument : public ::google::protobuf::Message /* @@protoc_insertion_p union DocumentTypeUnion { DocumentTypeUnion() {} ::firestore::client::NoDocument* no_document_; - ::google::firestore::v1beta1::Document* document_; + ::google::firestore::v1::Document* document_; ::firestore::client::UnknownDocument* unknown_document_; } document_type_; mutable int _cached_size_; @@ -726,35 +726,35 @@ inline ::firestore::client::NoDocument* MaybeDocument::mutable_no_document() { return document_type_.no_document_; } -// .google.firestore.v1beta1.Document document = 2; +// .google.firestore.v1.Document document = 2; inline bool MaybeDocument::has_document() const { return document_type_case() == kDocument; } inline void MaybeDocument::set_has_document() { _oneof_case_[0] = kDocument; } -inline ::google::firestore::v1beta1::Document* MaybeDocument::release_document() { +inline ::google::firestore::v1::Document* MaybeDocument::release_document() { // @@protoc_insertion_point(field_release:firestore.client.MaybeDocument.document) if (has_document()) { clear_has_document_type(); - ::google::firestore::v1beta1::Document* temp = document_type_.document_; + ::google::firestore::v1::Document* temp = document_type_.document_; document_type_.document_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Document& MaybeDocument::document() const { +inline const ::google::firestore::v1::Document& MaybeDocument::document() const { // @@protoc_insertion_point(field_get:firestore.client.MaybeDocument.document) return has_document() ? *document_type_.document_ - : *reinterpret_cast< ::google::firestore::v1beta1::Document*>(&::google::firestore::v1beta1::_Document_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Document*>(&::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* MaybeDocument::mutable_document() { +inline ::google::firestore::v1::Document* MaybeDocument::mutable_document() { if (!has_document()) { clear_document_type(); set_has_document(); - document_type_.document_ = new ::google::firestore::v1beta1::Document; + document_type_.document_ = new ::google::firestore::v1::Document; } // @@protoc_insertion_point(field_mutable:firestore.client.MaybeDocument.document) return document_type_.document_; diff --git a/Firestore/Protos/cpp/firestore/local/mutation.pb.cc b/Firestore/Protos/cpp/firestore/local/mutation.pb.cc index e2dfb718591..ebe72a4e3cf 100644 --- a/Firestore/Protos/cpp/firestore/local/mutation.pb.cc +++ b/Firestore/Protos/cpp/firestore/local/mutation.pb.cc @@ -79,7 +79,7 @@ void InitDefaultsWriteBatchImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { void* ptr = &::firestore::client::_WriteBatch_default_instance_; @@ -147,23 +147,22 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\036firestore/local/mutation.proto\022\020firest" - "ore.client\032$google/firestore/v1beta1/wri" - "te.proto\032\037google/protobuf/timestamp.prot" - "o\"N\n\rMutationQueue\022\"\n\032last_acknowledged_" - "batch_id\030\001 \001(\005\022\031\n\021last_stream_token\030\002 \001(" - "\014\"\273\001\n\nWriteBatch\022\020\n\010batch_id\030\001 \001(\005\022/\n\006wr" - "ites\030\002 \003(\0132\037.google.firestore.v1beta1.Wr" - "ite\0224\n\020local_write_time\030\003 \001(\0132\032.google.p" - "rotobuf.Timestamp\0224\n\013base_writes\030\004 \003(\0132\037" - ".google.firestore.v1beta1.WriteB/\n#com.g" - "oogle.firebase.firestore.protoP\001\242\002\005FSTPB" - "b\006proto3" + "ore.client\032\037google/firestore/v1/write.pr" + "oto\032\037google/protobuf/timestamp.proto\"N\n\r" + "MutationQueue\022\"\n\032last_acknowledged_batch" + "_id\030\001 \001(\005\022\031\n\021last_stream_token\030\002 \001(\014\"\261\001\n" + "\nWriteBatch\022\020\n\010batch_id\030\001 \001(\005\022*\n\006writes\030" + "\002 \003(\0132\032.google.firestore.v1.Write\0224\n\020loc" + "al_write_time\030\003 \001(\0132\032.google.protobuf.Ti" + "mestamp\022/\n\013base_writes\030\004 \003(\0132\032.google.fi" + "restore.v1.WriteB/\n#com.google.firebase." + "firestore.protoP\001\242\002\005FSTPBb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 448); + descriptor, 433); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "firestore/local/mutation.proto", &protobuf_RegisterTypes); - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::AddDescriptors(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors(); } @@ -592,7 +591,7 @@ bool WriteBatch::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -615,7 +614,7 @@ bool WriteBatch::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.Write base_writes = 4; + // repeated .google.firestore.v1.Write base_writes = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -657,7 +656,7 @@ void WriteBatch::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->batch_id(), output); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -670,7 +669,7 @@ void WriteBatch::SerializeWithCachedSizes( 3, *this->local_write_time_, output); } - // repeated .google.firestore.v1beta1.Write base_writes = 4; + // repeated .google.firestore.v1.Write base_writes = 4; for (unsigned int i = 0, n = static_cast(this->base_writes_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -696,7 +695,7 @@ ::google::protobuf::uint8* WriteBatch::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->batch_id(), target); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -711,7 +710,7 @@ ::google::protobuf::uint8* WriteBatch::InternalSerializeWithCachedSizesToArray( 3, *this->local_write_time_, deterministic, target); } - // repeated .google.firestore.v1beta1.Write base_writes = 4; + // repeated .google.firestore.v1.Write base_writes = 4; for (unsigned int i = 0, n = static_cast(this->base_writes_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -736,7 +735,7 @@ size_t WriteBatch::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; { unsigned int count = static_cast(this->writes_size()); total_size += 1UL * count; @@ -747,7 +746,7 @@ size_t WriteBatch::ByteSizeLong() const { } } - // repeated .google.firestore.v1beta1.Write base_writes = 4; + // repeated .google.firestore.v1.Write base_writes = 4; { unsigned int count = static_cast(this->base_writes_size()); total_size += 1UL * count; diff --git a/Firestore/Protos/cpp/firestore/local/mutation.pb.h b/Firestore/Protos/cpp/firestore/local/mutation.pb.h index 7260914e6a6..7a25ade6d1b 100644 --- a/Firestore/Protos/cpp/firestore/local/mutation.pb.h +++ b/Firestore/Protos/cpp/firestore/local/mutation.pb.h @@ -45,7 +45,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -#include "google/firestore/v1beta1/write.pb.h" +#include "google/firestore/v1/write.pb.h" #include // @@protoc_insertion_point(includes) @@ -280,28 +280,28 @@ class WriteBatch : public ::google::protobuf::Message /* @@protoc_insertion_poin // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; int writes_size() const; void clear_writes(); static const int kWritesFieldNumber = 2; - const ::google::firestore::v1beta1::Write& writes(int index) const; - ::google::firestore::v1beta1::Write* mutable_writes(int index); - ::google::firestore::v1beta1::Write* add_writes(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* + const ::google::firestore::v1::Write& writes(int index) const; + ::google::firestore::v1::Write* mutable_writes(int index); + ::google::firestore::v1::Write* add_writes(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* mutable_writes(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& writes() const; - // repeated .google.firestore.v1beta1.Write base_writes = 4; + // repeated .google.firestore.v1.Write base_writes = 4; int base_writes_size() const; void clear_base_writes(); static const int kBaseWritesFieldNumber = 4; - const ::google::firestore::v1beta1::Write& base_writes(int index) const; - ::google::firestore::v1beta1::Write* mutable_base_writes(int index); - ::google::firestore::v1beta1::Write* add_base_writes(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* + const ::google::firestore::v1::Write& base_writes(int index) const; + ::google::firestore::v1::Write* mutable_base_writes(int index); + ::google::firestore::v1::Write* add_base_writes(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* mutable_base_writes(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& base_writes() const; // .google.protobuf.Timestamp local_write_time = 3; @@ -323,8 +323,8 @@ class WriteBatch : public ::google::protobuf::Message /* @@protoc_insertion_poin private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write > writes_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write > base_writes_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write > writes_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write > base_writes_; ::google::protobuf::Timestamp* local_write_time_; ::google::protobuf::int32 batch_id_; mutable int _cached_size_; @@ -427,28 +427,28 @@ inline void WriteBatch::set_batch_id(::google::protobuf::int32 value) { // @@protoc_insertion_point(field_set:firestore.client.WriteBatch.batch_id) } -// repeated .google.firestore.v1beta1.Write writes = 2; +// repeated .google.firestore.v1.Write writes = 2; inline int WriteBatch::writes_size() const { return writes_.size(); } -inline const ::google::firestore::v1beta1::Write& WriteBatch::writes(int index) const { +inline const ::google::firestore::v1::Write& WriteBatch::writes(int index) const { // @@protoc_insertion_point(field_get:firestore.client.WriteBatch.writes) return writes_.Get(index); } -inline ::google::firestore::v1beta1::Write* WriteBatch::mutable_writes(int index) { +inline ::google::firestore::v1::Write* WriteBatch::mutable_writes(int index) { // @@protoc_insertion_point(field_mutable:firestore.client.WriteBatch.writes) return writes_.Mutable(index); } -inline ::google::firestore::v1beta1::Write* WriteBatch::add_writes() { +inline ::google::firestore::v1::Write* WriteBatch::add_writes() { // @@protoc_insertion_point(field_add:firestore.client.WriteBatch.writes) return writes_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* WriteBatch::mutable_writes() { // @@protoc_insertion_point(field_mutable_list:firestore.client.WriteBatch.writes) return &writes_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& WriteBatch::writes() const { // @@protoc_insertion_point(field_list:firestore.client.WriteBatch.writes) return writes_; @@ -499,28 +499,28 @@ inline void WriteBatch::set_allocated_local_write_time(::google::protobuf::Times // @@protoc_insertion_point(field_set_allocated:firestore.client.WriteBatch.local_write_time) } -// repeated .google.firestore.v1beta1.Write base_writes = 4; +// repeated .google.firestore.v1.Write base_writes = 4; inline int WriteBatch::base_writes_size() const { return base_writes_.size(); } -inline const ::google::firestore::v1beta1::Write& WriteBatch::base_writes(int index) const { +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); } -inline ::google::firestore::v1beta1::Write* WriteBatch::mutable_base_writes(int index) { +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); } -inline ::google::firestore::v1beta1::Write* WriteBatch::add_base_writes() { +inline ::google::firestore::v1::Write* WriteBatch::add_base_writes() { // @@protoc_insertion_point(field_add:firestore.client.WriteBatch.base_writes) return base_writes_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* WriteBatch::mutable_base_writes() { // @@protoc_insertion_point(field_mutable_list:firestore.client.WriteBatch.base_writes) return &base_writes_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& WriteBatch::base_writes() const { // @@protoc_insertion_point(field_list:firestore.client.WriteBatch.base_writes) return base_writes_; diff --git a/Firestore/Protos/cpp/firestore/local/target.pb.cc b/Firestore/Protos/cpp/firestore/local/target.pb.cc index 6f9a8a186bc..937a9927bfb 100644 --- a/Firestore/Protos/cpp/firestore/local/target.pb.cc +++ b/Firestore/Protos/cpp/firestore/local/target.pb.cc @@ -41,8 +41,8 @@ class TargetDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::Target_QueryTarget* query_; - const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_; + const ::google::firestore::v1::Target_QueryTarget* query_; + const ::google::firestore::v1::Target_DocumentsTarget* documents_; } _Target_default_instance_; class TargetGlobalDefaultTypeInternal { public: @@ -61,8 +61,8 @@ void InitDefaultsTargetImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); { void* ptr = &::firestore::client::_Target_default_instance_; new (ptr) ::firestore::client::Target(); @@ -156,28 +156,27 @@ void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { "\n\034firestore/local/target.proto\022\020firestor" - "e.client\032(google/firestore/v1beta1/fires" - "tore.proto\032\037google/protobuf/timestamp.pr" - "oto\"\241\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020sna" - "pshot_version\030\002 \001(\0132\032.google.protobuf.Ti" - "mestamp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_li" - "sten_sequence_number\030\004 \001(\003\022=\n\005query\030\005 \001(" - "\0132,.google.firestore.v1beta1.Target.Quer" - "yTargetH\000\022E\n\tdocuments\030\006 \001(\01320.google.fi" - "restore.v1beta1.Target.DocumentsTargetH\000" - "B\r\n\013target_type\"\251\001\n\014TargetGlobal\022\031\n\021high" - "est_target_id\030\001 \001(\005\022&\n\036highest_listen_se" - "quence_number\030\002 \001(\003\022@\n\034last_remote_snaps" - "hot_version\030\003 \001(\0132\032.google.protobuf.Time" - "stamp\022\024\n\014target_count\030\004 \001(\005B/\n#com.googl" - "e.firebase.firestore.protoP\001\242\002\005FSTPBb\006pr" - "oto3" + "e.client\032#google/firestore/v1/firestore." + "proto\032\037google/protobuf/timestamp.proto\"\227" + "\002\n\006Target\022\021\n\ttarget_id\030\001 \001(\005\0224\n\020snapshot" + "_version\030\002 \001(\0132\032.google.protobuf.Timesta" + "mp\022\024\n\014resume_token\030\003 \001(\014\022#\n\033last_listen_" + "sequence_number\030\004 \001(\003\0228\n\005query\030\005 \001(\0132\'.g" + "oogle.firestore.v1.Target.QueryTargetH\000\022" + "@\n\tdocuments\030\006 \001(\0132+.google.firestore.v1" + ".Target.DocumentsTargetH\000B\r\n\013target_type" + "\"\251\001\n\014TargetGlobal\022\031\n\021highest_target_id\030\001" + " \001(\005\022&\n\036highest_listen_sequence_number\030\002" + " \001(\003\022@\n\034last_remote_snapshot_version\030\003 \001" + "(\0132\032.google.protobuf.Timestamp\022\024\n\014target" + "_count\030\004 \001(\005B/\n#com.google.firebase.fire" + "store.protoP\001\242\002\005FSTPBb\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 644); + descriptor, 629); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "firestore/local/target.proto", &protobuf_RegisterTypes); - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::AddDescriptors(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors(); } @@ -200,10 +199,10 @@ namespace client { void Target::InitAsDefaultInstance() { ::firestore::client::_Target_default_instance_._instance.get_mutable()->snapshot_version_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); - ::firestore::client::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>( - ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance()); - ::firestore::client::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>( - ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance()); + ::firestore::client::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>( + ::google::firestore::v1::Target_QueryTarget::internal_default_instance()); + ::firestore::client::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>( + ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance()); } void Target::clear_snapshot_version() { if (GetArenaNoVirtual() == NULL && snapshot_version_ != NULL) { @@ -211,7 +210,7 @@ void Target::clear_snapshot_version() { } snapshot_version_ = NULL; } -void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) { +void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_target_type(); if (query) { @@ -231,7 +230,7 @@ void Target::clear_query() { clear_has_target_type(); } } -void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) { +void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_target_type(); if (documents) { @@ -288,11 +287,11 @@ Target::Target(const Target& from) clear_has_target_type(); switch (from.target_type_case()) { case kQuery: { - mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query()); + mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query()); break; } case kDocuments: { - mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents()); + mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents()); break; } case TARGET_TYPE_NOT_SET: { @@ -446,7 +445,7 @@ bool Target::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Target.QueryTarget query = 5; + // .google.firestore.v1.Target.QueryTarget query = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { @@ -458,7 +457,7 @@ bool Target::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + // .google.firestore.v1.Target.DocumentsTarget documents = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -518,13 +517,13 @@ void Target::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->last_listen_sequence_number(), output); } - // .google.firestore.v1beta1.Target.QueryTarget query = 5; + // .google.firestore.v1.Target.QueryTarget query = 5; if (has_query()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, *target_type_.query_, output); } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + // .google.firestore.v1.Target.DocumentsTarget documents = 6; if (has_documents()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *target_type_.documents_, output); @@ -568,14 +567,14 @@ ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->last_listen_sequence_number(), target); } - // .google.firestore.v1beta1.Target.QueryTarget query = 5; + // .google.firestore.v1.Target.QueryTarget query = 5; if (has_query()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, *target_type_.query_, deterministic, target); } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + // .google.firestore.v1.Target.DocumentsTarget documents = 6; if (has_documents()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -628,14 +627,14 @@ size_t Target::ByteSizeLong() const { } switch (target_type_case()) { - // .google.firestore.v1beta1.Target.QueryTarget query = 5; + // .google.firestore.v1.Target.QueryTarget query = 5; case kQuery: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *target_type_.query_); break; } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + // .google.firestore.v1.Target.DocumentsTarget documents = 6; case kDocuments: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -690,11 +689,11 @@ void Target::MergeFrom(const Target& from) { } switch (from.target_type_case()) { case kQuery: { - mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query()); + mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query()); break; } case kDocuments: { - mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents()); + mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents()); break; } case TARGET_TYPE_NOT_SET: { diff --git a/Firestore/Protos/cpp/firestore/local/target.pb.h b/Firestore/Protos/cpp/firestore/local/target.pb.h index 34ea2428ab1..e14bc67eccd 100644 --- a/Firestore/Protos/cpp/firestore/local/target.pb.h +++ b/Firestore/Protos/cpp/firestore/local/target.pb.h @@ -45,7 +45,7 @@ #include // IWYU pragma: export #include // IWYU pragma: export #include -#include "google/firestore/v1beta1/firestore.pb.h" +#include "google/firestore/v1/firestore.pb.h" #include // @@protoc_insertion_point(includes) @@ -207,23 +207,23 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl ::google::protobuf::int32 target_id() const; void set_target_id(::google::protobuf::int32 value); - // .google.firestore.v1beta1.Target.QueryTarget query = 5; + // .google.firestore.v1.Target.QueryTarget query = 5; bool has_query() const; void clear_query(); static const int kQueryFieldNumber = 5; - const ::google::firestore::v1beta1::Target_QueryTarget& query() const; - ::google::firestore::v1beta1::Target_QueryTarget* release_query(); - ::google::firestore::v1beta1::Target_QueryTarget* mutable_query(); - void set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* 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); - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + // .google.firestore.v1.Target.DocumentsTarget documents = 6; bool has_documents() const; void clear_documents(); static const int kDocumentsFieldNumber = 6; - const ::google::firestore::v1beta1::Target_DocumentsTarget& documents() const; - ::google::firestore::v1beta1::Target_DocumentsTarget* release_documents(); - ::google::firestore::v1beta1::Target_DocumentsTarget* mutable_documents(); - void set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* 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); TargetTypeCase target_type_case() const; // @@protoc_insertion_point(class_scope:firestore.client.Target) @@ -242,8 +242,8 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl ::google::protobuf::int32 target_id_; union TargetTypeUnion { TargetTypeUnion() {} - ::google::firestore::v1beta1::Target_QueryTarget* query_; - ::google::firestore::v1beta1::Target_DocumentsTarget* documents_; + ::google::firestore::v1::Target_QueryTarget* query_; + ::google::firestore::v1::Target_DocumentsTarget* documents_; } target_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; @@ -511,69 +511,69 @@ inline void Target::set_last_listen_sequence_number(::google::protobuf::int64 va // @@protoc_insertion_point(field_set:firestore.client.Target.last_listen_sequence_number) } -// .google.firestore.v1beta1.Target.QueryTarget query = 5; +// .google.firestore.v1.Target.QueryTarget query = 5; inline bool Target::has_query() const { return target_type_case() == kQuery; } inline void Target::set_has_query() { _oneof_case_[0] = kQuery; } -inline ::google::firestore::v1beta1::Target_QueryTarget* Target::release_query() { +inline ::google::firestore::v1::Target_QueryTarget* Target::release_query() { // @@protoc_insertion_point(field_release:firestore.client.Target.query) if (has_query()) { clear_has_target_type(); - ::google::firestore::v1beta1::Target_QueryTarget* temp = target_type_.query_; + ::google::firestore::v1::Target_QueryTarget* temp = target_type_.query_; target_type_.query_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Target_QueryTarget& Target::query() const { +inline const ::google::firestore::v1::Target_QueryTarget& Target::query() const { // @@protoc_insertion_point(field_get:firestore.client.Target.query) return has_query() ? *target_type_.query_ - : *reinterpret_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Target_QueryTarget*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_); } -inline ::google::firestore::v1beta1::Target_QueryTarget* Target::mutable_query() { +inline ::google::firestore::v1::Target_QueryTarget* Target::mutable_query() { if (!has_query()) { clear_target_type(); set_has_query(); - target_type_.query_ = new ::google::firestore::v1beta1::Target_QueryTarget; + target_type_.query_ = new ::google::firestore::v1::Target_QueryTarget; } // @@protoc_insertion_point(field_mutable:firestore.client.Target.query) return target_type_.query_; } -// .google.firestore.v1beta1.Target.DocumentsTarget documents = 6; +// .google.firestore.v1.Target.DocumentsTarget documents = 6; inline bool Target::has_documents() const { return target_type_case() == kDocuments; } inline void Target::set_has_documents() { _oneof_case_[0] = kDocuments; } -inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::release_documents() { +inline ::google::firestore::v1::Target_DocumentsTarget* Target::release_documents() { // @@protoc_insertion_point(field_release:firestore.client.Target.documents) if (has_documents()) { clear_has_target_type(); - ::google::firestore::v1beta1::Target_DocumentsTarget* temp = target_type_.documents_; + ::google::firestore::v1::Target_DocumentsTarget* temp = target_type_.documents_; target_type_.documents_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Target_DocumentsTarget& Target::documents() const { +inline const ::google::firestore::v1::Target_DocumentsTarget& Target::documents() const { // @@protoc_insertion_point(field_get:firestore.client.Target.documents) return has_documents() ? *target_type_.documents_ - : *reinterpret_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Target_DocumentsTarget*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_); } -inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::mutable_documents() { +inline ::google::firestore::v1::Target_DocumentsTarget* Target::mutable_documents() { if (!has_documents()) { clear_target_type(); set_has_documents(); - target_type_.documents_ = new ::google::firestore::v1beta1::Target_DocumentsTarget; + target_type_.documents_ = new ::google::firestore::v1::Target_DocumentsTarget; } // @@protoc_insertion_point(field_mutable:firestore.client.Target.documents) return target_type_.documents_; diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.cc b/Firestore/Protos/cpp/google/firestore/v1/common.pb.cc similarity index 78% rename from Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.cc rename to Firestore/Protos/cpp/google/firestore/v1/common.pb.cc index bbb5306b213..10226bd45ad 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.cc +++ b/Firestore/Protos/cpp/google/firestore/v1/common.pb.cc @@ -15,9 +15,9 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/common.proto +// source: google/firestore/v1/common.proto -#include "google/firestore/v1beta1/common.pb.h" +#include "google/firestore/v1/common.pb.h" #include @@ -37,7 +37,7 @@ // @@protoc_insertion_point(includes) namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class DocumentMaskDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -65,13 +65,13 @@ class TransactionOptionsDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::TransactionOptions_ReadOnly* read_only_; - const ::google::firestore::v1beta1::TransactionOptions_ReadWrite* read_write_; + const ::google::firestore::v1::TransactionOptions_ReadOnly* read_only_; + const ::google::firestore::v1::TransactionOptions_ReadWrite* read_write_; } _TransactionOptions_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google -namespace protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fcommon_2eproto { void InitDefaultsDocumentMaskImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -81,11 +81,11 @@ void InitDefaultsDocumentMaskImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_DocumentMask_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentMask(); + void* ptr = &::google::firestore::v1::_DocumentMask_default_instance_; + new (ptr) ::google::firestore::v1::DocumentMask(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentMask::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentMask::InitAsDefaultInstance(); } void InitDefaultsDocumentMask() { @@ -103,11 +103,11 @@ void InitDefaultsPreconditionImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_Precondition_default_instance_; - new (ptr) ::google::firestore::v1beta1::Precondition(); + void* ptr = &::google::firestore::v1::_Precondition_default_instance_; + new (ptr) ::google::firestore::v1::Precondition(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Precondition::InitAsDefaultInstance(); + ::google::firestore::v1::Precondition::InitAsDefaultInstance(); } void InitDefaultsPrecondition() { @@ -124,11 +124,11 @@ void InitDefaultsTransactionOptions_ReadWriteImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_TransactionOptions_ReadWrite_default_instance_; - new (ptr) ::google::firestore::v1beta1::TransactionOptions_ReadWrite(); + void* ptr = &::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_; + new (ptr) ::google::firestore::v1::TransactionOptions_ReadWrite(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::TransactionOptions_ReadWrite::InitAsDefaultInstance(); + ::google::firestore::v1::TransactionOptions_ReadWrite::InitAsDefaultInstance(); } void InitDefaultsTransactionOptions_ReadWrite() { @@ -146,11 +146,11 @@ void InitDefaultsTransactionOptions_ReadOnlyImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_TransactionOptions_ReadOnly_default_instance_; - new (ptr) ::google::firestore::v1beta1::TransactionOptions_ReadOnly(); + void* ptr = &::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_; + new (ptr) ::google::firestore::v1::TransactionOptions_ReadOnly(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::TransactionOptions_ReadOnly::InitAsDefaultInstance(); + ::google::firestore::v1::TransactionOptions_ReadOnly::InitAsDefaultInstance(); } void InitDefaultsTransactionOptions_ReadOnly() { @@ -166,14 +166,14 @@ void InitDefaultsTransactionOptionsImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); { - void* ptr = &::google::firestore::v1beta1::_TransactionOptions_default_instance_; - new (ptr) ::google::firestore::v1beta1::TransactionOptions(); + void* ptr = &::google::firestore::v1::_TransactionOptions_default_instance_; + new (ptr) ::google::firestore::v1::TransactionOptions(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::TransactionOptions::InitAsDefaultInstance(); + ::google::firestore::v1::TransactionOptions::InitAsDefaultInstance(); } void InitDefaultsTransactionOptions() { @@ -185,62 +185,62 @@ ::google::protobuf::Metadata file_level_metadata[5]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentMask, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentMask, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentMask, field_paths_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentMask, field_paths_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Precondition, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Precondition, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::PreconditionDefaultTypeInternal, exists_), - offsetof(::google::firestore::v1beta1::PreconditionDefaultTypeInternal, update_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Precondition, condition_type_), + offsetof(::google::firestore::v1::PreconditionDefaultTypeInternal, exists_), + offsetof(::google::firestore::v1::PreconditionDefaultTypeInternal, update_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Precondition, condition_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions_ReadWrite, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions_ReadWrite, retry_transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadWrite, retry_transaction_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions_ReadOnly, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions_ReadOnly, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::TransactionOptions_ReadOnlyDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions_ReadOnly, consistency_selector_), + offsetof(::google::firestore::v1::TransactionOptions_ReadOnlyDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions_ReadOnly, consistency_selector_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::TransactionOptionsDefaultTypeInternal, read_only_), - offsetof(::google::firestore::v1beta1::TransactionOptionsDefaultTypeInternal, read_write_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TransactionOptions, mode_), + offsetof(::google::firestore::v1::TransactionOptionsDefaultTypeInternal, read_only_), + offsetof(::google::firestore::v1::TransactionOptionsDefaultTypeInternal, read_write_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TransactionOptions, mode_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::firestore::v1beta1::DocumentMask)}, - { 6, -1, sizeof(::google::firestore::v1beta1::Precondition)}, - { 14, -1, sizeof(::google::firestore::v1beta1::TransactionOptions_ReadWrite)}, - { 20, -1, sizeof(::google::firestore::v1beta1::TransactionOptions_ReadOnly)}, - { 27, -1, sizeof(::google::firestore::v1beta1::TransactionOptions)}, + { 0, -1, sizeof(::google::firestore::v1::DocumentMask)}, + { 6, -1, sizeof(::google::firestore::v1::Precondition)}, + { 14, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadWrite)}, + { 20, -1, sizeof(::google::firestore::v1::TransactionOptions_ReadOnly)}, + { 27, -1, sizeof(::google::firestore::v1::TransactionOptions)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::firestore::v1beta1::_DocumentMask_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Precondition_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_TransactionOptions_ReadWrite_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_TransactionOptions_ReadOnly_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_TransactionOptions_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentMask_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Precondition_default_instance_), + reinterpret_cast(&::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_), + reinterpret_cast(&::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_), + reinterpret_cast(&::google::firestore::v1::_TransactionOptions_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/firestore/v1beta1/common.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/firestore/v1/common.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, NULL, NULL); } @@ -258,31 +258,30 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n%google/firestore/v1beta1/common.proto\022" - "\030google.firestore.v1beta1\032\034google/api/an" - "notations.proto\032\037google/protobuf/timesta" - "mp.proto\"#\n\014DocumentMask\022\023\n\013field_paths\030" - "\001 \003(\t\"e\n\014Precondition\022\020\n\006exists\030\001 \001(\010H\000\022" - "1\n\013update_time\030\002 \001(\0132\032.google.protobuf.T" - "imestampH\000B\020\n\016condition_type\"\263\002\n\022Transac" - "tionOptions\022J\n\tread_only\030\002 \001(\01325.google." - "firestore.v1beta1.TransactionOptions.Rea" - "dOnlyH\000\022L\n\nread_write\030\003 \001(\01326.google.fir" - "estore.v1beta1.TransactionOptions.ReadWr" - "iteH\000\032&\n\tReadWrite\022\031\n\021retry_transaction\030" - "\001 \001(\014\032S\n\010ReadOnly\022/\n\tread_time\030\002 \001(\0132\032.g" - "oogle.protobuf.TimestampH\000B\026\n\024consistenc" - "y_selectorB\006\n\004modeB\271\001\n\034com.google.firest" - "ore.v1beta1B\013CommonProtoP\001ZAgoogle.golan" - "g.org/genproto/googleapis/firestore/v1be" - "ta1;firestore\242\002\004GCFS\252\002\036Google.Cloud.Fire" - "store.V1Beta1\312\002\036Google\\Cloud\\Firestore\\V" - "1beta1b\006proto3" + "\n google/firestore/v1/common.proto\022\023goog" + "le.firestore.v1\032\034google/api/annotations." + "proto\032\037google/protobuf/timestamp.proto\"#" + "\n\014DocumentMask\022\023\n\013field_paths\030\001 \003(\t\"e\n\014P" + "recondition\022\020\n\006exists\030\001 \001(\010H\000\0221\n\013update_" + "time\030\002 \001(\0132\032.google.protobuf.TimestampH\000" + "B\020\n\016condition_type\"\251\002\n\022TransactionOption" + "s\022E\n\tread_only\030\002 \001(\01320.google.firestore." + "v1.TransactionOptions.ReadOnlyH\000\022G\n\nread" + "_write\030\003 \001(\01321.google.firestore.v1.Trans" + "actionOptions.ReadWriteH\000\032&\n\tReadWrite\022\031" + "\n\021retry_transaction\030\001 \001(\014\032S\n\010ReadOnly\022/\n" + "\tread_time\030\002 \001(\0132\032.google.protobuf.Times" + "tampH\000B\026\n\024consistency_selectorB\006\n\004modeB\257" + "\001\n\027com.google.firestore.v1B\013CommonProtoP" + "\001Z p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -392,7 +391,7 @@ bool DocumentMask::MergePartialFromCodedStream( this->field_paths(this->field_paths_size() - 1).data(), static_cast(this->field_paths(this->field_paths_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DocumentMask.field_paths")); + "google.firestore.v1.DocumentMask.field_paths")); } else { goto handle_unusual; } @@ -411,17 +410,17 @@ bool DocumentMask::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentMask) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentMask) return false; #undef DO_ } void DocumentMask::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentMask) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -430,7 +429,7 @@ void DocumentMask::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_paths(i).data(), static_cast(this->field_paths(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentMask.field_paths"); + "google.firestore.v1.DocumentMask.field_paths"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->field_paths(i), output); } @@ -439,13 +438,13 @@ void DocumentMask::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentMask) } ::google::protobuf::uint8* DocumentMask::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentMask) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -454,7 +453,7 @@ ::google::protobuf::uint8* DocumentMask::InternalSerializeWithCachedSizesToArray ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_paths(i).data(), static_cast(this->field_paths(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentMask.field_paths"); + "google.firestore.v1.DocumentMask.field_paths"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->field_paths(i), target); } @@ -463,12 +462,12 @@ ::google::protobuf::uint8* DocumentMask::InternalSerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentMask) return target; } size_t DocumentMask::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentMask) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentMask) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -492,22 +491,22 @@ size_t DocumentMask::ByteSizeLong() const { } void DocumentMask::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentMask) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentMask) GOOGLE_DCHECK_NE(&from, this); const DocumentMask* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentMask) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentMask) MergeFrom(*source); } } void DocumentMask::MergeFrom(const DocumentMask& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentMask) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentMask) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -517,14 +516,14 @@ void DocumentMask::MergeFrom(const DocumentMask& from) { } void DocumentMask::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentMask) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentMask) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentMask::CopyFrom(const DocumentMask& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentMask) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentMask) if (&from == this) return; Clear(); MergeFrom(from); @@ -546,16 +545,16 @@ void DocumentMask::InternalSwap(DocumentMask* other) { } ::google::protobuf::Metadata DocumentMask::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Precondition::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_Precondition_default_instance_.exists_ = false; - ::google::firestore::v1beta1::_Precondition_default_instance_.update_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_Precondition_default_instance_.exists_ = false; + ::google::firestore::v1::_Precondition_default_instance_.update_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void Precondition::set_allocated_update_time(::google::protobuf::Timestamp* update_time) { @@ -571,7 +570,7 @@ void Precondition::set_allocated_update_time(::google::protobuf::Timestamp* upda set_has_update_time(); condition_type_.update_time_ = update_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Precondition.update_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Precondition.update_time) } void Precondition::clear_update_time() { if (has_update_time()) { @@ -587,10 +586,10 @@ const int Precondition::kUpdateTimeFieldNumber; Precondition::Precondition() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(constructor:google.firestore.v1.Precondition) } Precondition::Precondition(const Precondition& from) : ::google::protobuf::Message(), @@ -611,7 +610,7 @@ Precondition::Precondition(const Precondition& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Precondition) } void Precondition::SharedCtor() { @@ -620,7 +619,7 @@ void Precondition::SharedCtor() { } Precondition::~Precondition() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(destructor:google.firestore.v1.Precondition) SharedDtor(); } @@ -636,12 +635,12 @@ void Precondition::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Precondition::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Precondition& Precondition::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition(); return *internal_default_instance(); } @@ -654,7 +653,7 @@ Precondition* Precondition::New(::google::protobuf::Arena* arena) const { } void Precondition::clear_condition_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Precondition) switch (condition_type_case()) { case kExists: { // No need to clear @@ -673,7 +672,7 @@ void Precondition::clear_condition_type() { void Precondition::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Precondition) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -686,7 +685,7 @@ bool Precondition::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Precondition) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -731,17 +730,17 @@ bool Precondition::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Precondition) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Precondition) return false; #undef DO_ } void Precondition::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Precondition) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -760,13 +759,13 @@ void Precondition::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Precondition) } ::google::protobuf::uint8* Precondition::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Precondition) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -786,12 +785,12 @@ ::google::protobuf::uint8* Precondition::InternalSerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Precondition) return target; } size_t Precondition::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Precondition) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -824,22 +823,22 @@ size_t Precondition::ByteSizeLong() const { } void Precondition::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Precondition) GOOGLE_DCHECK_NE(&from, this); const Precondition* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Precondition) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Precondition) MergeFrom(*source); } } void Precondition::MergeFrom(const Precondition& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Precondition) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -861,14 +860,14 @@ void Precondition::MergeFrom(const Precondition& from) { } void Precondition::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Precondition) if (&from == this) return; Clear(); MergeFrom(from); } void Precondition::CopyFrom(const Precondition& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Precondition) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Precondition) if (&from == this) return; Clear(); MergeFrom(from); @@ -891,8 +890,8 @@ void Precondition::InternalSwap(Precondition* other) { } ::google::protobuf::Metadata Precondition::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -907,10 +906,10 @@ const int TransactionOptions_ReadWrite::kRetryTransactionFieldNumber; TransactionOptions_ReadWrite::TransactionOptions_ReadWrite() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions.ReadWrite) } TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(const TransactionOptions_ReadWrite& from) : ::google::protobuf::Message(), @@ -921,7 +920,7 @@ TransactionOptions_ReadWrite::TransactionOptions_ReadWrite(const TransactionOpti if (from.retry_transaction().size() > 0) { retry_transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.retry_transaction_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadWrite) } void TransactionOptions_ReadWrite::SharedCtor() { @@ -930,7 +929,7 @@ void TransactionOptions_ReadWrite::SharedCtor() { } TransactionOptions_ReadWrite::~TransactionOptions_ReadWrite() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadWrite) SharedDtor(); } @@ -944,12 +943,12 @@ void TransactionOptions_ReadWrite::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* TransactionOptions_ReadWrite::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const TransactionOptions_ReadWrite& TransactionOptions_ReadWrite::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWrite(); return *internal_default_instance(); } @@ -962,7 +961,7 @@ TransactionOptions_ReadWrite* TransactionOptions_ReadWrite::New(::google::protob } void TransactionOptions_ReadWrite::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadWrite) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -975,7 +974,7 @@ bool TransactionOptions_ReadWrite::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadWrite) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1005,17 +1004,17 @@ bool TransactionOptions_ReadWrite::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadWrite) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadWrite) return false; #undef DO_ } void TransactionOptions_ReadWrite::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadWrite) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1029,13 +1028,13 @@ void TransactionOptions_ReadWrite::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadWrite) } ::google::protobuf::uint8* TransactionOptions_ReadWrite::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadWrite) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1050,12 +1049,12 @@ ::google::protobuf::uint8* TransactionOptions_ReadWrite::InternalSerializeWithCa target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadWrite) return target; } size_t TransactionOptions_ReadWrite::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadWrite) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1078,22 +1077,22 @@ size_t TransactionOptions_ReadWrite::ByteSizeLong() const { } void TransactionOptions_ReadWrite::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions.ReadWrite) GOOGLE_DCHECK_NE(&from, this); const TransactionOptions_ReadWrite* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions.ReadWrite) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions.ReadWrite) MergeFrom(*source); } } void TransactionOptions_ReadWrite::MergeFrom(const TransactionOptions_ReadWrite& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadWrite) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1106,14 +1105,14 @@ void TransactionOptions_ReadWrite::MergeFrom(const TransactionOptions_ReadWrite& } void TransactionOptions_ReadWrite::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions.ReadWrite) if (&from == this) return; Clear(); MergeFrom(from); } void TransactionOptions_ReadWrite::CopyFrom(const TransactionOptions_ReadWrite& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TransactionOptions.ReadWrite) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadWrite) if (&from == this) return; Clear(); MergeFrom(from); @@ -1135,15 +1134,15 @@ void TransactionOptions_ReadWrite::InternalSwap(TransactionOptions_ReadWrite* ot } ::google::protobuf::Metadata TransactionOptions_ReadWrite::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void TransactionOptions_ReadOnly::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_TransactionOptions_ReadOnly_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void TransactionOptions_ReadOnly::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -1159,7 +1158,7 @@ void TransactionOptions_ReadOnly::set_allocated_read_time(::google::protobuf::Ti set_has_read_time(); consistency_selector_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TransactionOptions.ReadOnly.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.ReadOnly.read_time) } void TransactionOptions_ReadOnly::clear_read_time() { if (has_read_time()) { @@ -1174,10 +1173,10 @@ const int TransactionOptions_ReadOnly::kReadTimeFieldNumber; TransactionOptions_ReadOnly::TransactionOptions_ReadOnly() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions.ReadOnly) } TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(const TransactionOptions_ReadOnly& from) : ::google::protobuf::Message(), @@ -1194,7 +1193,7 @@ TransactionOptions_ReadOnly::TransactionOptions_ReadOnly(const TransactionOption break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions.ReadOnly) } void TransactionOptions_ReadOnly::SharedCtor() { @@ -1203,7 +1202,7 @@ void TransactionOptions_ReadOnly::SharedCtor() { } TransactionOptions_ReadOnly::~TransactionOptions_ReadOnly() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions.ReadOnly) SharedDtor(); } @@ -1219,12 +1218,12 @@ void TransactionOptions_ReadOnly::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* TransactionOptions_ReadOnly::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const TransactionOptions_ReadOnly& TransactionOptions_ReadOnly::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnly(); return *internal_default_instance(); } @@ -1237,7 +1236,7 @@ TransactionOptions_ReadOnly* TransactionOptions_ReadOnly::New(::google::protobuf } void TransactionOptions_ReadOnly::clear_consistency_selector() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions.ReadOnly) switch (consistency_selector_case()) { case kReadTime: { delete consistency_selector_.read_time_; @@ -1252,7 +1251,7 @@ void TransactionOptions_ReadOnly::clear_consistency_selector() { void TransactionOptions_ReadOnly::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions.ReadOnly) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1265,7 +1264,7 @@ bool TransactionOptions_ReadOnly::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions.ReadOnly) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1295,17 +1294,17 @@ bool TransactionOptions_ReadOnly::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions.ReadOnly) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions.ReadOnly) return false; #undef DO_ } void TransactionOptions_ReadOnly::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions.ReadOnly) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1319,13 +1318,13 @@ void TransactionOptions_ReadOnly::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions.ReadOnly) } ::google::protobuf::uint8* TransactionOptions_ReadOnly::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions.ReadOnly) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1340,12 +1339,12 @@ ::google::protobuf::uint8* TransactionOptions_ReadOnly::InternalSerializeWithCac target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions.ReadOnly) return target; } size_t TransactionOptions_ReadOnly::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions.ReadOnly) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1373,22 +1372,22 @@ size_t TransactionOptions_ReadOnly::ByteSizeLong() const { } void TransactionOptions_ReadOnly::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions.ReadOnly) GOOGLE_DCHECK_NE(&from, this); const TransactionOptions_ReadOnly* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions.ReadOnly) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions.ReadOnly) MergeFrom(*source); } } void TransactionOptions_ReadOnly::MergeFrom(const TransactionOptions_ReadOnly& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions.ReadOnly) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1406,14 +1405,14 @@ void TransactionOptions_ReadOnly::MergeFrom(const TransactionOptions_ReadOnly& f } void TransactionOptions_ReadOnly::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions.ReadOnly) if (&from == this) return; Clear(); MergeFrom(from); } void TransactionOptions_ReadOnly::CopyFrom(const TransactionOptions_ReadOnly& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TransactionOptions.ReadOnly) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions.ReadOnly) if (&from == this) return; Clear(); MergeFrom(from); @@ -1436,20 +1435,20 @@ void TransactionOptions_ReadOnly::InternalSwap(TransactionOptions_ReadOnly* othe } ::google::protobuf::Metadata TransactionOptions_ReadOnly::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void TransactionOptions::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_TransactionOptions_default_instance_.read_only_ = const_cast< ::google::firestore::v1beta1::TransactionOptions_ReadOnly*>( - ::google::firestore::v1beta1::TransactionOptions_ReadOnly::internal_default_instance()); - ::google::firestore::v1beta1::_TransactionOptions_default_instance_.read_write_ = const_cast< ::google::firestore::v1beta1::TransactionOptions_ReadWrite*>( - ::google::firestore::v1beta1::TransactionOptions_ReadWrite::internal_default_instance()); + ::google::firestore::v1::_TransactionOptions_default_instance_.read_only_ = const_cast< ::google::firestore::v1::TransactionOptions_ReadOnly*>( + ::google::firestore::v1::TransactionOptions_ReadOnly::internal_default_instance()); + ::google::firestore::v1::_TransactionOptions_default_instance_.read_write_ = const_cast< ::google::firestore::v1::TransactionOptions_ReadWrite*>( + ::google::firestore::v1::TransactionOptions_ReadWrite::internal_default_instance()); } -void TransactionOptions::set_allocated_read_only(::google::firestore::v1beta1::TransactionOptions_ReadOnly* read_only) { +void TransactionOptions::set_allocated_read_only(::google::firestore::v1::TransactionOptions_ReadOnly* read_only) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_mode(); if (read_only) { @@ -1461,9 +1460,9 @@ void TransactionOptions::set_allocated_read_only(::google::firestore::v1beta1::T set_has_read_only(); mode_.read_only_ = read_only; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TransactionOptions.read_only) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_only) } -void TransactionOptions::set_allocated_read_write(::google::firestore::v1beta1::TransactionOptions_ReadWrite* read_write) { +void TransactionOptions::set_allocated_read_write(::google::firestore::v1::TransactionOptions_ReadWrite* read_write) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_mode(); if (read_write) { @@ -1475,7 +1474,7 @@ void TransactionOptions::set_allocated_read_write(::google::firestore::v1beta1:: set_has_read_write(); mode_.read_write_ = read_write; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TransactionOptions.read_write) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.read_write) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int TransactionOptions::kReadOnlyFieldNumber; @@ -1485,10 +1484,10 @@ const int TransactionOptions::kReadWriteFieldNumber; TransactionOptions::TransactionOptions() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(constructor:google.firestore.v1.TransactionOptions) } TransactionOptions::TransactionOptions(const TransactionOptions& from) : ::google::protobuf::Message(), @@ -1498,18 +1497,18 @@ TransactionOptions::TransactionOptions(const TransactionOptions& from) clear_has_mode(); switch (from.mode_case()) { case kReadOnly: { - mutable_read_only()->::google::firestore::v1beta1::TransactionOptions_ReadOnly::MergeFrom(from.read_only()); + mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only()); break; } case kReadWrite: { - mutable_read_write()->::google::firestore::v1beta1::TransactionOptions_ReadWrite::MergeFrom(from.read_write()); + mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write()); break; } case MODE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TransactionOptions) } void TransactionOptions::SharedCtor() { @@ -1518,7 +1517,7 @@ void TransactionOptions::SharedCtor() { } TransactionOptions::~TransactionOptions() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(destructor:google.firestore.v1.TransactionOptions) SharedDtor(); } @@ -1534,12 +1533,12 @@ void TransactionOptions::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* TransactionOptions::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const TransactionOptions& TransactionOptions::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions(); + ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions(); return *internal_default_instance(); } @@ -1552,7 +1551,7 @@ TransactionOptions* TransactionOptions::New(::google::protobuf::Arena* arena) co } void TransactionOptions::clear_mode() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.TransactionOptions) switch (mode_case()) { case kReadOnly: { delete mode_.read_only_; @@ -1571,7 +1570,7 @@ void TransactionOptions::clear_mode() { void TransactionOptions::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.TransactionOptions) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1584,13 +1583,13 @@ bool TransactionOptions::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(parse_start:google.firestore.v1.TransactionOptions) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; + // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1602,7 +1601,7 @@ bool TransactionOptions::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; + // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -1626,27 +1625,27 @@ bool TransactionOptions::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(parse_success:google.firestore.v1.TransactionOptions) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.TransactionOptions) return false; #undef DO_ } void TransactionOptions::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.TransactionOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; + // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; if (has_read_only()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *mode_.read_only_, output); } - // .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; + // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; if (has_read_write()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *mode_.read_write_, output); @@ -1656,24 +1655,24 @@ void TransactionOptions::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.TransactionOptions) } ::google::protobuf::uint8* TransactionOptions::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TransactionOptions) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; + // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; if (has_read_only()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, *mode_.read_only_, deterministic, target); } - // .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; + // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; if (has_read_write()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1684,12 +1683,12 @@ ::google::protobuf::uint8* TransactionOptions::InternalSerializeWithCachedSizesT target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TransactionOptions) return target; } size_t TransactionOptions::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TransactionOptions) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1698,14 +1697,14 @@ size_t TransactionOptions::ByteSizeLong() const { (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } switch (mode_case()) { - // .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; + // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; case kReadOnly: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *mode_.read_only_); break; } - // .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; + // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; case kReadWrite: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1724,22 +1723,22 @@ size_t TransactionOptions::ByteSizeLong() const { } void TransactionOptions::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TransactionOptions) GOOGLE_DCHECK_NE(&from, this); const TransactionOptions* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TransactionOptions) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TransactionOptions) MergeFrom(*source); } } void TransactionOptions::MergeFrom(const TransactionOptions& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TransactionOptions) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1747,11 +1746,11 @@ void TransactionOptions::MergeFrom(const TransactionOptions& from) { switch (from.mode_case()) { case kReadOnly: { - mutable_read_only()->::google::firestore::v1beta1::TransactionOptions_ReadOnly::MergeFrom(from.read_only()); + mutable_read_only()->::google::firestore::v1::TransactionOptions_ReadOnly::MergeFrom(from.read_only()); break; } case kReadWrite: { - mutable_read_write()->::google::firestore::v1beta1::TransactionOptions_ReadWrite::MergeFrom(from.read_write()); + mutable_read_write()->::google::firestore::v1::TransactionOptions_ReadWrite::MergeFrom(from.read_write()); break; } case MODE_NOT_SET: { @@ -1761,14 +1760,14 @@ void TransactionOptions::MergeFrom(const TransactionOptions& from) { } void TransactionOptions::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TransactionOptions) if (&from == this) return; Clear(); MergeFrom(from); } void TransactionOptions::CopyFrom(const TransactionOptions& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TransactionOptions) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TransactionOptions) if (&from == this) return; Clear(); MergeFrom(from); @@ -1791,13 +1790,13 @@ void TransactionOptions::InternalSwap(TransactionOptions* other) { } ::google::protobuf::Metadata TransactionOptions::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.h b/Firestore/Protos/cpp/google/firestore/v1/common.pb.h similarity index 82% rename from Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.h rename to Firestore/Protos/cpp/google/firestore/v1/common.pb.h index 2fda78c13a3..d845519c783 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/common.pb.h +++ b/Firestore/Protos/cpp/google/firestore/v1/common.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/common.proto +// source: google/firestore/v1/common.proto -#ifndef PROTOBUF_google_2ffirestore_2fv1beta1_2fcommon_2eproto__INCLUDED -#define PROTOBUF_google_2ffirestore_2fv1beta1_2fcommon_2eproto__INCLUDED +#ifndef PROTOBUF_google_2ffirestore_2fv1_2fcommon_2eproto__INCLUDED +#define PROTOBUF_google_2ffirestore_2fv1_2fcommon_2eproto__INCLUDED #include @@ -49,7 +49,7 @@ #include // @@protoc_insertion_point(includes) -namespace protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fcommon_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -77,10 +77,10 @@ inline void InitDefaults() { InitDefaultsTransactionOptions_ReadOnly(); InitDefaultsTransactionOptions(); } -} // namespace protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2fcommon_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class DocumentMask; class DocumentMaskDefaultTypeInternal; extern DocumentMaskDefaultTypeInternal _DocumentMask_default_instance_; @@ -96,16 +96,16 @@ extern TransactionOptions_ReadOnlyDefaultTypeInternal _TransactionOptions_ReadOn class TransactionOptions_ReadWrite; class TransactionOptions_ReadWriteDefaultTypeInternal; extern TransactionOptions_ReadWriteDefaultTypeInternal _TransactionOptions_ReadWrite_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { // =================================================================== -class DocumentMask : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentMask) */ { +class DocumentMask : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentMask) */ { public: DocumentMask(); virtual ~DocumentMask(); @@ -209,18 +209,18 @@ class DocumentMask : public ::google::protobuf::Message /* @@protoc_insertion_po const ::google::protobuf::RepeatedPtrField< ::std::string>& field_paths() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_field_paths(); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentMask) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentMask) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::std::string> field_paths_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMaskImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMaskImpl(); }; // ------------------------------------------------------------------- -class Precondition : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Precondition) */ { +class Precondition : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Precondition) */ { public: Precondition(); virtual ~Precondition(); @@ -327,7 +327,7 @@ class Precondition : public ::google::protobuf::Message /* @@protoc_insertion_po void set_allocated_update_time(::google::protobuf::Timestamp* update_time); ConditionTypeCase condition_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Precondition) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Precondition) private: void set_has_exists(); void set_has_update_time(); @@ -345,12 +345,12 @@ class Precondition : public ::google::protobuf::Message /* @@protoc_insertion_po mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPreconditionImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPreconditionImpl(); }; // ------------------------------------------------------------------- -class TransactionOptions_ReadWrite : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.TransactionOptions.ReadWrite) */ { +class TransactionOptions_ReadWrite : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.TransactionOptions.ReadWrite) */ { public: TransactionOptions_ReadWrite(); virtual ~TransactionOptions_ReadWrite(); @@ -446,18 +446,18 @@ class TransactionOptions_ReadWrite : public ::google::protobuf::Message /* @@pro ::std::string* release_retry_transaction(); void set_allocated_retry_transaction(::std::string* retry_transaction); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.TransactionOptions.ReadWrite) + // @@protoc_insertion_point(class_scope:google.firestore.v1.TransactionOptions.ReadWrite) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr retry_transaction_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWriteImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadWriteImpl(); }; // ------------------------------------------------------------------- -class TransactionOptions_ReadOnly : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.TransactionOptions.ReadOnly) */ { +class TransactionOptions_ReadOnly : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.TransactionOptions.ReadOnly) */ { public: TransactionOptions_ReadOnly(); virtual ~TransactionOptions_ReadOnly(); @@ -554,7 +554,7 @@ class TransactionOptions_ReadOnly : public ::google::protobuf::Message /* @@prot void set_allocated_read_time(::google::protobuf::Timestamp* read_time); ConsistencySelectorCase consistency_selector_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.TransactionOptions.ReadOnly) + // @@protoc_insertion_point(class_scope:google.firestore.v1.TransactionOptions.ReadOnly) private: void set_has_read_time(); @@ -570,12 +570,12 @@ class TransactionOptions_ReadOnly : public ::google::protobuf::Message /* @@prot mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnlyImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions_ReadOnlyImpl(); }; // ------------------------------------------------------------------- -class TransactionOptions : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.TransactionOptions) */ { +class TransactionOptions : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.TransactionOptions) */ { public: TransactionOptions(); virtual ~TransactionOptions(); @@ -666,26 +666,26 @@ class TransactionOptions : public ::google::protobuf::Message /* @@protoc_insert // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; + // .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; bool has_read_only() const; void clear_read_only(); static const int kReadOnlyFieldNumber = 2; - const ::google::firestore::v1beta1::TransactionOptions_ReadOnly& read_only() const; - ::google::firestore::v1beta1::TransactionOptions_ReadOnly* release_read_only(); - ::google::firestore::v1beta1::TransactionOptions_ReadOnly* mutable_read_only(); - void set_allocated_read_only(::google::firestore::v1beta1::TransactionOptions_ReadOnly* 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); - // .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; + // .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; bool has_read_write() const; void clear_read_write(); static const int kReadWriteFieldNumber = 3; - const ::google::firestore::v1beta1::TransactionOptions_ReadWrite& read_write() const; - ::google::firestore::v1beta1::TransactionOptions_ReadWrite* release_read_write(); - ::google::firestore::v1beta1::TransactionOptions_ReadWrite* mutable_read_write(); - void set_allocated_read_write(::google::firestore::v1beta1::TransactionOptions_ReadWrite* 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); ModeCase mode_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.TransactionOptions) + // @@protoc_insertion_point(class_scope:google.firestore.v1.TransactionOptions) private: void set_has_read_only(); void set_has_read_write(); @@ -697,14 +697,14 @@ class TransactionOptions : public ::google::protobuf::Message /* @@protoc_insert ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; union ModeUnion { ModeUnion() {} - ::google::firestore::v1beta1::TransactionOptions_ReadOnly* read_only_; - ::google::firestore::v1beta1::TransactionOptions_ReadWrite* read_write_; + ::google::firestore::v1::TransactionOptions_ReadOnly* read_only_; + ::google::firestore::v1::TransactionOptions_ReadWrite* read_write_; } mode_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptionsImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptionsImpl(); }; // =================================================================== @@ -725,64 +725,64 @@ inline void DocumentMask::clear_field_paths() { field_paths_.Clear(); } inline const ::std::string& DocumentMask::field_paths(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentMask.field_paths) return field_paths_.Get(index); } inline ::std::string* DocumentMask::mutable_field_paths(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentMask.field_paths) return field_paths_.Mutable(index); } inline void DocumentMask::set_field_paths(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentMask.field_paths) field_paths_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void DocumentMask::set_field_paths(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentMask.field_paths) field_paths_.Mutable(index)->assign(std::move(value)); } #endif inline void DocumentMask::set_field_paths(int index, const char* value) { GOOGLE_DCHECK(value != NULL); field_paths_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DocumentMask.field_paths) } inline void DocumentMask::set_field_paths(int index, const char* value, size_t size) { field_paths_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DocumentMask.field_paths) + // @@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.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.DocumentMask.field_paths) return field_paths_.Add(); } inline void DocumentMask::add_field_paths(const ::std::string& value) { field_paths_.Add()->assign(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentMask.field_paths) } #if LANG_CXX11 inline void DocumentMask::add_field_paths(::std::string&& value) { field_paths_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentMask.field_paths) } #endif inline void DocumentMask::add_field_paths(const char* value) { GOOGLE_DCHECK(value != NULL); field_paths_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_add_char:google.firestore.v1.DocumentMask.field_paths) } inline void DocumentMask::add_field_paths(const char* value, size_t size) { field_paths_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_add_pointer:google.firestore.v1.DocumentMask.field_paths) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& DocumentMask::field_paths() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentMask.field_paths) return field_paths_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* DocumentMask::mutable_field_paths() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentMask.field_paths) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentMask.field_paths) return &field_paths_; } @@ -804,7 +804,7 @@ inline void Precondition::clear_exists() { } } inline bool Precondition::exists() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Precondition.exists) + // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.exists) if (has_exists()) { return condition_type_.exists_; } @@ -816,7 +816,7 @@ inline void Precondition::set_exists(bool value) { set_has_exists(); } condition_type_.exists_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Precondition.exists) + // @@protoc_insertion_point(field_set:google.firestore.v1.Precondition.exists) } // .google.protobuf.Timestamp update_time = 2; @@ -827,7 +827,7 @@ inline void Precondition::set_has_update_time() { _oneof_case_[0] = kUpdateTime; } inline ::google::protobuf::Timestamp* Precondition::release_update_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Precondition.update_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.Precondition.update_time) if (has_update_time()) { clear_has_condition_type(); ::google::protobuf::Timestamp* temp = condition_type_.update_time_; @@ -838,7 +838,7 @@ inline ::google::protobuf::Timestamp* Precondition::release_update_time() { } } inline const ::google::protobuf::Timestamp& Precondition::update_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Precondition.update_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.Precondition.update_time) return has_update_time() ? *condition_type_.update_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -849,7 +849,7 @@ inline ::google::protobuf::Timestamp* Precondition::mutable_update_time() { set_has_update_time(); condition_type_.update_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Precondition.update_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Precondition.update_time) return condition_type_.update_time_; } @@ -871,41 +871,41 @@ inline void TransactionOptions_ReadWrite::clear_retry_transaction() { retry_transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& TransactionOptions_ReadWrite::retry_transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) return retry_transaction_.GetNoArena(); } inline void TransactionOptions_ReadWrite::set_retry_transaction(const ::std::string& value) { retry_transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) } #if LANG_CXX11 inline void TransactionOptions_ReadWrite::set_retry_transaction(::std::string&& value) { retry_transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) } #endif inline void TransactionOptions_ReadWrite::set_retry_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); retry_transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) } inline void TransactionOptions_ReadWrite::set_retry_transaction(const void* value, size_t size) { retry_transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) } inline ::std::string* TransactionOptions_ReadWrite::mutable_retry_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) return retry_transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* TransactionOptions_ReadWrite::release_retry_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) return retry_transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -916,7 +916,7 @@ inline void TransactionOptions_ReadWrite::set_allocated_retry_transaction(::std: } retry_transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), retry_transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TransactionOptions.ReadWrite.retry_transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TransactionOptions.ReadWrite.retry_transaction) } // ------------------------------------------------------------------- @@ -931,7 +931,7 @@ inline void TransactionOptions_ReadOnly::set_has_read_time() { _oneof_case_[0] = kReadTime; } inline ::google::protobuf::Timestamp* TransactionOptions_ReadOnly::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TransactionOptions.ReadOnly.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.TransactionOptions.ReadOnly.read_time) if (has_read_time()) { clear_has_consistency_selector(); ::google::protobuf::Timestamp* temp = consistency_selector_.read_time_; @@ -942,7 +942,7 @@ inline ::google::protobuf::Timestamp* TransactionOptions_ReadOnly::release_read_ } } inline const ::google::protobuf::Timestamp& TransactionOptions_ReadOnly::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TransactionOptions.ReadOnly.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.TransactionOptions.ReadOnly.read_time) return has_read_time() ? *consistency_selector_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -953,7 +953,7 @@ inline ::google::protobuf::Timestamp* TransactionOptions_ReadOnly::mutable_read_ set_has_read_time(); consistency_selector_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TransactionOptions.ReadOnly.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.ReadOnly.read_time) return consistency_selector_.read_time_; } @@ -970,7 +970,7 @@ inline TransactionOptions_ReadOnly::ConsistencySelectorCase TransactionOptions_R // TransactionOptions -// .google.firestore.v1beta1.TransactionOptions.ReadOnly read_only = 2; +// .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; inline bool TransactionOptions::has_read_only() const { return mode_case() == kReadOnly; } @@ -983,34 +983,34 @@ inline void TransactionOptions::clear_read_only() { clear_has_mode(); } } -inline ::google::firestore::v1beta1::TransactionOptions_ReadOnly* TransactionOptions::release_read_only() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TransactionOptions.read_only) +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()) { clear_has_mode(); - ::google::firestore::v1beta1::TransactionOptions_ReadOnly* temp = mode_.read_only_; + ::google::firestore::v1::TransactionOptions_ReadOnly* temp = mode_.read_only_; mode_.read_only_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::TransactionOptions_ReadOnly& TransactionOptions::read_only() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TransactionOptions.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 has_read_only() ? *mode_.read_only_ - : *reinterpret_cast< ::google::firestore::v1beta1::TransactionOptions_ReadOnly*>(&::google::firestore::v1beta1::_TransactionOptions_ReadOnly_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::TransactionOptions_ReadOnly*>(&::google::firestore::v1::_TransactionOptions_ReadOnly_default_instance_); } -inline ::google::firestore::v1beta1::TransactionOptions_ReadOnly* TransactionOptions::mutable_read_only() { +inline ::google::firestore::v1::TransactionOptions_ReadOnly* TransactionOptions::mutable_read_only() { if (!has_read_only()) { clear_mode(); set_has_read_only(); - mode_.read_only_ = new ::google::firestore::v1beta1::TransactionOptions_ReadOnly; + mode_.read_only_ = new ::google::firestore::v1::TransactionOptions_ReadOnly; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TransactionOptions.read_only) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_only) return mode_.read_only_; } -// .google.firestore.v1beta1.TransactionOptions.ReadWrite read_write = 3; +// .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; inline bool TransactionOptions::has_read_write() const { return mode_case() == kReadWrite; } @@ -1023,30 +1023,30 @@ inline void TransactionOptions::clear_read_write() { clear_has_mode(); } } -inline ::google::firestore::v1beta1::TransactionOptions_ReadWrite* TransactionOptions::release_read_write() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TransactionOptions.read_write) +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()) { clear_has_mode(); - ::google::firestore::v1beta1::TransactionOptions_ReadWrite* temp = mode_.read_write_; + ::google::firestore::v1::TransactionOptions_ReadWrite* temp = mode_.read_write_; mode_.read_write_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::TransactionOptions_ReadWrite& TransactionOptions::read_write() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TransactionOptions.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 has_read_write() ? *mode_.read_write_ - : *reinterpret_cast< ::google::firestore::v1beta1::TransactionOptions_ReadWrite*>(&::google::firestore::v1beta1::_TransactionOptions_ReadWrite_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::TransactionOptions_ReadWrite*>(&::google::firestore::v1::_TransactionOptions_ReadWrite_default_instance_); } -inline ::google::firestore::v1beta1::TransactionOptions_ReadWrite* TransactionOptions::mutable_read_write() { +inline ::google::firestore::v1::TransactionOptions_ReadWrite* TransactionOptions::mutable_read_write() { if (!has_read_write()) { clear_mode(); set_has_read_write(); - mode_.read_write_ = new ::google::firestore::v1beta1::TransactionOptions_ReadWrite; + mode_.read_write_ = new ::google::firestore::v1::TransactionOptions_ReadWrite; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TransactionOptions.read_write) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TransactionOptions.read_write) return mode_.read_write_; } @@ -1073,10 +1073,10 @@ inline TransactionOptions::ModeCase TransactionOptions::mode_case() const { // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2ffirestore_2fv1beta1_2fcommon_2eproto__INCLUDED +#endif // PROTOBUF_google_2ffirestore_2fv1_2fcommon_2eproto__INCLUDED diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.cc b/Firestore/Protos/cpp/google/firestore/v1/document.pb.cc similarity index 79% rename from Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.cc rename to Firestore/Protos/cpp/google/firestore/v1/document.pb.cc index 7698a1b746f..d37294b4a16 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.cc +++ b/Firestore/Protos/cpp/google/firestore/v1/document.pb.cc @@ -15,9 +15,9 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/document.proto +// source: google/firestore/v1/document.proto -#include "google/firestore/v1beta1/document.pb.h" +#include "google/firestore/v1/document.pb.h" #include @@ -37,7 +37,7 @@ // @@protoc_insertion_point(includes) namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class Document_FieldsEntry_DoNotUseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -61,8 +61,8 @@ class ValueDefaultTypeInternal { ::google::protobuf::internal::ArenaStringPtr bytes_value_; ::google::protobuf::internal::ArenaStringPtr reference_value_; const ::google::type::LatLng* geo_point_value_; - const ::google::firestore::v1beta1::ArrayValue* array_value_; - const ::google::firestore::v1beta1::MapValue* map_value_; + const ::google::firestore::v1::ArrayValue* array_value_; + const ::google::firestore::v1::MapValue* map_value_; } _Value_default_instance_; class ArrayValueDefaultTypeInternal { public: @@ -79,10 +79,10 @@ class MapValueDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _MapValue_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google -namespace protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto { void InitDefaultsDocument_FieldsEntry_DoNotUseImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -91,12 +91,12 @@ void InitDefaultsDocument_FieldsEntry_DoNotUseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); { - void* ptr = &::google::firestore::v1beta1::_Document_FieldsEntry_DoNotUse_default_instance_; - new (ptr) ::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse(); + void* ptr = &::google::firestore::v1::_Document_FieldsEntry_DoNotUse_default_instance_; + new (ptr) ::google::firestore::v1::Document_FieldsEntry_DoNotUse(); } - ::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse::InitAsDefaultInstance(); + ::google::firestore::v1::Document_FieldsEntry_DoNotUse::InitAsDefaultInstance(); } void InitDefaultsDocument_FieldsEntry_DoNotUse() { @@ -112,14 +112,14 @@ void InitDefaultsDocumentImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument_FieldsEntry_DoNotUse(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument_FieldsEntry_DoNotUse(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_Document_default_instance_; - new (ptr) ::google::firestore::v1beta1::Document(); + void* ptr = &::google::firestore::v1::_Document_default_instance_; + new (ptr) ::google::firestore::v1::Document(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Document::InitAsDefaultInstance(); + ::google::firestore::v1::Document::InitAsDefaultInstance(); } void InitDefaultsDocument() { @@ -138,28 +138,28 @@ void InitDefaultsArrayValueImpl() { protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); protobuf_google_2ftype_2flatlng_2eproto::InitDefaultsLatLng(); { - void* ptr = &::google::firestore::v1beta1::_Value_default_instance_; - new (ptr) ::google::firestore::v1beta1::Value(); + void* ptr = &::google::firestore::v1::_Value_default_instance_; + new (ptr) ::google::firestore::v1::Value(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::google::firestore::v1beta1::_ArrayValue_default_instance_; - new (ptr) ::google::firestore::v1beta1::ArrayValue(); + void* ptr = &::google::firestore::v1::_ArrayValue_default_instance_; + new (ptr) ::google::firestore::v1::ArrayValue(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::google::firestore::v1beta1::_MapValue_FieldsEntry_DoNotUse_default_instance_; - new (ptr) ::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse(); + void* ptr = &::google::firestore::v1::_MapValue_FieldsEntry_DoNotUse_default_instance_; + new (ptr) ::google::firestore::v1::MapValue_FieldsEntry_DoNotUse(); } { - void* ptr = &::google::firestore::v1beta1::_MapValue_default_instance_; - new (ptr) ::google::firestore::v1beta1::MapValue(); + void* ptr = &::google::firestore::v1::_MapValue_default_instance_; + new (ptr) ::google::firestore::v1::MapValue(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Value::InitAsDefaultInstance(); - ::google::firestore::v1beta1::ArrayValue::InitAsDefaultInstance(); - ::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse::InitAsDefaultInstance(); - ::google::firestore::v1beta1::MapValue::InitAsDefaultInstance(); + ::google::firestore::v1::Value::InitAsDefaultInstance(); + ::google::firestore::v1::ArrayValue::InitAsDefaultInstance(); + ::google::firestore::v1::MapValue_FieldsEntry_DoNotUse::InitAsDefaultInstance(); + ::google::firestore::v1::MapValue::InitAsDefaultInstance(); } void InitDefaultsArrayValue() { @@ -170,86 +170,86 @@ void InitDefaultsArrayValue() { ::google::protobuf::Metadata file_level_metadata[6]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document_FieldsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document, fields_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document, create_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Document, update_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, fields_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, create_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Document, update_time_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Value, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Value, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, null_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, boolean_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, integer_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, double_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, timestamp_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, string_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, bytes_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, reference_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, geo_point_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, array_value_), - offsetof(::google::firestore::v1beta1::ValueDefaultTypeInternal, map_value_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Value, value_type_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, null_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, boolean_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, integer_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, double_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, timestamp_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, string_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, bytes_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, reference_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, geo_point_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, array_value_), + offsetof(::google::firestore::v1::ValueDefaultTypeInternal, map_value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Value, value_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ArrayValue, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ArrayValue, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ArrayValue, values_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ArrayValue, values_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::MapValue, fields_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::MapValue, fields_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, sizeof(::google::firestore::v1beta1::Document_FieldsEntry_DoNotUse)}, - { 9, -1, sizeof(::google::firestore::v1beta1::Document)}, - { 18, -1, sizeof(::google::firestore::v1beta1::Value)}, - { 35, -1, sizeof(::google::firestore::v1beta1::ArrayValue)}, - { 41, 48, sizeof(::google::firestore::v1beta1::MapValue_FieldsEntry_DoNotUse)}, - { 50, -1, sizeof(::google::firestore::v1beta1::MapValue)}, + { 0, 7, sizeof(::google::firestore::v1::Document_FieldsEntry_DoNotUse)}, + { 9, -1, sizeof(::google::firestore::v1::Document)}, + { 18, -1, sizeof(::google::firestore::v1::Value)}, + { 35, -1, sizeof(::google::firestore::v1::ArrayValue)}, + { 41, 48, sizeof(::google::firestore::v1::MapValue_FieldsEntry_DoNotUse)}, + { 50, -1, sizeof(::google::firestore::v1::MapValue)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::firestore::v1beta1::_Document_FieldsEntry_DoNotUse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Document_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Value_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ArrayValue_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_MapValue_FieldsEntry_DoNotUse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_MapValue_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Document_FieldsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Document_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Value_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ArrayValue_default_instance_), + reinterpret_cast(&::google::firestore::v1::_MapValue_FieldsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_MapValue_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/firestore/v1beta1/document.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/firestore/v1/document.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, NULL, NULL); } @@ -267,44 +267,43 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n\'google/firestore/v1beta1/document.prot" - "o\022\030google.firestore.v1beta1\032\034google/api/" - "annotations.proto\032\034google/protobuf/struc" - "t.proto\032\037google/protobuf/timestamp.proto" - "\032\030google/type/latlng.proto\"\212\002\n\010Document\022" - "\014\n\004name\030\001 \001(\t\022>\n\006fields\030\002 \003(\0132..google.f" - "irestore.v1beta1.Document.FieldsEntry\022/\n" - "\013create_time\030\003 \001(\0132\032.google.protobuf.Tim" - "estamp\022/\n\013update_time\030\004 \001(\0132\032.google.pro" - "tobuf.Timestamp\032N\n\013FieldsEntry\022\013\n\003key\030\001 " - "\001(\t\022.\n\005value\030\002 \001(\0132\037.google.firestore.v1" - "beta1.Value:\0028\001\"\270\003\n\005Value\0220\n\nnull_value\030" - "\013 \001(\0162\032.google.protobuf.NullValueH\000\022\027\n\rb" - "oolean_value\030\001 \001(\010H\000\022\027\n\rinteger_value\030\002 " - "\001(\003H\000\022\026\n\014double_value\030\003 \001(\001H\000\0225\n\017timesta" - "mp_value\030\n \001(\0132\032.google.protobuf.Timesta" - "mpH\000\022\026\n\014string_value\030\021 \001(\tH\000\022\025\n\013bytes_va" - "lue\030\022 \001(\014H\000\022\031\n\017reference_value\030\005 \001(\tH\000\022." - "\n\017geo_point_value\030\010 \001(\0132\023.google.type.La" - "tLngH\000\022;\n\013array_value\030\t \001(\0132$.google.fir" - "estore.v1beta1.ArrayValueH\000\0227\n\tmap_value" - "\030\006 \001(\0132\".google.firestore.v1beta1.MapVal" - "ueH\000B\014\n\nvalue_type\"=\n\nArrayValue\022/\n\006valu" - "es\030\001 \003(\0132\037.google.firestore.v1beta1.Valu" - "e\"\232\001\n\010MapValue\022>\n\006fields\030\001 \003(\0132..google." - "firestore.v1beta1.MapValue.FieldsEntry\032N" - "\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022.\n\005value\030\002 \001(" - "\0132\037.google.firestore.v1beta1.Value:\0028\001B\273" - "\001\n\034com.google.firestore.v1beta1B\rDocumen" - "tProtoP\001ZAgoogle.golang.org/genproto/goo" - "gleapis/firestore/v1beta1;firestore\242\002\004GC" - "FS\252\002\036Google.Cloud.Firestore.V1Beta1\312\002\036Go" - "ogle\\Cloud\\Firestore\\V1beta1b\006proto3" + "\n\"google/firestore/v1/document.proto\022\023go" + "ogle.firestore.v1\032\034google/api/annotation" + "s.proto\032\034google/protobuf/struct.proto\032\037g" + "oogle/protobuf/timestamp.proto\032\030google/t" + "ype/latlng.proto\"\200\002\n\010Document\022\014\n\004name\030\001 " + "\001(\t\0229\n\006fields\030\002 \003(\0132).google.firestore.v" + "1.Document.FieldsEntry\022/\n\013create_time\030\003 " + "\001(\0132\032.google.protobuf.Timestamp\022/\n\013updat" + "e_time\030\004 \001(\0132\032.google.protobuf.Timestamp" + "\032I\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 " + "\001(\0132\032.google.firestore.v1.Value:\0028\001\"\256\003\n\005" + "Value\0220\n\nnull_value\030\013 \001(\0162\032.google.proto" + "buf.NullValueH\000\022\027\n\rboolean_value\030\001 \001(\010H\000" + "\022\027\n\rinteger_value\030\002 \001(\003H\000\022\026\n\014double_valu" + "e\030\003 \001(\001H\000\0225\n\017timestamp_value\030\n \001(\0132\032.goo" + "gle.protobuf.TimestampH\000\022\026\n\014string_value" + "\030\021 \001(\tH\000\022\025\n\013bytes_value\030\022 \001(\014H\000\022\031\n\017refer" + "ence_value\030\005 \001(\tH\000\022.\n\017geo_point_value\030\010 " + "\001(\0132\023.google.type.LatLngH\000\0226\n\013array_valu" + "e\030\t \001(\0132\037.google.firestore.v1.ArrayValue" + "H\000\0222\n\tmap_value\030\006 \001(\0132\035.google.firestore" + ".v1.MapValueH\000B\014\n\nvalue_type\"8\n\nArrayVal" + "ue\022*\n\006values\030\001 \003(\0132\032.google.firestore.v1" + ".Value\"\220\001\n\010MapValue\0229\n\006fields\030\001 \003(\0132).go" + "ogle.firestore.v1.MapValue.FieldsEntry\032I" + "\n\013FieldsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(" + "\0132\032.google.firestore.v1.Value:\0028\001B\261\001\n\027co" + "m.google.firestore.v1B\rDocumentProtoP\001Z<" + "google.golang.org/genproto/googleapis/fi" + "restore/v1;firestore\242\002\004GCFS\252\002\036Google.Clo" + "ud.Firestore.V1Beta1\312\002\036Google\\Cloud\\Fire" + "store\\V1beta1b\006proto3" }; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - descriptor, 1316); + descriptor, 1261); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "google/firestore/v1beta1/document.proto", &protobuf_RegisterTypes); + "google/firestore/v1/document.proto", &protobuf_RegisterTypes); ::protobuf_google_2fapi_2fannotations_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2fstruct_2eproto::AddDescriptors(); ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::AddDescriptors(); @@ -321,10 +320,10 @@ struct StaticDescriptorInitializer { AddDescriptors(); } } static_descriptor_initializer; -} // namespace protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { // =================================================================== @@ -334,8 +333,8 @@ void Document_FieldsEntry_DoNotUse::MergeFrom(const Document_FieldsEntry_DoNotUs MergeFromInternal(other); } ::google::protobuf::Metadata Document_FieldsEntry_DoNotUse::GetMetadata() const { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[0]; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[0]; } void Document_FieldsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -346,9 +345,9 @@ void Document_FieldsEntry_DoNotUse::MergeFrom( // =================================================================== void Document::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_Document_default_instance_._instance.get_mutable()->create_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_Document_default_instance_._instance.get_mutable()->create_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); - ::google::firestore::v1beta1::_Document_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_Document_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void Document::clear_create_time() { @@ -373,10 +372,10 @@ const int Document::kUpdateTimeFieldNumber; Document::Document() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(constructor:google.firestore.v1.Document) } Document::Document(const Document& from) : ::google::protobuf::Message(), @@ -398,7 +397,7 @@ Document::Document(const Document& from) } else { update_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Document) } void Document::SharedCtor() { @@ -410,7 +409,7 @@ void Document::SharedCtor() { } Document::~Document() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(destructor:google.firestore.v1.Document) SharedDtor(); } @@ -426,12 +425,12 @@ void Document::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Document::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Document& Document::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); return *internal_default_instance(); } @@ -444,7 +443,7 @@ Document* Document::New(::google::protobuf::Arena* arena) const { } void Document::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Document) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -466,7 +465,7 @@ bool Document::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Document) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -481,30 +480,30 @@ bool Document::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Document.name")); + "google.firestore.v1.Document.name")); } else { goto handle_unusual; } break; } - // map fields = 2; + // map fields = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { Document_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< Document_FieldsEntry_DoNotUse, - ::std::string, ::google::firestore::v1beta1::Value, + ::std::string, ::google::firestore::v1::Value, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value > > parser(&fields_); + ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value > > parser(&fields_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Document.FieldsEntry.key")); + "google.firestore.v1.Document.FieldsEntry.key")); } else { goto handle_unusual; } @@ -547,17 +546,17 @@ bool Document::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Document) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Document) return false; #undef DO_ } void Document::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Document) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -566,14 +565,14 @@ void Document::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Document.name"); + "google.firestore.v1.Document.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } - // map fields = 2; + // map fields = 2; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -582,7 +581,7 @@ void Document::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Document.FieldsEntry.key"); + "google.firestore.v1.Document.FieldsEntry.key"); } }; @@ -590,9 +589,9 @@ void Document::SerializeWithCachedSizes( this->fields().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -608,7 +607,7 @@ void Document::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper( @@ -636,13 +635,13 @@ void Document::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Document) } ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Document) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -651,15 +650,15 @@ ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Document.name"); + "google.firestore.v1.Document.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } - // map fields = 2; + // map fields = 2; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -668,7 +667,7 @@ ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Document.FieldsEntry.key"); + "google.firestore.v1.Document.FieldsEntry.key"); } }; @@ -676,9 +675,9 @@ ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( this->fields().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -696,7 +695,7 @@ ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper( @@ -728,12 +727,12 @@ ::google::protobuf::uint8* Document::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Document) return target; } size_t Document::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Document) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -741,12 +740,12 @@ size_t Document::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // map fields = 2; + // map fields = 2; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->fields_size()); { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper(it->first, it->second)); @@ -784,22 +783,22 @@ size_t Document::ByteSizeLong() const { } void Document::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Document) GOOGLE_DCHECK_NE(&from, this); const Document* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Document) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Document) MergeFrom(*source); } } void Document::MergeFrom(const Document& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Document) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -819,14 +818,14 @@ void Document::MergeFrom(const Document& from) { } void Document::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Document) if (&from == this) return; Clear(); MergeFrom(from); } void Document::CopyFrom(const Document& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Document) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Document) if (&from == this) return; Clear(); MergeFrom(from); @@ -851,32 +850,32 @@ void Document::InternalSwap(Document* other) { } ::google::protobuf::Metadata Document::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Value::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_Value_default_instance_.null_value_ = 0; - ::google::firestore::v1beta1::_Value_default_instance_.boolean_value_ = false; - ::google::firestore::v1beta1::_Value_default_instance_.integer_value_ = GOOGLE_LONGLONG(0); - ::google::firestore::v1beta1::_Value_default_instance_.double_value_ = 0; - ::google::firestore::v1beta1::_Value_default_instance_.timestamp_value_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_Value_default_instance_.null_value_ = 0; + ::google::firestore::v1::_Value_default_instance_.boolean_value_ = false; + ::google::firestore::v1::_Value_default_instance_.integer_value_ = GOOGLE_LONGLONG(0); + ::google::firestore::v1::_Value_default_instance_.double_value_ = 0; + ::google::firestore::v1::_Value_default_instance_.timestamp_value_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); - ::google::firestore::v1beta1::_Value_default_instance_.string_value_.UnsafeSetDefault( + ::google::firestore::v1::_Value_default_instance_.string_value_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_Value_default_instance_.bytes_value_.UnsafeSetDefault( + ::google::firestore::v1::_Value_default_instance_.bytes_value_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_Value_default_instance_.reference_value_.UnsafeSetDefault( + ::google::firestore::v1::_Value_default_instance_.reference_value_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_Value_default_instance_.geo_point_value_ = const_cast< ::google::type::LatLng*>( + ::google::firestore::v1::_Value_default_instance_.geo_point_value_ = const_cast< ::google::type::LatLng*>( ::google::type::LatLng::internal_default_instance()); - ::google::firestore::v1beta1::_Value_default_instance_.array_value_ = const_cast< ::google::firestore::v1beta1::ArrayValue*>( - ::google::firestore::v1beta1::ArrayValue::internal_default_instance()); - ::google::firestore::v1beta1::_Value_default_instance_.map_value_ = const_cast< ::google::firestore::v1beta1::MapValue*>( - ::google::firestore::v1beta1::MapValue::internal_default_instance()); + ::google::firestore::v1::_Value_default_instance_.array_value_ = const_cast< ::google::firestore::v1::ArrayValue*>( + ::google::firestore::v1::ArrayValue::internal_default_instance()); + ::google::firestore::v1::_Value_default_instance_.map_value_ = const_cast< ::google::firestore::v1::MapValue*>( + ::google::firestore::v1::MapValue::internal_default_instance()); } void Value::set_allocated_timestamp_value(::google::protobuf::Timestamp* timestamp_value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); @@ -891,7 +890,7 @@ void Value::set_allocated_timestamp_value(::google::protobuf::Timestamp* timesta set_has_timestamp_value(); value_type_.timestamp_value_ = timestamp_value; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.timestamp_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.timestamp_value) } void Value::clear_timestamp_value() { if (has_timestamp_value()) { @@ -911,7 +910,7 @@ void Value::set_allocated_geo_point_value(::google::type::LatLng* geo_point_valu set_has_geo_point_value(); value_type_.geo_point_value_ = geo_point_value; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.geo_point_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.geo_point_value) } void Value::clear_geo_point_value() { if (has_geo_point_value()) { @@ -919,7 +918,7 @@ void Value::clear_geo_point_value() { clear_has_value_type(); } } -void Value::set_allocated_array_value(::google::firestore::v1beta1::ArrayValue* array_value) { +void Value::set_allocated_array_value(::google::firestore::v1::ArrayValue* array_value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value_type(); if (array_value) { @@ -931,9 +930,9 @@ void Value::set_allocated_array_value(::google::firestore::v1beta1::ArrayValue* set_has_array_value(); value_type_.array_value_ = array_value; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.array_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.array_value) } -void Value::set_allocated_map_value(::google::firestore::v1beta1::MapValue* map_value) { +void Value::set_allocated_map_value(::google::firestore::v1::MapValue* map_value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_value_type(); if (map_value) { @@ -945,7 +944,7 @@ void Value::set_allocated_map_value(::google::firestore::v1beta1::MapValue* map_ set_has_map_value(); value_type_.map_value_ = map_value; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.map_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.map_value) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int Value::kNullValueFieldNumber; @@ -964,10 +963,10 @@ const int Value::kMapValueFieldNumber; Value::Value() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(constructor:google.firestore.v1.Value) } Value::Value(const Value& from) : ::google::protobuf::Message(), @@ -1013,18 +1012,18 @@ Value::Value(const Value& from) break; } case kArrayValue: { - mutable_array_value()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.array_value()); + mutable_array_value()->::google::firestore::v1::ArrayValue::MergeFrom(from.array_value()); break; } case kMapValue: { - mutable_map_value()->::google::firestore::v1beta1::MapValue::MergeFrom(from.map_value()); + mutable_map_value()->::google::firestore::v1::MapValue::MergeFrom(from.map_value()); break; } case VALUE_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Value) } void Value::SharedCtor() { @@ -1033,7 +1032,7 @@ void Value::SharedCtor() { } Value::~Value() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(destructor:google.firestore.v1.Value) SharedDtor(); } @@ -1049,12 +1048,12 @@ void Value::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Value::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Value& Value::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); return *internal_default_instance(); } @@ -1067,7 +1066,7 @@ Value* Value::New(::google::protobuf::Arena* arena) const { } void Value::clear_value_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Value) switch (value_type_case()) { case kNullValue: { // No need to clear @@ -1122,7 +1121,7 @@ void Value::clear_value_type() { void Value::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Value) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1135,7 +1134,7 @@ bool Value::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Value) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u); tag = p.first; @@ -1195,14 +1194,14 @@ bool Value::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reference_value().data(), static_cast(this->reference_value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Value.reference_value")); + "google.firestore.v1.Value.reference_value")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.MapValue map_value = 6; + // .google.firestore.v1.MapValue map_value = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -1226,7 +1225,7 @@ bool Value::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.ArrayValue array_value = 9; + // .google.firestore.v1.ArrayValue array_value = 9; case 9: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(74u /* 74 & 0xFF */)) { @@ -1274,7 +1273,7 @@ bool Value::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Value.string_value")); + "google.firestore.v1.Value.string_value")); } else { goto handle_unusual; } @@ -1305,17 +1304,17 @@ bool Value::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Value) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Value) return false; #undef DO_ } void Value::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1339,12 +1338,12 @@ void Value::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reference_value().data(), static_cast(this->reference_value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Value.reference_value"); + "google.firestore.v1.Value.reference_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 5, this->reference_value(), output); } - // .google.firestore.v1beta1.MapValue map_value = 6; + // .google.firestore.v1.MapValue map_value = 6; if (has_map_value()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *value_type_.map_value_, output); @@ -1356,7 +1355,7 @@ void Value::SerializeWithCachedSizes( 8, *value_type_.geo_point_value_, output); } - // .google.firestore.v1beta1.ArrayValue array_value = 9; + // .google.firestore.v1.ArrayValue array_value = 9; if (has_array_value()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 9, *value_type_.array_value_, output); @@ -1379,7 +1378,7 @@ void Value::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Value.string_value"); + "google.firestore.v1.Value.string_value"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 17, this->string_value(), output); } @@ -1394,13 +1393,13 @@ void Value::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Value) } ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Value) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1424,13 +1423,13 @@ ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->reference_value().data(), static_cast(this->reference_value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Value.reference_value"); + "google.firestore.v1.Value.reference_value"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 5, this->reference_value(), target); } - // .google.firestore.v1beta1.MapValue map_value = 6; + // .google.firestore.v1.MapValue map_value = 6; if (has_map_value()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1444,7 +1443,7 @@ ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( 8, *value_type_.geo_point_value_, deterministic, target); } - // .google.firestore.v1beta1.ArrayValue array_value = 9; + // .google.firestore.v1.ArrayValue array_value = 9; if (has_array_value()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1469,7 +1468,7 @@ ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->string_value().data(), static_cast(this->string_value().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Value.string_value"); + "google.firestore.v1.Value.string_value"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 17, this->string_value(), target); @@ -1486,12 +1485,12 @@ ::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Value) return target; } size_t Value::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Value) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1558,14 +1557,14 @@ size_t Value::ByteSizeLong() const { *value_type_.geo_point_value_); break; } - // .google.firestore.v1beta1.ArrayValue array_value = 9; + // .google.firestore.v1.ArrayValue array_value = 9; case kArrayValue: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *value_type_.array_value_); break; } - // .google.firestore.v1beta1.MapValue map_value = 6; + // .google.firestore.v1.MapValue map_value = 6; case kMapValue: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1584,22 +1583,22 @@ size_t Value::ByteSizeLong() const { } void Value::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Value) GOOGLE_DCHECK_NE(&from, this); const Value* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Value) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Value) MergeFrom(*source); } } void Value::MergeFrom(const Value& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Value) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1643,11 +1642,11 @@ void Value::MergeFrom(const Value& from) { break; } case kArrayValue: { - mutable_array_value()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.array_value()); + mutable_array_value()->::google::firestore::v1::ArrayValue::MergeFrom(from.array_value()); break; } case kMapValue: { - mutable_map_value()->::google::firestore::v1beta1::MapValue::MergeFrom(from.map_value()); + mutable_map_value()->::google::firestore::v1::MapValue::MergeFrom(from.map_value()); break; } case VALUE_TYPE_NOT_SET: { @@ -1657,14 +1656,14 @@ void Value::MergeFrom(const Value& from) { } void Value::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Value) if (&from == this) return; Clear(); MergeFrom(from); } void Value::CopyFrom(const Value& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Value) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Value) if (&from == this) return; Clear(); MergeFrom(from); @@ -1687,8 +1686,8 @@ void Value::InternalSwap(Value* other) { } ::google::protobuf::Metadata Value::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1703,10 +1702,10 @@ const int ArrayValue::kValuesFieldNumber; ArrayValue::ArrayValue() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(constructor:google.firestore.v1.ArrayValue) } ArrayValue::ArrayValue(const ArrayValue& from) : ::google::protobuf::Message(), @@ -1714,7 +1713,7 @@ ArrayValue::ArrayValue(const ArrayValue& from) values_(from.values_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ArrayValue) } void ArrayValue::SharedCtor() { @@ -1722,7 +1721,7 @@ void ArrayValue::SharedCtor() { } ArrayValue::~ArrayValue() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(destructor:google.firestore.v1.ArrayValue) SharedDtor(); } @@ -1735,12 +1734,12 @@ void ArrayValue::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ArrayValue::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ArrayValue& ArrayValue::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); return *internal_default_instance(); } @@ -1753,7 +1752,7 @@ ArrayValue* ArrayValue::New(::google::protobuf::Arena* arena) const { } void ArrayValue::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ArrayValue) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1766,13 +1765,13 @@ bool ArrayValue::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ArrayValue) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -1795,21 +1794,21 @@ bool ArrayValue::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ArrayValue) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ArrayValue) return false; #undef DO_ } void ArrayValue::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ArrayValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -1820,17 +1819,17 @@ void ArrayValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ArrayValue) } ::google::protobuf::uint8* ArrayValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ArrayValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1842,12 +1841,12 @@ ::google::protobuf::uint8* ArrayValue::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ArrayValue) return target; } size_t ArrayValue::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ArrayValue) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1855,7 +1854,7 @@ size_t ArrayValue::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; { unsigned int count = static_cast(this->values_size()); total_size += 1UL * count; @@ -1874,22 +1873,22 @@ size_t ArrayValue::ByteSizeLong() const { } void ArrayValue::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ArrayValue) GOOGLE_DCHECK_NE(&from, this); const ArrayValue* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ArrayValue) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ArrayValue) MergeFrom(*source); } } void ArrayValue::MergeFrom(const ArrayValue& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ArrayValue) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1899,14 +1898,14 @@ void ArrayValue::MergeFrom(const ArrayValue& from) { } void ArrayValue::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ArrayValue) if (&from == this) return; Clear(); MergeFrom(from); } void ArrayValue::CopyFrom(const ArrayValue& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ArrayValue) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ArrayValue) if (&from == this) return; Clear(); MergeFrom(from); @@ -1928,8 +1927,8 @@ void ArrayValue::InternalSwap(ArrayValue* other) { } ::google::protobuf::Metadata ArrayValue::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1941,8 +1940,8 @@ void MapValue_FieldsEntry_DoNotUse::MergeFrom(const MapValue_FieldsEntry_DoNotUs MergeFromInternal(other); } ::google::protobuf::Metadata MapValue_FieldsEntry_DoNotUse::GetMetadata() const { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[4]; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[4]; } void MapValue_FieldsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -1961,10 +1960,10 @@ const int MapValue::kFieldsFieldNumber; MapValue::MapValue() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(constructor:google.firestore.v1.MapValue) } MapValue::MapValue(const MapValue& from) : ::google::protobuf::Message(), @@ -1972,7 +1971,7 @@ MapValue::MapValue(const MapValue& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); fields_.MergeFrom(from.fields_); - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.MapValue) } void MapValue::SharedCtor() { @@ -1980,7 +1979,7 @@ void MapValue::SharedCtor() { } MapValue::~MapValue() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(destructor:google.firestore.v1.MapValue) SharedDtor(); } @@ -1993,12 +1992,12 @@ void MapValue::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* MapValue::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const MapValue& MapValue::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); return *internal_default_instance(); } @@ -2011,7 +2010,7 @@ MapValue* MapValue::New(::google::protobuf::Arena* arena) const { } void MapValue::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.MapValue) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2024,29 +2023,29 @@ bool MapValue::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(parse_start:google.firestore.v1.MapValue) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // map fields = 1; + // map fields = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { MapValue_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField< MapValue_FieldsEntry_DoNotUse, - ::std::string, ::google::firestore::v1beta1::Value, + ::std::string, ::google::firestore::v1::Value, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 >, - ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value > > parser(&fields_); + ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value > > parser(&fields_); DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( input, &parser)); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.MapValue.FieldsEntry.key")); + "google.firestore.v1.MapValue.FieldsEntry.key")); } else { goto handle_unusual; } @@ -2065,23 +2064,23 @@ bool MapValue::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(parse_success:google.firestore.v1.MapValue) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.MapValue) return false; #undef DO_ } void MapValue::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.MapValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // map fields = 1; + // map fields = 1; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -2090,7 +2089,7 @@ void MapValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.MapValue.FieldsEntry.key"); + "google.firestore.v1.MapValue.FieldsEntry.key"); } }; @@ -2098,9 +2097,9 @@ void MapValue::SerializeWithCachedSizes( this->fields().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -2116,7 +2115,7 @@ void MapValue::SerializeWithCachedSizes( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper( @@ -2132,19 +2131,19 @@ void MapValue::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.MapValue) } ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.MapValue) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // map fields = 1; + // map fields = 1; if (!this->fields().empty()) { - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_pointer + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_pointer ConstPtr; typedef ConstPtr SortItem; typedef ::google::protobuf::internal::CompareByDerefFirst Less; @@ -2153,7 +2152,7 @@ ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.MapValue.FieldsEntry.key"); + "google.firestore.v1.MapValue.FieldsEntry.key"); } }; @@ -2161,9 +2160,9 @@ ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray( this->fields().size() > 1) { ::google::protobuf::scoped_array items( new SortItem[this->fields().size()]); - typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::size_type size_type; + typedef ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::size_type size_type; size_type n = 0; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it, ++n) { items[static_cast(n)] = SortItem(&*it); @@ -2181,7 +2180,7 @@ ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray( } } else { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper( @@ -2199,12 +2198,12 @@ ::google::protobuf::uint8* MapValue::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.MapValue) return target; } size_t MapValue::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.MapValue) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2212,12 +2211,12 @@ size_t MapValue::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // map fields = 1; + // map fields = 1; total_size += 1 * ::google::protobuf::internal::FromIntSize(this->fields_size()); { ::google::protobuf::scoped_ptr entry; - for (::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >::const_iterator + for (::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >::const_iterator it = this->fields().begin(); it != this->fields().end(); ++it) { entry.reset(fields_.NewEntryWrapper(it->first, it->second)); @@ -2234,22 +2233,22 @@ size_t MapValue::ByteSizeLong() const { } void MapValue::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.MapValue) GOOGLE_DCHECK_NE(&from, this); const MapValue* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.MapValue) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.MapValue) MergeFrom(*source); } } void MapValue::MergeFrom(const MapValue& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.MapValue) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2259,14 +2258,14 @@ void MapValue::MergeFrom(const MapValue& from) { } void MapValue::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.MapValue) if (&from == this) return; Clear(); MergeFrom(from); } void MapValue::CopyFrom(const MapValue& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.MapValue) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.MapValue) if (&from == this) return; Clear(); MergeFrom(from); @@ -2288,13 +2287,13 @@ void MapValue::InternalSwap(MapValue* other) { } ::google::protobuf::Metadata MapValue::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.h b/Firestore/Protos/cpp/google/firestore/v1/document.pb.h similarity index 82% rename from Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.h rename to Firestore/Protos/cpp/google/firestore/v1/document.pb.h index db3db8de477..ef163c058a0 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.h +++ b/Firestore/Protos/cpp/google/firestore/v1/document.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/document.proto +// source: google/firestore/v1/document.proto -#ifndef PROTOBUF_google_2ffirestore_2fv1beta1_2fdocument_2eproto__INCLUDED -#define PROTOBUF_google_2ffirestore_2fv1beta1_2fdocument_2eproto__INCLUDED +#ifndef PROTOBUF_google_2ffirestore_2fv1_2fdocument_2eproto__INCLUDED +#define PROTOBUF_google_2ffirestore_2fv1_2fdocument_2eproto__INCLUDED #include @@ -54,7 +54,7 @@ #include "google/type/latlng.pb.h" // @@protoc_insertion_point(includes) -namespace protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -76,10 +76,10 @@ inline void InitDefaults() { InitDefaultsDocument(); InitDefaultsArrayValue(); } -} // namespace protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2fdocument_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class ArrayValue; class ArrayValueDefaultTypeInternal; extern ArrayValueDefaultTypeInternal _ArrayValue_default_instance_; @@ -98,23 +98,23 @@ extern MapValue_FieldsEntry_DoNotUseDefaultTypeInternal _MapValue_FieldsEntry_Do class Value; class ValueDefaultTypeInternal; extern ValueDefaultTypeInternal _Value_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { // =================================================================== class Document_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: typedef ::google::protobuf::internal::MapEntry SuperType; @@ -128,7 +128,7 @@ class Document_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEn // ------------------------------------------------------------------- -class Document : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Document) */ { +class Document : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Document) */ { public: Document(); virtual ~Document(); @@ -211,13 +211,13 @@ class Document : public ::google::protobuf::Message /* @@protoc_insertion_point( // accessors ------------------------------------------------------- - // map fields = 2; + // map fields = 2; int fields_size() const; void clear_fields(); static const int kFieldsFieldNumber = 2; - const ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >& + const ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >& fields() const; - ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >* + ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >* mutable_fields(); // string name = 1; @@ -252,13 +252,13 @@ class Document : public ::google::protobuf::Message /* @@protoc_insertion_point( ::google::protobuf::Timestamp* mutable_update_time(); void set_allocated_update_time(::google::protobuf::Timestamp* update_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Document) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Document) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::MapField< Document_FieldsEntry_DoNotUse, - ::std::string, ::google::firestore::v1beta1::Value, + ::std::string, ::google::firestore::v1::Value, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 > fields_; @@ -266,12 +266,12 @@ class Document : public ::google::protobuf::Message /* @@protoc_insertion_point( ::google::protobuf::Timestamp* create_time_; ::google::protobuf::Timestamp* update_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocumentImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocumentImpl(); }; // ------------------------------------------------------------------- -class Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Value) */ { +class Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Value) */ { public: Value(); virtual ~Value(); @@ -473,26 +473,26 @@ class Value : public ::google::protobuf::Message /* @@protoc_insertion_point(cla ::google::type::LatLng* mutable_geo_point_value(); void set_allocated_geo_point_value(::google::type::LatLng* geo_point_value); - // .google.firestore.v1beta1.ArrayValue array_value = 9; + // .google.firestore.v1.ArrayValue array_value = 9; bool has_array_value() const; void clear_array_value(); static const int kArrayValueFieldNumber = 9; - const ::google::firestore::v1beta1::ArrayValue& array_value() const; - ::google::firestore::v1beta1::ArrayValue* release_array_value(); - ::google::firestore::v1beta1::ArrayValue* mutable_array_value(); - void set_allocated_array_value(::google::firestore::v1beta1::ArrayValue* array_value); + const ::google::firestore::v1::ArrayValue& array_value() const; + ::google::firestore::v1::ArrayValue* release_array_value(); + ::google::firestore::v1::ArrayValue* mutable_array_value(); + void set_allocated_array_value(::google::firestore::v1::ArrayValue* array_value); - // .google.firestore.v1beta1.MapValue map_value = 6; + // .google.firestore.v1.MapValue map_value = 6; bool has_map_value() const; void clear_map_value(); static const int kMapValueFieldNumber = 6; - const ::google::firestore::v1beta1::MapValue& map_value() const; - ::google::firestore::v1beta1::MapValue* release_map_value(); - ::google::firestore::v1beta1::MapValue* mutable_map_value(); - void set_allocated_map_value(::google::firestore::v1beta1::MapValue* map_value); + const ::google::firestore::v1::MapValue& map_value() const; + ::google::firestore::v1::MapValue* release_map_value(); + ::google::firestore::v1::MapValue* mutable_map_value(); + void set_allocated_map_value(::google::firestore::v1::MapValue* map_value); ValueTypeCase value_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Value) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Value) private: void set_has_null_value(); void set_has_boolean_value(); @@ -522,18 +522,18 @@ class Value : public ::google::protobuf::Message /* @@protoc_insertion_point(cla ::google::protobuf::internal::ArenaStringPtr bytes_value_; ::google::protobuf::internal::ArenaStringPtr reference_value_; ::google::type::LatLng* geo_point_value_; - ::google::firestore::v1beta1::ArrayValue* array_value_; - ::google::firestore::v1beta1::MapValue* map_value_; + ::google::firestore::v1::ArrayValue* array_value_; + ::google::firestore::v1::MapValue* map_value_; } value_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); }; // ------------------------------------------------------------------- -class ArrayValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ArrayValue) */ { +class ArrayValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ArrayValue) */ { public: ArrayValue(); virtual ~ArrayValue(); @@ -615,37 +615,37 @@ class ArrayValue : public ::google::protobuf::Message /* @@protoc_insertion_poin // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; int values_size() const; void clear_values(); static const int kValuesFieldNumber = 1; - const ::google::firestore::v1beta1::Value& values(int index) const; - ::google::firestore::v1beta1::Value* mutable_values(int index); - ::google::firestore::v1beta1::Value* add_values(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* + const ::google::firestore::v1::Value& values(int index) const; + ::google::firestore::v1::Value* mutable_values(int index); + ::google::firestore::v1::Value* add_values(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* mutable_values(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& values() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ArrayValue) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ArrayValue) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value > values_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value > values_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); }; // ------------------------------------------------------------------- class MapValue_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry { public: typedef ::google::protobuf::internal::MapEntry SuperType; @@ -659,7 +659,7 @@ class MapValue_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEn // ------------------------------------------------------------------- -class MapValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.MapValue) */ { +class MapValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.MapValue) */ { public: MapValue(); virtual ~MapValue(); @@ -742,28 +742,28 @@ class MapValue : public ::google::protobuf::Message /* @@protoc_insertion_point( // accessors ------------------------------------------------------- - // map fields = 1; + // map fields = 1; int fields_size() const; void clear_fields(); static const int kFieldsFieldNumber = 1; - const ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >& + const ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >& fields() const; - ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >* + ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >* mutable_fields(); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.MapValue) + // @@protoc_insertion_point(class_scope:google.firestore.v1.MapValue) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::MapField< MapValue_FieldsEntry_DoNotUse, - ::std::string, ::google::firestore::v1beta1::Value, + ::std::string, ::google::firestore::v1::Value, ::google::protobuf::internal::WireFormatLite::TYPE_STRING, ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE, 0 > fields_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValueImpl(); }; // =================================================================== @@ -783,41 +783,41 @@ inline void Document::clear_name() { name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Document::name() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_get:google.firestore.v1.Document.name) return name_.GetNoArena(); } inline void Document::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_set:google.firestore.v1.Document.name) } #if LANG_CXX11 inline void Document::set_name(::std::string&& value) { name_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Document.name) } #endif inline void Document::set_name(const char* value) { GOOGLE_DCHECK(value != NULL); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Document.name) } inline void Document::set_name(const char* value, size_t size) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Document.name) } inline ::std::string* Document::mutable_name() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.name) return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Document::release_name() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_release:google.firestore.v1.Document.name) return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -828,24 +828,24 @@ inline void Document::set_allocated_name(::std::string* name) { } name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Document.name) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.name) } -// map fields = 2; +// map fields = 2; inline int Document::fields_size() const { return fields_.size(); } inline void Document::clear_fields() { fields_.Clear(); } -inline const ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >& +inline const ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >& Document::fields() const { - // @@protoc_insertion_point(field_map:google.firestore.v1beta1.Document.fields) + // @@protoc_insertion_point(field_map:google.firestore.v1.Document.fields) return fields_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >* +inline ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >* Document::mutable_fields() { - // @@protoc_insertion_point(field_mutable_map:google.firestore.v1beta1.Document.fields) + // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.Document.fields) return fields_.MutableMap(); } @@ -855,12 +855,12 @@ inline bool Document::has_create_time() const { } inline const ::google::protobuf::Timestamp& Document::create_time() const { const ::google::protobuf::Timestamp* p = create_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Document.create_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.Document.create_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* Document::release_create_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Document.create_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.Document.create_time) ::google::protobuf::Timestamp* temp = create_time_; create_time_ = NULL; @@ -871,7 +871,7 @@ inline ::google::protobuf::Timestamp* Document::mutable_create_time() { if (create_time_ == NULL) { create_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Document.create_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.create_time) return create_time_; } inline void Document::set_allocated_create_time(::google::protobuf::Timestamp* create_time) { @@ -891,7 +891,7 @@ inline void Document::set_allocated_create_time(::google::protobuf::Timestamp* c } create_time_ = create_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Document.create_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.create_time) } // .google.protobuf.Timestamp update_time = 4; @@ -900,12 +900,12 @@ inline bool Document::has_update_time() const { } inline const ::google::protobuf::Timestamp& Document::update_time() const { const ::google::protobuf::Timestamp* p = update_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Document.update_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.Document.update_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* Document::release_update_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Document.update_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.Document.update_time) ::google::protobuf::Timestamp* temp = update_time_; update_time_ = NULL; @@ -916,7 +916,7 @@ inline ::google::protobuf::Timestamp* Document::mutable_update_time() { if (update_time_ == NULL) { update_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Document.update_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Document.update_time) return update_time_; } inline void Document::set_allocated_update_time(::google::protobuf::Timestamp* update_time) { @@ -936,7 +936,7 @@ inline void Document::set_allocated_update_time(::google::protobuf::Timestamp* u } update_time_ = update_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Document.update_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Document.update_time) } // ------------------------------------------------------------------- @@ -957,7 +957,7 @@ inline void Value::clear_null_value() { } } inline ::google::protobuf::NullValue Value::null_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.null_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.null_value) if (has_null_value()) { return static_cast< ::google::protobuf::NullValue >(value_type_.null_value_); } @@ -969,7 +969,7 @@ inline void Value::set_null_value(::google::protobuf::NullValue value) { set_has_null_value(); } value_type_.null_value_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.null_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.null_value) } // bool boolean_value = 1; @@ -986,7 +986,7 @@ inline void Value::clear_boolean_value() { } } inline bool Value::boolean_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.boolean_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.boolean_value) if (has_boolean_value()) { return value_type_.boolean_value_; } @@ -998,7 +998,7 @@ inline void Value::set_boolean_value(bool value) { set_has_boolean_value(); } value_type_.boolean_value_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.boolean_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.boolean_value) } // int64 integer_value = 2; @@ -1015,7 +1015,7 @@ inline void Value::clear_integer_value() { } } inline ::google::protobuf::int64 Value::integer_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.integer_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.integer_value) if (has_integer_value()) { return value_type_.integer_value_; } @@ -1027,7 +1027,7 @@ inline void Value::set_integer_value(::google::protobuf::int64 value) { set_has_integer_value(); } value_type_.integer_value_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.integer_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.integer_value) } // double double_value = 3; @@ -1044,7 +1044,7 @@ inline void Value::clear_double_value() { } } inline double Value::double_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.double_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.double_value) if (has_double_value()) { return value_type_.double_value_; } @@ -1056,7 +1056,7 @@ inline void Value::set_double_value(double value) { set_has_double_value(); } value_type_.double_value_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.double_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.double_value) } // .google.protobuf.Timestamp timestamp_value = 10; @@ -1067,7 +1067,7 @@ inline void Value::set_has_timestamp_value() { _oneof_case_[0] = kTimestampValue; } inline ::google::protobuf::Timestamp* Value::release_timestamp_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.timestamp_value) + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.timestamp_value) if (has_timestamp_value()) { clear_has_value_type(); ::google::protobuf::Timestamp* temp = value_type_.timestamp_value_; @@ -1078,7 +1078,7 @@ inline ::google::protobuf::Timestamp* Value::release_timestamp_value() { } } inline const ::google::protobuf::Timestamp& Value::timestamp_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.timestamp_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.timestamp_value) return has_timestamp_value() ? *value_type_.timestamp_value_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -1089,7 +1089,7 @@ inline ::google::protobuf::Timestamp* Value::mutable_timestamp_value() { set_has_timestamp_value(); value_type_.timestamp_value_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.timestamp_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.timestamp_value) return value_type_.timestamp_value_; } @@ -1107,25 +1107,25 @@ inline void Value::clear_string_value() { } } inline const ::std::string& Value::string_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.string_value) if (has_string_value()) { return value_type_.string_value_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void Value::set_string_value(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.string_value) if (!has_string_value()) { clear_value_type(); set_has_string_value(); value_type_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } value_type_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.string_value) } #if LANG_CXX11 inline void Value::set_string_value(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.string_value) if (!has_string_value()) { clear_value_type(); set_has_string_value(); @@ -1133,7 +1133,7 @@ inline void Value::set_string_value(::std::string&& value) { } value_type_.string_value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Value.string_value) } #endif inline void Value::set_string_value(const char* value) { @@ -1145,7 +1145,7 @@ inline void Value::set_string_value(const char* value) { } value_type_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Value.string_value) } inline void Value::set_string_value(const char* value, size_t size) { if (!has_string_value()) { @@ -1155,7 +1155,7 @@ inline void Value::set_string_value(const char* value, size_t size) { } value_type_.string_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Value.string_value) } inline ::std::string* Value::mutable_string_value() { if (!has_string_value()) { @@ -1163,11 +1163,11 @@ inline ::std::string* Value::mutable_string_value() { set_has_string_value(); value_type_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.string_value) return value_type_.string_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Value::release_string_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.string_value) if (has_string_value()) { clear_has_value_type(); return value_type_.string_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1185,7 +1185,7 @@ inline void Value::set_allocated_string_value(::std::string* string_value) { value_type_.string_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.string_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.string_value) } // bytes bytes_value = 18; @@ -1202,25 +1202,25 @@ inline void Value::clear_bytes_value() { } } inline const ::std::string& Value::bytes_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.bytes_value) if (has_bytes_value()) { return value_type_.bytes_value_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void Value::set_bytes_value(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.bytes_value) if (!has_bytes_value()) { clear_value_type(); set_has_bytes_value(); value_type_.bytes_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } value_type_.bytes_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.bytes_value) } #if LANG_CXX11 inline void Value::set_bytes_value(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.bytes_value) if (!has_bytes_value()) { clear_value_type(); set_has_bytes_value(); @@ -1228,7 +1228,7 @@ inline void Value::set_bytes_value(::std::string&& value) { } value_type_.bytes_value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Value.bytes_value) } #endif inline void Value::set_bytes_value(const char* value) { @@ -1240,7 +1240,7 @@ inline void Value::set_bytes_value(const char* value) { } value_type_.bytes_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Value.bytes_value) } inline void Value::set_bytes_value(const void* value, size_t size) { if (!has_bytes_value()) { @@ -1250,7 +1250,7 @@ inline void Value::set_bytes_value(const void* value, size_t size) { } value_type_.bytes_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Value.bytes_value) } inline ::std::string* Value::mutable_bytes_value() { if (!has_bytes_value()) { @@ -1258,11 +1258,11 @@ inline ::std::string* Value::mutable_bytes_value() { set_has_bytes_value(); value_type_.bytes_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.bytes_value) return value_type_.bytes_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Value::release_bytes_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.bytes_value) if (has_bytes_value()) { clear_has_value_type(); return value_type_.bytes_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1280,7 +1280,7 @@ inline void Value::set_allocated_bytes_value(::std::string* bytes_value) { value_type_.bytes_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), bytes_value); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.bytes_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.bytes_value) } // string reference_value = 5; @@ -1297,25 +1297,25 @@ inline void Value::clear_reference_value() { } } inline const ::std::string& Value::reference_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.reference_value) if (has_reference_value()) { return value_type_.reference_value_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void Value::set_reference_value(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.reference_value) if (!has_reference_value()) { clear_value_type(); set_has_reference_value(); value_type_.reference_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } value_type_.reference_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.reference_value) } #if LANG_CXX11 inline void Value::set_reference_value(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.Value.reference_value) if (!has_reference_value()) { clear_value_type(); set_has_reference_value(); @@ -1323,7 +1323,7 @@ inline void Value::set_reference_value(::std::string&& value) { } value_type_.reference_value_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Value.reference_value) } #endif inline void Value::set_reference_value(const char* value) { @@ -1335,7 +1335,7 @@ inline void Value::set_reference_value(const char* value) { } value_type_.reference_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Value.reference_value) } inline void Value::set_reference_value(const char* value, size_t size) { if (!has_reference_value()) { @@ -1345,7 +1345,7 @@ inline void Value::set_reference_value(const char* value, size_t size) { } value_type_.reference_value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Value.reference_value) } inline ::std::string* Value::mutable_reference_value() { if (!has_reference_value()) { @@ -1353,11 +1353,11 @@ inline ::std::string* Value::mutable_reference_value() { set_has_reference_value(); value_type_.reference_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.reference_value) return value_type_.reference_value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Value::release_reference_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.reference_value) if (has_reference_value()) { clear_has_value_type(); return value_type_.reference_value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1375,7 +1375,7 @@ inline void Value::set_allocated_reference_value(::std::string* reference_value) value_type_.reference_value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), reference_value); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Value.reference_value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Value.reference_value) } // .google.type.LatLng geo_point_value = 8; @@ -1386,7 +1386,7 @@ inline void Value::set_has_geo_point_value() { _oneof_case_[0] = kGeoPointValue; } inline ::google::type::LatLng* Value::release_geo_point_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.geo_point_value) + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.geo_point_value) if (has_geo_point_value()) { clear_has_value_type(); ::google::type::LatLng* temp = value_type_.geo_point_value_; @@ -1397,7 +1397,7 @@ inline ::google::type::LatLng* Value::release_geo_point_value() { } } inline const ::google::type::LatLng& Value::geo_point_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.geo_point_value) + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.geo_point_value) return has_geo_point_value() ? *value_type_.geo_point_value_ : *reinterpret_cast< ::google::type::LatLng*>(&::google::type::_LatLng_default_instance_); @@ -1408,11 +1408,11 @@ inline ::google::type::LatLng* Value::mutable_geo_point_value() { set_has_geo_point_value(); value_type_.geo_point_value_ = new ::google::type::LatLng; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.geo_point_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.geo_point_value) return value_type_.geo_point_value_; } -// .google.firestore.v1beta1.ArrayValue array_value = 9; +// .google.firestore.v1.ArrayValue array_value = 9; inline bool Value::has_array_value() const { return value_type_case() == kArrayValue; } @@ -1425,34 +1425,34 @@ inline void Value::clear_array_value() { clear_has_value_type(); } } -inline ::google::firestore::v1beta1::ArrayValue* Value::release_array_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.array_value) +inline ::google::firestore::v1::ArrayValue* Value::release_array_value() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.array_value) if (has_array_value()) { clear_has_value_type(); - ::google::firestore::v1beta1::ArrayValue* temp = value_type_.array_value_; + ::google::firestore::v1::ArrayValue* temp = value_type_.array_value_; value_type_.array_value_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::ArrayValue& Value::array_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.array_value) +inline const ::google::firestore::v1::ArrayValue& Value::array_value() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.array_value) return has_array_value() ? *value_type_.array_value_ - : *reinterpret_cast< ::google::firestore::v1beta1::ArrayValue*>(&::google::firestore::v1beta1::_ArrayValue_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::ArrayValue*>(&::google::firestore::v1::_ArrayValue_default_instance_); } -inline ::google::firestore::v1beta1::ArrayValue* Value::mutable_array_value() { +inline ::google::firestore::v1::ArrayValue* Value::mutable_array_value() { if (!has_array_value()) { clear_value_type(); set_has_array_value(); - value_type_.array_value_ = new ::google::firestore::v1beta1::ArrayValue; + value_type_.array_value_ = new ::google::firestore::v1::ArrayValue; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.array_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.array_value) return value_type_.array_value_; } -// .google.firestore.v1beta1.MapValue map_value = 6; +// .google.firestore.v1.MapValue map_value = 6; inline bool Value::has_map_value() const { return value_type_case() == kMapValue; } @@ -1465,30 +1465,30 @@ inline void Value::clear_map_value() { clear_has_value_type(); } } -inline ::google::firestore::v1beta1::MapValue* Value::release_map_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Value.map_value) +inline ::google::firestore::v1::MapValue* Value::release_map_value() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Value.map_value) if (has_map_value()) { clear_has_value_type(); - ::google::firestore::v1beta1::MapValue* temp = value_type_.map_value_; + ::google::firestore::v1::MapValue* temp = value_type_.map_value_; value_type_.map_value_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::MapValue& Value::map_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Value.map_value) +inline const ::google::firestore::v1::MapValue& Value::map_value() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Value.map_value) return has_map_value() ? *value_type_.map_value_ - : *reinterpret_cast< ::google::firestore::v1beta1::MapValue*>(&::google::firestore::v1beta1::_MapValue_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::MapValue*>(&::google::firestore::v1::_MapValue_default_instance_); } -inline ::google::firestore::v1beta1::MapValue* Value::mutable_map_value() { +inline ::google::firestore::v1::MapValue* Value::mutable_map_value() { if (!has_map_value()) { clear_value_type(); set_has_map_value(); - value_type_.map_value_ = new ::google::firestore::v1beta1::MapValue; + value_type_.map_value_ = new ::google::firestore::v1::MapValue; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Value.map_value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Value.map_value) return value_type_.map_value_; } @@ -1505,33 +1505,33 @@ inline Value::ValueTypeCase Value::value_type_case() const { // ArrayValue -// repeated .google.firestore.v1beta1.Value values = 1; +// repeated .google.firestore.v1.Value values = 1; inline int ArrayValue::values_size() const { return values_.size(); } inline void ArrayValue::clear_values() { values_.Clear(); } -inline const ::google::firestore::v1beta1::Value& ArrayValue::values(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ArrayValue.values) +inline const ::google::firestore::v1::Value& ArrayValue::values(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ArrayValue.values) return values_.Get(index); } -inline ::google::firestore::v1beta1::Value* ArrayValue::mutable_values(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ArrayValue.values) +inline ::google::firestore::v1::Value* ArrayValue::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ArrayValue.values) return values_.Mutable(index); } -inline ::google::firestore::v1beta1::Value* ArrayValue::add_values() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.ArrayValue.values) +inline ::google::firestore::v1::Value* ArrayValue::add_values() { + // @@protoc_insertion_point(field_add:google.firestore.v1.ArrayValue.values) return values_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* ArrayValue::mutable_values() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.ArrayValue.values) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.ArrayValue.values) return &values_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& ArrayValue::values() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.ArrayValue.values) + // @@protoc_insertion_point(field_list:google.firestore.v1.ArrayValue.values) return values_; } @@ -1541,21 +1541,21 @@ ArrayValue::values() const { // MapValue -// map fields = 1; +// map fields = 1; inline int MapValue::fields_size() const { return fields_.size(); } inline void MapValue::clear_fields() { fields_.Clear(); } -inline const ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >& +inline const ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >& MapValue::fields() const { - // @@protoc_insertion_point(field_map:google.firestore.v1beta1.MapValue.fields) + // @@protoc_insertion_point(field_map:google.firestore.v1.MapValue.fields) return fields_.GetMap(); } -inline ::google::protobuf::Map< ::std::string, ::google::firestore::v1beta1::Value >* +inline ::google::protobuf::Map< ::std::string, ::google::firestore::v1::Value >* MapValue::mutable_fields() { - // @@protoc_insertion_point(field_mutable_map:google.firestore.v1beta1.MapValue.fields) + // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.MapValue.fields) return fields_.MutableMap(); } @@ -1575,10 +1575,10 @@ MapValue::mutable_fields() { // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2ffirestore_2fv1beta1_2fdocument_2eproto__INCLUDED +#endif // PROTOBUF_google_2ffirestore_2fv1_2fdocument_2eproto__INCLUDED diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.cc b/Firestore/Protos/cpp/google/firestore/v1/firestore.pb.cc similarity index 79% rename from Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.cc rename to Firestore/Protos/cpp/google/firestore/v1/firestore.pb.cc index 4a747b5ba62..900edfe3b0f 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.cc +++ b/Firestore/Protos/cpp/google/firestore/v1/firestore.pb.cc @@ -15,9 +15,9 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/firestore.proto +// source: google/firestore/v1/firestore.proto -#include "google/firestore/v1beta1/firestore.pb.h" +#include "google/firestore/v1/firestore.pb.h" #include @@ -37,7 +37,7 @@ // @@protoc_insertion_point(includes) namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class GetDocumentRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -77,14 +77,14 @@ class BatchGetDocumentsRequestDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; ::google::protobuf::internal::ArenaStringPtr transaction_; - const ::google::firestore::v1beta1::TransactionOptions* new_transaction_; + const ::google::firestore::v1::TransactionOptions* new_transaction_; const ::google::protobuf::Timestamp* read_time_; } _BatchGetDocumentsRequest_default_instance_; class BatchGetDocumentsResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::Document* found_; + const ::google::firestore::v1::Document* found_; ::google::protobuf::internal::ArenaStringPtr missing_; } _BatchGetDocumentsResponse_default_instance_; class BeginTransactionRequestDefaultTypeInternal { @@ -116,9 +116,9 @@ class RunQueryRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::StructuredQuery* structured_query_; + const ::google::firestore::v1::StructuredQuery* structured_query_; ::google::protobuf::internal::ArenaStringPtr transaction_; - const ::google::firestore::v1beta1::TransactionOptions* new_transaction_; + const ::google::firestore::v1::TransactionOptions* new_transaction_; const ::google::protobuf::Timestamp* read_time_; } _RunQueryRequest_default_instance_; class RunQueryResponseDefaultTypeInternal { @@ -150,18 +150,18 @@ class ListenRequestDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::Target* add_target_; + const ::google::firestore::v1::Target* add_target_; ::google::protobuf::int32 remove_target_; } _ListenRequest_default_instance_; class ListenResponseDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::TargetChange* target_change_; - const ::google::firestore::v1beta1::DocumentChange* document_change_; - const ::google::firestore::v1beta1::DocumentDelete* document_delete_; - const ::google::firestore::v1beta1::DocumentRemove* document_remove_; - const ::google::firestore::v1beta1::ExistenceFilter* filter_; + const ::google::firestore::v1::TargetChange* target_change_; + const ::google::firestore::v1::DocumentChange* document_change_; + const ::google::firestore::v1::DocumentDelete* document_delete_; + const ::google::firestore::v1::DocumentRemove* document_remove_; + const ::google::firestore::v1::ExistenceFilter* filter_; } _ListenResponse_default_instance_; class Target_DocumentsTargetDefaultTypeInternal { public: @@ -172,14 +172,14 @@ class Target_QueryTargetDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::StructuredQuery* structured_query_; + const ::google::firestore::v1::StructuredQuery* structured_query_; } _Target_QueryTarget_default_instance_; class TargetDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::Target_QueryTarget* query_; - const ::google::firestore::v1beta1::Target_DocumentsTarget* documents_; + const ::google::firestore::v1::Target_QueryTarget* query_; + const ::google::firestore::v1::Target_DocumentsTarget* documents_; ::google::protobuf::internal::ArenaStringPtr resume_token_; const ::google::protobuf::Timestamp* read_time_; } _Target_default_instance_; @@ -198,10 +198,10 @@ class ListCollectionIdsResponseDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _ListCollectionIdsResponse_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google -namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto { void InitDefaultsGetDocumentRequestImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -210,14 +210,14 @@ void InitDefaultsGetDocumentRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_GetDocumentRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::GetDocumentRequest(); + void* ptr = &::google::firestore::v1::_GetDocumentRequest_default_instance_; + new (ptr) ::google::firestore::v1::GetDocumentRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::GetDocumentRequest::InitAsDefaultInstance(); + ::google::firestore::v1::GetDocumentRequest::InitAsDefaultInstance(); } void InitDefaultsGetDocumentRequest() { @@ -233,14 +233,14 @@ void InitDefaultsListDocumentsRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListDocumentsRequest(); + void* ptr = &::google::firestore::v1::_ListDocumentsRequest_default_instance_; + new (ptr) ::google::firestore::v1::ListDocumentsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListDocumentsRequest::InitAsDefaultInstance(); + ::google::firestore::v1::ListDocumentsRequest::InitAsDefaultInstance(); } void InitDefaultsListDocumentsRequest() { @@ -256,13 +256,13 @@ void InitDefaultsListDocumentsResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); { - void* ptr = &::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListDocumentsResponse(); + void* ptr = &::google::firestore::v1::_ListDocumentsResponse_default_instance_; + new (ptr) ::google::firestore::v1::ListDocumentsResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListDocumentsResponse::InitAsDefaultInstance(); + ::google::firestore::v1::ListDocumentsResponse::InitAsDefaultInstance(); } void InitDefaultsListDocumentsResponse() { @@ -278,14 +278,14 @@ void InitDefaultsCreateDocumentRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); { - void* ptr = &::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::CreateDocumentRequest(); + void* ptr = &::google::firestore::v1::_CreateDocumentRequest_default_instance_; + new (ptr) ::google::firestore::v1::CreateDocumentRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::CreateDocumentRequest::InitAsDefaultInstance(); + ::google::firestore::v1::CreateDocumentRequest::InitAsDefaultInstance(); } void InitDefaultsCreateDocumentRequest() { @@ -301,15 +301,15 @@ void InitDefaultsUpdateDocumentRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition(); { - void* ptr = &::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::UpdateDocumentRequest(); + void* ptr = &::google::firestore::v1::_UpdateDocumentRequest_default_instance_; + new (ptr) ::google::firestore::v1::UpdateDocumentRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::UpdateDocumentRequest::InitAsDefaultInstance(); + ::google::firestore::v1::UpdateDocumentRequest::InitAsDefaultInstance(); } void InitDefaultsUpdateDocumentRequest() { @@ -325,13 +325,13 @@ void InitDefaultsDeleteDocumentRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition(); { - void* ptr = &::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::DeleteDocumentRequest(); + void* ptr = &::google::firestore::v1::_DeleteDocumentRequest_default_instance_; + new (ptr) ::google::firestore::v1::DeleteDocumentRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DeleteDocumentRequest::InitAsDefaultInstance(); + ::google::firestore::v1::DeleteDocumentRequest::InitAsDefaultInstance(); } void InitDefaultsDeleteDocumentRequest() { @@ -347,15 +347,15 @@ void InitDefaultsBatchGetDocumentsRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsRequest(); + void* ptr = &::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_; + new (ptr) ::google::firestore::v1::BatchGetDocumentsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::BatchGetDocumentsRequest::InitAsDefaultInstance(); + ::google::firestore::v1::BatchGetDocumentsRequest::InitAsDefaultInstance(); } void InitDefaultsBatchGetDocumentsRequest() { @@ -371,14 +371,14 @@ void InitDefaultsBatchGetDocumentsResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::BatchGetDocumentsResponse(); + void* ptr = &::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_; + new (ptr) ::google::firestore::v1::BatchGetDocumentsResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::BatchGetDocumentsResponse::InitAsDefaultInstance(); + ::google::firestore::v1::BatchGetDocumentsResponse::InitAsDefaultInstance(); } void InitDefaultsBatchGetDocumentsResponse() { @@ -394,13 +394,13 @@ void InitDefaultsBeginTransactionRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions(); { - void* ptr = &::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::BeginTransactionRequest(); + void* ptr = &::google::firestore::v1::_BeginTransactionRequest_default_instance_; + new (ptr) ::google::firestore::v1::BeginTransactionRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::BeginTransactionRequest::InitAsDefaultInstance(); + ::google::firestore::v1::BeginTransactionRequest::InitAsDefaultInstance(); } void InitDefaultsBeginTransactionRequest() { @@ -417,11 +417,11 @@ void InitDefaultsBeginTransactionResponseImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::BeginTransactionResponse(); + void* ptr = &::google::firestore::v1::_BeginTransactionResponse_default_instance_; + new (ptr) ::google::firestore::v1::BeginTransactionResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::BeginTransactionResponse::InitAsDefaultInstance(); + ::google::firestore::v1::BeginTransactionResponse::InitAsDefaultInstance(); } void InitDefaultsBeginTransactionResponse() { @@ -437,13 +437,13 @@ void InitDefaultsCommitRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite(); { - void* ptr = &::google::firestore::v1beta1::_CommitRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::CommitRequest(); + void* ptr = &::google::firestore::v1::_CommitRequest_default_instance_; + new (ptr) ::google::firestore::v1::CommitRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::CommitRequest::InitAsDefaultInstance(); + ::google::firestore::v1::CommitRequest::InitAsDefaultInstance(); } void InitDefaultsCommitRequest() { @@ -459,14 +459,14 @@ void InitDefaultsCommitResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_CommitResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::CommitResponse(); + void* ptr = &::google::firestore::v1::_CommitResponse_default_instance_; + new (ptr) ::google::firestore::v1::CommitResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::CommitResponse::InitAsDefaultInstance(); + ::google::firestore::v1::CommitResponse::InitAsDefaultInstance(); } void InitDefaultsCommitResponse() { @@ -483,11 +483,11 @@ void InitDefaultsRollbackRequestImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_RollbackRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::RollbackRequest(); + void* ptr = &::google::firestore::v1::_RollbackRequest_default_instance_; + new (ptr) ::google::firestore::v1::RollbackRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::RollbackRequest::InitAsDefaultInstance(); + ::google::firestore::v1::RollbackRequest::InitAsDefaultInstance(); } void InitDefaultsRollbackRequest() { @@ -503,15 +503,15 @@ void InitDefaultsRunQueryRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsTransactionOptions(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsTransactionOptions(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_RunQueryRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::RunQueryRequest(); + void* ptr = &::google::firestore::v1::_RunQueryRequest_default_instance_; + new (ptr) ::google::firestore::v1::RunQueryRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::RunQueryRequest::InitAsDefaultInstance(); + ::google::firestore::v1::RunQueryRequest::InitAsDefaultInstance(); } void InitDefaultsRunQueryRequest() { @@ -527,14 +527,14 @@ void InitDefaultsRunQueryResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_RunQueryResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::RunQueryResponse(); + void* ptr = &::google::firestore::v1::_RunQueryResponse_default_instance_; + new (ptr) ::google::firestore::v1::RunQueryResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::RunQueryResponse::InitAsDefaultInstance(); + ::google::firestore::v1::RunQueryResponse::InitAsDefaultInstance(); } void InitDefaultsRunQueryResponse() { @@ -551,10 +551,10 @@ void InitDefaultsWriteRequest_LabelsEntry_DoNotUseImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_; - new (ptr) ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse(); + void* ptr = &::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_; + new (ptr) ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse(); } - ::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance(); + ::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance(); } void InitDefaultsWriteRequest_LabelsEntry_DoNotUse() { @@ -570,14 +570,14 @@ void InitDefaultsWriteRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite(); - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest_LabelsEntry_DoNotUse(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest_LabelsEntry_DoNotUse(); { - void* ptr = &::google::firestore::v1beta1::_WriteRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::WriteRequest(); + void* ptr = &::google::firestore::v1::_WriteRequest_default_instance_; + new (ptr) ::google::firestore::v1::WriteRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::WriteRequest::InitAsDefaultInstance(); + ::google::firestore::v1::WriteRequest::InitAsDefaultInstance(); } void InitDefaultsWriteRequest() { @@ -593,14 +593,14 @@ void InitDefaultsWriteResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_WriteResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::WriteResponse(); + void* ptr = &::google::firestore::v1::_WriteResponse_default_instance_; + new (ptr) ::google::firestore::v1::WriteResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::WriteResponse::InitAsDefaultInstance(); + ::google::firestore::v1::WriteResponse::InitAsDefaultInstance(); } void InitDefaultsWriteResponse() { @@ -617,10 +617,10 @@ void InitDefaultsListenRequest_LabelsEntry_DoNotUseImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse(); + void* ptr = &::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_; + new (ptr) ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse(); } - ::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance(); + ::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse::InitAsDefaultInstance(); } void InitDefaultsListenRequest_LabelsEntry_DoNotUse() { @@ -636,14 +636,14 @@ void InitDefaultsListenRequestImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget(); - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest_LabelsEntry_DoNotUse(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest_LabelsEntry_DoNotUse(); { - void* ptr = &::google::firestore::v1beta1::_ListenRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListenRequest(); + void* ptr = &::google::firestore::v1::_ListenRequest_default_instance_; + new (ptr) ::google::firestore::v1::ListenRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListenRequest::InitAsDefaultInstance(); + ::google::firestore::v1::ListenRequest::InitAsDefaultInstance(); } void InitDefaultsListenRequest() { @@ -659,17 +659,17 @@ void InitDefaultsListenResponseImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange(); - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange(); - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete(); - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove(); - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter(); { - void* ptr = &::google::firestore::v1beta1::_ListenResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListenResponse(); + void* ptr = &::google::firestore::v1::_ListenResponse_default_instance_; + new (ptr) ::google::firestore::v1::ListenResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListenResponse::InitAsDefaultInstance(); + ::google::firestore::v1::ListenResponse::InitAsDefaultInstance(); } void InitDefaultsListenResponse() { @@ -686,11 +686,11 @@ void InitDefaultsTarget_DocumentsTargetImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_; - new (ptr) ::google::firestore::v1beta1::Target_DocumentsTarget(); + void* ptr = &::google::firestore::v1::_Target_DocumentsTarget_default_instance_; + new (ptr) ::google::firestore::v1::Target_DocumentsTarget(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Target_DocumentsTarget::InitAsDefaultInstance(); + ::google::firestore::v1::Target_DocumentsTarget::InitAsDefaultInstance(); } void InitDefaultsTarget_DocumentsTarget() { @@ -706,13 +706,13 @@ void InitDefaultsTarget_QueryTargetImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery(); { - void* ptr = &::google::firestore::v1beta1::_Target_QueryTarget_default_instance_; - new (ptr) ::google::firestore::v1beta1::Target_QueryTarget(); + void* ptr = &::google::firestore::v1::_Target_QueryTarget_default_instance_; + new (ptr) ::google::firestore::v1::Target_QueryTarget(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Target_QueryTarget::InitAsDefaultInstance(); + ::google::firestore::v1::Target_QueryTarget::InitAsDefaultInstance(); } void InitDefaultsTarget_QueryTarget() { @@ -728,15 +728,15 @@ void InitDefaultsTargetImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_Target_default_instance_; - new (ptr) ::google::firestore::v1beta1::Target(); + void* ptr = &::google::firestore::v1::_Target_default_instance_; + new (ptr) ::google::firestore::v1::Target(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Target::InitAsDefaultInstance(); + ::google::firestore::v1::Target::InitAsDefaultInstance(); } void InitDefaultsTarget() { @@ -755,11 +755,11 @@ void InitDefaultsTargetChangeImpl() { protobuf_google_2frpc_2fstatus_2eproto::InitDefaultsStatus(); protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_TargetChange_default_instance_; - new (ptr) ::google::firestore::v1beta1::TargetChange(); + void* ptr = &::google::firestore::v1::_TargetChange_default_instance_; + new (ptr) ::google::firestore::v1::TargetChange(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::TargetChange::InitAsDefaultInstance(); + ::google::firestore::v1::TargetChange::InitAsDefaultInstance(); } void InitDefaultsTargetChange() { @@ -776,11 +776,11 @@ void InitDefaultsListCollectionIdsRequestImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListCollectionIdsRequest(); + void* ptr = &::google::firestore::v1::_ListCollectionIdsRequest_default_instance_; + new (ptr) ::google::firestore::v1::ListCollectionIdsRequest(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListCollectionIdsRequest::InitAsDefaultInstance(); + ::google::firestore::v1::ListCollectionIdsRequest::InitAsDefaultInstance(); } void InitDefaultsListCollectionIdsRequest() { @@ -797,11 +797,11 @@ void InitDefaultsListCollectionIdsResponseImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_; - new (ptr) ::google::firestore::v1beta1::ListCollectionIdsResponse(); + void* ptr = &::google::firestore::v1::_ListCollectionIdsResponse_default_instance_; + new (ptr) ::google::firestore::v1::ListCollectionIdsResponse(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ListCollectionIdsResponse::InitAsDefaultInstance(); + ::google::firestore::v1::ListCollectionIdsResponse::InitAsDefaultInstance(); } void InitDefaultsListCollectionIdsResponse() { @@ -814,317 +814,317 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, mask_), - offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, transaction_), - offsetof(::google::firestore::v1beta1::GetDocumentRequestDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::GetDocumentRequest, consistency_selector_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, mask_), + offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, transaction_), + offsetof(::google::firestore::v1::GetDocumentRequestDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::GetDocumentRequest, consistency_selector_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, parent_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, collection_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_size_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, page_token_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, order_by_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, mask_), - offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, transaction_), - offsetof(::google::firestore::v1beta1::ListDocumentsRequestDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, show_missing_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsRequest, consistency_selector_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, parent_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, collection_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, page_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, order_by_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, mask_), + offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, transaction_), + offsetof(::google::firestore::v1::ListDocumentsRequestDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, show_missing_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsRequest, consistency_selector_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, documents_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListDocumentsResponse, next_page_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, documents_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListDocumentsResponse, next_page_token_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, parent_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, collection_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CreateDocumentRequest, mask_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, parent_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, collection_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CreateDocumentRequest, mask_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, update_mask_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, mask_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::UpdateDocumentRequest, current_document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, update_mask_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, mask_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::UpdateDocumentRequest, current_document_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DeleteDocumentRequest, current_document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DeleteDocumentRequest, current_document_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, database_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, documents_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, mask_), - offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_), - offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_), - offsetof(::google::firestore::v1beta1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsRequest, consistency_selector_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, database_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, documents_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, mask_), + offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, transaction_), + offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, new_transaction_), + offsetof(::google::firestore::v1::BatchGetDocumentsRequestDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsRequest, consistency_selector_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, found_), - offsetof(::google::firestore::v1beta1::BatchGetDocumentsResponseDefaultTypeInternal, missing_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, transaction_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BatchGetDocumentsResponse, result_), + offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, found_), + offsetof(::google::firestore::v1::BatchGetDocumentsResponseDefaultTypeInternal, missing_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BatchGetDocumentsResponse, result_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, database_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionRequest, options_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, database_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionRequest, options_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::BeginTransactionResponse, transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::BeginTransactionResponse, transaction_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, database_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, writes_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitRequest, transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, database_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, writes_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitRequest, transaction_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, write_results_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::CommitResponse, commit_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitResponse, write_results_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::CommitResponse, commit_time_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, database_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RollbackRequest, transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, database_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RollbackRequest, transaction_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, parent_), - offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, structured_query_), - offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, transaction_), - offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, new_transaction_), - offsetof(::google::firestore::v1beta1::RunQueryRequestDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, query_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryRequest, consistency_selector_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, parent_), + offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, structured_query_), + offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, transaction_), + offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, new_transaction_), + offsetof(::google::firestore::v1::RunQueryRequestDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, query_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryRequest, consistency_selector_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, transaction_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::RunQueryResponse, skipped_results_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, transaction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::RunQueryResponse, skipped_results_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, database_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, writes_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, stream_token_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteRequest, labels_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, database_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, writes_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, stream_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteRequest, labels_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, stream_token_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, write_results_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResponse, commit_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, stream_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, write_results_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResponse, commit_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _has_bits_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, key_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, key_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse, value_), 0, 1, ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, database_), - offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, add_target_), - offsetof(::google::firestore::v1beta1::ListenRequestDefaultTypeInternal, remove_target_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, labels_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenRequest, target_change_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, database_), + offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, add_target_), + offsetof(::google::firestore::v1::ListenRequestDefaultTypeInternal, remove_target_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, labels_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenRequest, target_change_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, target_change_), - offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_change_), - offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_delete_), - offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, document_remove_), - offsetof(::google::firestore::v1beta1::ListenResponseDefaultTypeInternal, filter_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListenResponse, response_type_), + offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, target_change_), + offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_change_), + offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_delete_), + offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, document_remove_), + offsetof(::google::firestore::v1::ListenResponseDefaultTypeInternal, filter_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListenResponse, response_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_DocumentsTarget, documents_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_DocumentsTarget, documents_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, parent_), - offsetof(::google::firestore::v1beta1::Target_QueryTargetDefaultTypeInternal, structured_query_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target_QueryTarget, query_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, parent_), + offsetof(::google::firestore::v1::Target_QueryTargetDefaultTypeInternal, structured_query_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target_QueryTarget, query_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, query_), - offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, documents_), - offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, resume_token_), - offsetof(::google::firestore::v1beta1::TargetDefaultTypeInternal, read_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, once_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, target_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Target, resume_type_), + offsetof(::google::firestore::v1::TargetDefaultTypeInternal, query_), + offsetof(::google::firestore::v1::TargetDefaultTypeInternal, documents_), + offsetof(::google::firestore::v1::TargetDefaultTypeInternal, resume_token_), + offsetof(::google::firestore::v1::TargetDefaultTypeInternal, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, target_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, once_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, target_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Target, resume_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_change_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, target_ids_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, cause_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, resume_token_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::TargetChange, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_change_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, target_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, cause_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, resume_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::TargetChange, read_time_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, parent_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_size_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsRequest, page_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, parent_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_size_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsRequest, page_token_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, collection_ids_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ListCollectionIdsResponse, next_page_token_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, collection_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ListCollectionIdsResponse, next_page_token_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::firestore::v1beta1::GetDocumentRequest)}, - { 10, -1, sizeof(::google::firestore::v1beta1::ListDocumentsRequest)}, - { 25, -1, sizeof(::google::firestore::v1beta1::ListDocumentsResponse)}, - { 32, -1, sizeof(::google::firestore::v1beta1::CreateDocumentRequest)}, - { 42, -1, sizeof(::google::firestore::v1beta1::UpdateDocumentRequest)}, - { 51, -1, sizeof(::google::firestore::v1beta1::DeleteDocumentRequest)}, - { 58, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsRequest)}, - { 70, -1, sizeof(::google::firestore::v1beta1::BatchGetDocumentsResponse)}, - { 80, -1, sizeof(::google::firestore::v1beta1::BeginTransactionRequest)}, - { 87, -1, sizeof(::google::firestore::v1beta1::BeginTransactionResponse)}, - { 93, -1, sizeof(::google::firestore::v1beta1::CommitRequest)}, - { 101, -1, sizeof(::google::firestore::v1beta1::CommitResponse)}, - { 108, -1, sizeof(::google::firestore::v1beta1::RollbackRequest)}, - { 115, -1, sizeof(::google::firestore::v1beta1::RunQueryRequest)}, - { 127, -1, sizeof(::google::firestore::v1beta1::RunQueryResponse)}, - { 136, 143, sizeof(::google::firestore::v1beta1::WriteRequest_LabelsEntry_DoNotUse)}, - { 145, -1, sizeof(::google::firestore::v1beta1::WriteRequest)}, - { 155, -1, sizeof(::google::firestore::v1beta1::WriteResponse)}, - { 164, 171, sizeof(::google::firestore::v1beta1::ListenRequest_LabelsEntry_DoNotUse)}, - { 173, -1, sizeof(::google::firestore::v1beta1::ListenRequest)}, - { 183, -1, sizeof(::google::firestore::v1beta1::ListenResponse)}, - { 194, -1, sizeof(::google::firestore::v1beta1::Target_DocumentsTarget)}, - { 200, -1, sizeof(::google::firestore::v1beta1::Target_QueryTarget)}, - { 208, -1, sizeof(::google::firestore::v1beta1::Target)}, - { 221, -1, sizeof(::google::firestore::v1beta1::TargetChange)}, - { 231, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsRequest)}, - { 239, -1, sizeof(::google::firestore::v1beta1::ListCollectionIdsResponse)}, + { 0, -1, sizeof(::google::firestore::v1::GetDocumentRequest)}, + { 10, -1, sizeof(::google::firestore::v1::ListDocumentsRequest)}, + { 25, -1, sizeof(::google::firestore::v1::ListDocumentsResponse)}, + { 32, -1, sizeof(::google::firestore::v1::CreateDocumentRequest)}, + { 42, -1, sizeof(::google::firestore::v1::UpdateDocumentRequest)}, + { 51, -1, sizeof(::google::firestore::v1::DeleteDocumentRequest)}, + { 58, -1, sizeof(::google::firestore::v1::BatchGetDocumentsRequest)}, + { 70, -1, sizeof(::google::firestore::v1::BatchGetDocumentsResponse)}, + { 80, -1, sizeof(::google::firestore::v1::BeginTransactionRequest)}, + { 87, -1, sizeof(::google::firestore::v1::BeginTransactionResponse)}, + { 93, -1, sizeof(::google::firestore::v1::CommitRequest)}, + { 101, -1, sizeof(::google::firestore::v1::CommitResponse)}, + { 108, -1, sizeof(::google::firestore::v1::RollbackRequest)}, + { 115, -1, sizeof(::google::firestore::v1::RunQueryRequest)}, + { 127, -1, sizeof(::google::firestore::v1::RunQueryResponse)}, + { 136, 143, sizeof(::google::firestore::v1::WriteRequest_LabelsEntry_DoNotUse)}, + { 145, -1, sizeof(::google::firestore::v1::WriteRequest)}, + { 155, -1, sizeof(::google::firestore::v1::WriteResponse)}, + { 164, 171, sizeof(::google::firestore::v1::ListenRequest_LabelsEntry_DoNotUse)}, + { 173, -1, sizeof(::google::firestore::v1::ListenRequest)}, + { 183, -1, sizeof(::google::firestore::v1::ListenResponse)}, + { 194, -1, sizeof(::google::firestore::v1::Target_DocumentsTarget)}, + { 200, -1, sizeof(::google::firestore::v1::Target_QueryTarget)}, + { 208, -1, sizeof(::google::firestore::v1::Target)}, + { 221, -1, sizeof(::google::firestore::v1::TargetChange)}, + { 231, -1, sizeof(::google::firestore::v1::ListCollectionIdsRequest)}, + { 239, -1, sizeof(::google::firestore::v1::ListCollectionIdsResponse)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::firestore::v1beta1::_GetDocumentRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListDocumentsResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_BeginTransactionResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_CommitRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_CommitResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_RollbackRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_RunQueryRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_RunQueryResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_WriteRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_WriteResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListenRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListenResponse_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Target_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_TargetChange_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListCollectionIdsRequest_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ListCollectionIdsResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_GetDocumentRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListDocumentsRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListDocumentsResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_CreateDocumentRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_UpdateDocumentRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DeleteDocumentRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_BeginTransactionRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_BeginTransactionResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_CommitRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_CommitResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_RollbackRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_RunQueryRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_RunQueryResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_WriteRequest_LabelsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_WriteRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_WriteResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListenRequest_LabelsEntry_DoNotUse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListenRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListenResponse_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Target_QueryTarget_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Target_default_instance_), + reinterpret_cast(&::google::firestore::v1::_TargetChange_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListCollectionIdsRequest_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ListCollectionIdsResponse_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/firestore/v1beta1/firestore.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/firestore/v1/firestore.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, file_level_enum_descriptors, NULL); } @@ -1142,204 +1142,194 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n(google/firestore/v1beta1/firestore.pro" - "to\022\030google.firestore.v1beta1\032\034google/api" - "/annotations.proto\032%google/firestore/v1b" - "eta1/common.proto\032\'google/firestore/v1be" - "ta1/document.proto\032$google/firestore/v1b" - "eta1/query.proto\032$google/firestore/v1bet" - "a1/write.proto\032\033google/protobuf/empty.pr" - "oto\032\037google/protobuf/timestamp.proto\032\027go" - "ogle/rpc/status.proto\"\270\001\n\022GetDocumentReq" - "uest\022\014\n\004name\030\001 \001(\t\0224\n\004mask\030\002 \001(\0132&.googl" - "e.firestore.v1beta1.DocumentMask\022\025\n\013tran" - "saction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132\032.goo" - "gle.protobuf.TimestampH\000B\026\n\024consistency_" - "selector\"\242\002\n\024ListDocumentsRequest\022\016\n\006par" - "ent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n\tpage" - "_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010order" - "_by\030\006 \001(\t\0224\n\004mask\030\007 \001(\0132&.google.firesto" - "re.v1beta1.DocumentMask\022\025\n\013transaction\030\010" + "\n#google/firestore/v1/firestore.proto\022\023g" + "oogle.firestore.v1\032\034google/api/annotatio" + "ns.proto\032 google/firestore/v1/common.pro" + "to\032\"google/firestore/v1/document.proto\032\037" + "google/firestore/v1/query.proto\032\037google/" + "firestore/v1/write.proto\032\033google/protobu" + "f/empty.proto\032\037google/protobuf/timestamp" + ".proto\032\027google/rpc/status.proto\"\263\001\n\022GetD" + "ocumentRequest\022\014\n\004name\030\001 \001(\t\022/\n\004mask\030\002 \001" + "(\0132!.google.firestore.v1.DocumentMask\022\025\n" + "\013transaction\030\003 \001(\014H\000\022/\n\tread_time\030\005 \001(\0132" + "\032.google.protobuf.TimestampH\000B\026\n\024consist" + "ency_selector\"\235\002\n\024ListDocumentsRequest\022\016" + "\n\006parent\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\021\n" + "\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\020\n\010" + "order_by\030\006 \001(\t\022/\n\004mask\030\007 \001(\0132!.google.fi" + "restore.v1.DocumentMask\022\025\n\013transaction\030\010" " \001(\014H\000\022/\n\tread_time\030\n \001(\0132\032.google.proto" "buf.TimestampH\000\022\024\n\014show_missing\030\014 \001(\010B\026\n" - "\024consistency_selector\"g\n\025ListDocumentsRe" - "sponse\0225\n\tdocuments\030\001 \003(\0132\".google.fires" - "tore.v1beta1.Document\022\027\n\017next_page_token" - "\030\002 \001(\t\"\277\001\n\025CreateDocumentRequest\022\016\n\006pare" - "nt\030\001 \001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013docum" - "ent_id\030\003 \001(\t\0224\n\010document\030\004 \001(\0132\".google." - "firestore.v1beta1.Document\0224\n\004mask\030\005 \001(\013" - "2&.google.firestore.v1beta1.DocumentMask" - "\"\202\002\n\025UpdateDocumentRequest\0224\n\010document\030\001" - " \001(\0132\".google.firestore.v1beta1.Document" - "\022;\n\013update_mask\030\002 \001(\0132&.google.firestore" - ".v1beta1.DocumentMask\0224\n\004mask\030\003 \001(\0132&.go" - "ogle.firestore.v1beta1.DocumentMask\022@\n\020c" - "urrent_document\030\004 \001(\0132&.google.firestore" - ".v1beta1.Precondition\"g\n\025DeleteDocumentR" - "equest\022\014\n\004name\030\001 \001(\t\022@\n\020current_document" - "\030\002 \001(\0132&.google.firestore.v1beta1.Precon" - "dition\"\236\002\n\030BatchGetDocumentsRequest\022\020\n\010d" - "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\0224\n\004mask" - "\030\003 \001(\0132&.google.firestore.v1beta1.Docume" - "ntMask\022\025\n\013transaction\030\004 \001(\014H\000\022G\n\017new_tra" - "nsaction\030\005 \001(\0132,.google.firestore.v1beta" - "1.TransactionOptionsH\000\022/\n\tread_time\030\007 \001(" - "\0132\032.google.protobuf.TimestampH\000B\026\n\024consi" - "stency_selector\"\261\001\n\031BatchGetDocumentsRes" - "ponse\0223\n\005found\030\001 \001(\0132\".google.firestore." - "v1beta1.DocumentH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n" - "\013transaction\030\003 \001(\014\022-\n\tread_time\030\004 \001(\0132\032." - "google.protobuf.TimestampB\010\n\006result\"j\n\027B" - "eginTransactionRequest\022\020\n\010database\030\001 \001(\t" - "\022=\n\007options\030\002 \001(\0132,.google.firestore.v1b" - "eta1.TransactionOptions\"/\n\030BeginTransact" - "ionResponse\022\023\n\013transaction\030\001 \001(\014\"g\n\rComm" - "itRequest\022\020\n\010database\030\001 \001(\t\022/\n\006writes\030\002 " - "\003(\0132\037.google.firestore.v1beta1.Write\022\023\n\013" - "transaction\030\003 \001(\014\"\177\n\016CommitResponse\022<\n\rw" - "rite_results\030\001 \003(\0132%.google.firestore.v1" - "beta1.WriteResult\022/\n\013commit_time\030\002 \001(\0132\032" - ".google.protobuf.Timestamp\"8\n\017RollbackRe" - "quest\022\020\n\010database\030\001 \001(\t\022\023\n\013transaction\030\002" - " \001(\014\"\237\002\n\017RunQueryRequest\022\016\n\006parent\030\001 \001(\t" - "\022E\n\020structured_query\030\002 \001(\0132).google.fire" - "store.v1beta1.StructuredQueryH\000\022\025\n\013trans" - "action\030\005 \001(\014H\001\022G\n\017new_transaction\030\006 \001(\0132" - ",.google.firestore.v1beta1.TransactionOp" + "\024consistency_selector\"b\n\025ListDocumentsRe" + "sponse\0220\n\tdocuments\030\001 \003(\0132\035.google.fires" + "tore.v1.Document\022\027\n\017next_page_token\030\002 \001(" + "\t\"\265\001\n\025CreateDocumentRequest\022\016\n\006parent\030\001 " + "\001(\t\022\025\n\rcollection_id\030\002 \001(\t\022\023\n\013document_i" + "d\030\003 \001(\t\022/\n\010document\030\004 \001(\0132\035.google.fires" + "tore.v1.Document\022/\n\004mask\030\005 \001(\0132!.google." + "firestore.v1.DocumentMask\"\356\001\n\025UpdateDocu" + "mentRequest\022/\n\010document\030\001 \001(\0132\035.google.f" + "irestore.v1.Document\0226\n\013update_mask\030\002 \001(" + "\0132!.google.firestore.v1.DocumentMask\022/\n\004" + "mask\030\003 \001(\0132!.google.firestore.v1.Documen" + "tMask\022;\n\020current_document\030\004 \001(\0132!.google" + ".firestore.v1.Precondition\"b\n\025DeleteDocu" + "mentRequest\022\014\n\004name\030\001 \001(\t\022;\n\020current_doc" + "ument\030\002 \001(\0132!.google.firestore.v1.Precon" + "dition\"\224\002\n\030BatchGetDocumentsRequest\022\020\n\010d" + "atabase\030\001 \001(\t\022\021\n\tdocuments\030\002 \003(\t\022/\n\004mask" + "\030\003 \001(\0132!.google.firestore.v1.DocumentMas" + "k\022\025\n\013transaction\030\004 \001(\014H\000\022B\n\017new_transact" + "ion\030\005 \001(\0132\'.google.firestore.v1.Transact" + "ionOptionsH\000\022/\n\tread_time\030\007 \001(\0132\032.google" + ".protobuf.TimestampH\000B\026\n\024consistency_sel" + "ector\"\254\001\n\031BatchGetDocumentsResponse\022.\n\005f" + "ound\030\001 \001(\0132\035.google.firestore.v1.Documen" + "tH\000\022\021\n\007missing\030\002 \001(\tH\000\022\023\n\013transaction\030\003 " + "\001(\014\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf" + ".TimestampB\010\n\006result\"e\n\027BeginTransaction" + "Request\022\020\n\010database\030\001 \001(\t\0228\n\007options\030\002 \001" + "(\0132\'.google.firestore.v1.TransactionOpti" + "ons\"/\n\030BeginTransactionResponse\022\023\n\013trans" + "action\030\001 \001(\014\"b\n\rCommitRequest\022\020\n\010databas" + "e\030\001 \001(\t\022*\n\006writes\030\002 \003(\0132\032.google.firesto" + "re.v1.Write\022\023\n\013transaction\030\003 \001(\014\"z\n\016Comm" + "itResponse\0227\n\rwrite_results\030\001 \003(\0132 .goog" + "le.firestore.v1.WriteResult\022/\n\013commit_ti" + "me\030\002 \001(\0132\032.google.protobuf.Timestamp\"8\n\017" + "RollbackRequest\022\020\n\010database\030\001 \001(\t\022\023\n\013tra" + "nsaction\030\002 \001(\014\"\225\002\n\017RunQueryRequest\022\016\n\006pa" + "rent\030\001 \001(\t\022@\n\020structured_query\030\002 \001(\0132$.g" + "oogle.firestore.v1.StructuredQueryH\000\022\025\n\013" + "transaction\030\005 \001(\014H\001\022B\n\017new_transaction\030\006" + " \001(\0132\'.google.firestore.v1.TransactionOp" "tionsH\001\022/\n\tread_time\030\007 \001(\0132\032.google.prot" "obuf.TimestampH\001B\014\n\nquery_typeB\026\n\024consis" - "tency_selector\"\245\001\n\020RunQueryResponse\022\023\n\013t" - "ransaction\030\002 \001(\014\0224\n\010document\030\001 \001(\0132\".goo" - "gle.firestore.v1beta1.Document\022-\n\tread_t" - "ime\030\003 \001(\0132\032.google.protobuf.Timestamp\022\027\n" - "\017skipped_results\030\004 \001(\005\"\355\001\n\014WriteRequest\022" - "\020\n\010database\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022/\n\006" - "writes\030\003 \003(\0132\037.google.firestore.v1beta1." - "Write\022\024\n\014stream_token\030\004 \001(\014\022B\n\006labels\030\005 " - "\003(\01322.google.firestore.v1beta1.WriteRequ" - "est.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 " - "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\247\001\n\rWriteResponse" - "\022\021\n\tstream_id\030\001 \001(\t\022\024\n\014stream_token\030\002 \001(" - "\014\022<\n\rwrite_results\030\003 \003(\0132%.google.firest" - "ore.v1beta1.WriteResult\022/\n\013commit_time\030\004" - " \001(\0132\032.google.protobuf.Timestamp\"\367\001\n\rLis" - "tenRequest\022\020\n\010database\030\001 \001(\t\0226\n\nadd_targ" - "et\030\002 \001(\0132 .google.firestore.v1beta1.Targ" - "etH\000\022\027\n\rremove_target\030\003 \001(\005H\000\022C\n\006labels\030" - "\004 \003(\01323.google.firestore.v1beta1.ListenR" - "equest.LabelsEntry\032-\n\013LabelsEntry\022\013\n\003key" - "\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rtarget_chan" - "ge\"\356\002\n\016ListenResponse\022\?\n\rtarget_change\030\002" - " \001(\0132&.google.firestore.v1beta1.TargetCh" - "angeH\000\022C\n\017document_change\030\003 \001(\0132(.google" - ".firestore.v1beta1.DocumentChangeH\000\022C\n\017d" - "ocument_delete\030\004 \001(\0132(.google.firestore." - "v1beta1.DocumentDeleteH\000\022C\n\017document_rem" - "ove\030\006 \001(\0132(.google.firestore.v1beta1.Doc" - "umentRemoveH\000\022;\n\006filter\030\005 \001(\0132).google.f" - "irestore.v1beta1.ExistenceFilterH\000B\017\n\rre" - "sponse_type\"\260\003\n\006Target\022=\n\005query\030\002 \001(\0132,." - "google.firestore.v1beta1.Target.QueryTar" - "getH\000\022E\n\tdocuments\030\003 \001(\01320.google.firest" - "ore.v1beta1.Target.DocumentsTargetH\000\022\026\n\014" - "resume_token\030\004 \001(\014H\001\022/\n\tread_time\030\013 \001(\0132" - "\032.google.protobuf.TimestampH\001\022\021\n\ttarget_" - "id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n\017DocumentsTarge" - "t\022\021\n\tdocuments\030\002 \003(\t\032r\n\013QueryTarget\022\016\n\006p" - "arent\030\001 \001(\t\022E\n\020structured_query\030\002 \001(\0132)." - "google.firestore.v1beta1.StructuredQuery" - "H\000B\014\n\nquery_typeB\r\n\013target_typeB\r\n\013resum" - "e_type\"\257\002\n\014TargetChange\022S\n\022target_change" - "_type\030\001 \001(\01627.google.firestore.v1beta1.T" - "argetChange.TargetChangeType\022\022\n\ntarget_i" - "ds\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rpc.Sta" - "tus\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_time\030\006" - " \001(\0132\032.google.protobuf.Timestamp\"N\n\020Targ" - "etChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020\001\022\n\n\006" - "REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n\030List" - "CollectionIdsRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\t" - "page_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"L\n\031L" - "istCollectionIdsResponse\022\026\n\016collection_i" - "ds\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\310\023\n\tFi" - "restore\022\236\001\n\013GetDocument\022,.google.firesto" - "re.v1beta1.GetDocumentRequest\032\".google.f" - "irestore.v1beta1.Document\"=\202\323\344\223\0027\0225/v1be" - "ta1/{name=projects/*/databases/*/documen" - "ts/*/**}\022\301\001\n\rListDocuments\022..google.fire" - "store.v1beta1.ListDocumentsRequest\032/.goo" - "gle.firestore.v1beta1.ListDocumentsRespo" - "nse\"O\202\323\344\223\002I\022G/v1beta1/{parent=projects/*" - "/databases/*/documents/*/**}/{collection" - "_id}\022\276\001\n\016CreateDocument\022/.google.firesto" - "re.v1beta1.CreateDocumentRequest\032\".googl" - "e.firestore.v1beta1.Document\"W\202\323\344\223\002Q\"E/v" - "1beta1/{parent=projects/*/databases/*/do" - "cuments/**}/{collection_id}:\010document\022\267\001" - "\n\016UpdateDocument\022/.google.firestore.v1be" - "ta1.UpdateDocumentRequest\032\".google.fires" - "tore.v1beta1.Document\"P\202\323\344\223\002J2>/v1beta1/" - "{document.name=projects/*/databases/*/do" - "cuments/*/**}:\010document\022\230\001\n\016DeleteDocume" - "nt\022/.google.firestore.v1beta1.DeleteDocu" - "mentRequest\032\026.google.protobuf.Empty\"=\202\323\344" - "\223\0027*5/v1beta1/{name=projects/*/databases" - "/*/documents/*/**}\022\310\001\n\021BatchGetDocuments" - "\0222.google.firestore.v1beta1.BatchGetDocu" - "mentsRequest\0323.google.firestore.v1beta1." - "BatchGetDocumentsResponse\"H\202\323\344\223\002B\"=/v1be" - "ta1/{database=projects/*/databases/*}/do" - "cuments:batchGet:\001*0\001\022\313\001\n\020BeginTransacti" - "on\0221.google.firestore.v1beta1.BeginTrans" - "actionRequest\0322.google.firestore.v1beta1" - ".BeginTransactionResponse\"P\202\323\344\223\002J\"E/v1be" - "ta1/{database=projects/*/databases/*}/do" - "cuments:beginTransaction:\001*\022\243\001\n\006Commit\022\'" - ".google.firestore.v1beta1.CommitRequest\032" - "(.google.firestore.v1beta1.CommitRespons" - "e\"F\202\323\344\223\002@\";/v1beta1/{database=projects/*" - "/databases/*}/documents:commit:\001*\022\227\001\n\010Ro" - "llback\022).google.firestore.v1beta1.Rollba" - "ckRequest\032\026.google.protobuf.Empty\"H\202\323\344\223\002" - "B\"=/v1beta1/{database=projects/*/databas" - "es/*}/documents:rollback:\001*\022\364\001\n\010RunQuery" - "\022).google.firestore.v1beta1.RunQueryRequ" - "est\032*.google.firestore.v1beta1.RunQueryR" - "esponse\"\216\001\202\323\344\223\002\207\001\";/v1beta1/{parent=proj" - "ects/*/databases/*/documents}:runQuery:\001" - "*ZE\"@/v1beta1/{parent=projects/*/databas" - "es/*/documents/*/**}:runQuery:\001*0\001\022\243\001\n\005W" - "rite\022&.google.firestore.v1beta1.WriteReq" - "uest\032\'.google.firestore.v1beta1.WriteRes" - "ponse\"E\202\323\344\223\002\?\":/v1beta1/{database=projec" - "ts/*/databases/*}/documents:write:\001*(\0010\001" - "\022\247\001\n\006Listen\022\'.google.firestore.v1beta1.L" - "istenRequest\032(.google.firestore.v1beta1." - "ListenResponse\"F\202\323\344\223\002@\";/v1beta1/{databa" - "se=projects/*/databases/*}/documents:lis" - "ten:\001*(\0010\001\022\237\002\n\021ListCollectionIds\0222.googl" - "e.firestore.v1beta1.ListCollectionIdsReq" - "uest\0323.google.firestore.v1beta1.ListColl" - "ectionIdsResponse\"\240\001\202\323\344\223\002\231\001\"D/v1beta1/{p" - "arent=projects/*/databases/*/documents}:" - "listCollectionIds:\001*ZN\"I/v1beta1/{parent" + "tency_selector\"\240\001\n\020RunQueryResponse\022\023\n\013t" + "ransaction\030\002 \001(\014\022/\n\010document\030\001 \001(\0132\035.goo" + "gle.firestore.v1.Document\022-\n\tread_time\030\003" + " \001(\0132\032.google.protobuf.Timestamp\022\027\n\017skip" + "ped_results\030\004 \001(\005\"\343\001\n\014WriteRequest\022\020\n\010da" + "tabase\030\001 \001(\t\022\021\n\tstream_id\030\002 \001(\t\022*\n\006write" + "s\030\003 \003(\0132\032.google.firestore.v1.Write\022\024\n\014s" + "tream_token\030\004 \001(\014\022=\n\006labels\030\005 \003(\0132-.goog" + "le.firestore.v1.WriteRequest.LabelsEntry" + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " + "\001(\t:\0028\001\"\242\001\n\rWriteResponse\022\021\n\tstream_id\030\001" + " \001(\t\022\024\n\014stream_token\030\002 \001(\014\0227\n\rwrite_resu" + "lts\030\003 \003(\0132 .google.firestore.v1.WriteRes" + "ult\022/\n\013commit_time\030\004 \001(\0132\032.google.protob" + "uf.Timestamp\"\355\001\n\rListenRequest\022\020\n\010databa" + "se\030\001 \001(\t\0221\n\nadd_target\030\002 \001(\0132\033.google.fi" + "restore.v1.TargetH\000\022\027\n\rremove_target\030\003 \001" + "(\005H\000\022>\n\006labels\030\004 \003(\0132..google.firestore." + "v1.ListenRequest.LabelsEntry\032-\n\013LabelsEn" + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\017\n\rt" + "arget_change\"\325\002\n\016ListenResponse\022:\n\rtarge" + "t_change\030\002 \001(\0132!.google.firestore.v1.Tar" + "getChangeH\000\022>\n\017document_change\030\003 \001(\0132#.g" + "oogle.firestore.v1.DocumentChangeH\000\022>\n\017d" + "ocument_delete\030\004 \001(\0132#.google.firestore." + "v1.DocumentDeleteH\000\022>\n\017document_remove\030\006" + " \001(\0132#.google.firestore.v1.DocumentRemov" + "eH\000\0226\n\006filter\030\005 \001(\0132$.google.firestore.v" + "1.ExistenceFilterH\000B\017\n\rresponse_type\"\241\003\n" + "\006Target\0228\n\005query\030\002 \001(\0132\'.google.firestor" + "e.v1.Target.QueryTargetH\000\022@\n\tdocuments\030\003" + " \001(\0132+.google.firestore.v1.Target.Docume" + "ntsTargetH\000\022\026\n\014resume_token\030\004 \001(\014H\001\022/\n\tr" + "ead_time\030\013 \001(\0132\032.google.protobuf.Timesta" + "mpH\001\022\021\n\ttarget_id\030\005 \001(\005\022\014\n\004once\030\006 \001(\010\032$\n" + "\017DocumentsTarget\022\021\n\tdocuments\030\002 \003(\t\032m\n\013Q" + "ueryTarget\022\016\n\006parent\030\001 \001(\t\022@\n\020structured" + "_query\030\002 \001(\0132$.google.firestore.v1.Struc" + "turedQueryH\000B\014\n\nquery_typeB\r\n\013target_typ" + "eB\r\n\013resume_type\"\252\002\n\014TargetChange\022N\n\022tar" + "get_change_type\030\001 \001(\01622.google.firestore" + ".v1.TargetChange.TargetChangeType\022\022\n\ntar" + "get_ids\030\002 \003(\005\022!\n\005cause\030\003 \001(\0132\022.google.rp" + "c.Status\022\024\n\014resume_token\030\004 \001(\014\022-\n\tread_t" + "ime\030\006 \001(\0132\032.google.protobuf.Timestamp\"N\n" + "\020TargetChangeType\022\r\n\tNO_CHANGE\020\000\022\007\n\003ADD\020" + "\001\022\n\n\006REMOVE\020\002\022\013\n\007CURRENT\020\003\022\t\n\005RESET\020\004\"Q\n" + "\030ListCollectionIdsRequest\022\016\n\006parent\030\001 \001(" + "\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t" + "\"L\n\031ListCollectionIdsResponse\022\026\n\016collect" + "ion_ids\030\001 \003(\t\022\027\n\017next_page_token\030\002 \001(\t2\204" + "\022\n\tFirestore\022\217\001\n\013GetDocument\022\'.google.fi" + "restore.v1.GetDocumentRequest\032\035.google.f" + "irestore.v1.Document\"8\202\323\344\223\0022\0220/v1/{name=" + "projects/*/databases/*/documents/*/**}\022\262" + "\001\n\rListDocuments\022).google.firestore.v1.L" + "istDocumentsRequest\032*.google.firestore.v" + "1.ListDocumentsResponse\"J\202\323\344\223\002D\022B/v1/{pa" + "rent=projects/*/databases/*/documents/*/" + "**}/{collection_id}\022\257\001\n\016CreateDocument\022*" + ".google.firestore.v1.CreateDocumentReque" + "st\032\035.google.firestore.v1.Document\"R\202\323\344\223\002" + "L\"@/v1/{parent=projects/*/databases/*/do" + "cuments/**}/{collection_id}:\010document\022\250\001" + "\n\016UpdateDocument\022*.google.firestore.v1.U" + "pdateDocumentRequest\032\035.google.firestore." + "v1.Document\"K\202\323\344\223\002E29/v1/{document.name=" + "projects/*/databases/*/documents/*/**}:\010" + "document\022\216\001\n\016DeleteDocument\022*.google.fir" + "estore.v1.DeleteDocumentRequest\032\026.google" + ".protobuf.Empty\"8\202\323\344\223\0022*0/v1/{name=proje" + "cts/*/databases/*/documents/*/**}\022\271\001\n\021Ba" + "tchGetDocuments\022-.google.firestore.v1.Ba" + "tchGetDocumentsRequest\032..google.firestor" + "e.v1.BatchGetDocumentsResponse\"C\202\323\344\223\002=\"8" + "/v1/{database=projects/*/databases/*}/do" + "cuments:batchGet:\001*0\001\022\274\001\n\020BeginTransacti" + "on\022,.google.firestore.v1.BeginTransactio" + "nRequest\032-.google.firestore.v1.BeginTran" + "sactionResponse\"K\202\323\344\223\002E\"@/v1/{database=p" + "rojects/*/databases/*}/documents:beginTr" + "ansaction:\001*\022\224\001\n\006Commit\022\".google.firesto" + "re.v1.CommitRequest\032#.google.firestore.v" + "1.CommitResponse\"A\202\323\344\223\002;\"6/v1/{database=" + "projects/*/databases/*}/documents:commit" + ":\001*\022\215\001\n\010Rollback\022$.google.firestore.v1.R" + "ollbackRequest\032\026.google.protobuf.Empty\"C" + "\202\323\344\223\002=\"8/v1/{database=projects/*/databas" + "es/*}/documents:rollback:\001*\022\337\001\n\010RunQuery" + "\022$.google.firestore.v1.RunQueryRequest\032%" + ".google.firestore.v1.RunQueryResponse\"\203\001" + "\202\323\344\223\002}\"6/v1/{parent=projects/*/databases" + "/*/documents}:runQuery:\001*Z@\";/v1/{parent" "=projects/*/databases/*/documents/*/**}:" - "listCollectionIds:\001*B\274\001\n\034com.google.fire" - "store.v1beta1B\016FirestoreProtoP\001ZAgoogle." - "golang.org/genproto/googleapis/firestore" - "/v1beta1;firestore\242\002\004GCFS\252\002\036Google.Cloud" - ".Firestore.V1Beta1\312\002\036Google\\Cloud\\Firest" - "ore\\V1beta1b\006proto3" + "runQuery:\001*0\001\022\224\001\n\005Write\022!.google.firesto" + "re.v1.WriteRequest\032\".google.firestore.v1" + ".WriteResponse\"@\202\323\344\223\002:\"5/v1/{database=pr" + "ojects/*/databases/*}/documents:write:\001*" + "(\0010\001\022\230\001\n\006Listen\022\".google.firestore.v1.Li" + "stenRequest\032#.google.firestore.v1.Listen" + "Response\"A\202\323\344\223\002;\"6/v1/{database=projects" + "/*/databases/*}/documents:listen:\001*(\0010\001\022" + "\213\002\n\021ListCollectionIds\022-.google.firestore" + ".v1.ListCollectionIdsRequest\032..google.fi" + "restore.v1.ListCollectionIdsResponse\"\226\001\202" + "\323\344\223\002\217\001\"\?/v1/{parent=projects/*/databases" + "/*/documents}:listCollectionIds:\001*ZI\"D/v" + "1/{parent=projects/*/databases/*/documen" + "ts/*/**}:listCollectionIds:\001*B\262\001\n\027com.go" + "ogle.firestore.v1B\016FirestoreProtoP\001Zmask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault( + ::google::firestore::v1::_GetDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_GetDocumentRequest_default_instance_.transaction_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_GetDocumentRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void GetDocumentRequest::clear_mask() { @@ -1416,7 +1406,7 @@ void GetDocumentRequest::set_allocated_read_time(::google::protobuf::Timestamp* set_has_read_time(); consistency_selector_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.read_time) } void GetDocumentRequest::clear_read_time() { if (has_read_time()) { @@ -1434,10 +1424,10 @@ const int GetDocumentRequest::kReadTimeFieldNumber; GetDocumentRequest::GetDocumentRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.GetDocumentRequest) } GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from) : ::google::protobuf::Message(), @@ -1449,7 +1439,7 @@ GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from) name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_mask()) { - mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_); + mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_); } else { mask_ = NULL; } @@ -1467,7 +1457,7 @@ GetDocumentRequest::GetDocumentRequest(const GetDocumentRequest& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.GetDocumentRequest) } void GetDocumentRequest::SharedCtor() { @@ -1478,7 +1468,7 @@ void GetDocumentRequest::SharedCtor() { } GetDocumentRequest::~GetDocumentRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.GetDocumentRequest) SharedDtor(); } @@ -1496,12 +1486,12 @@ void GetDocumentRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* GetDocumentRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const GetDocumentRequest& GetDocumentRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsGetDocumentRequest(); return *internal_default_instance(); } @@ -1514,7 +1504,7 @@ GetDocumentRequest* GetDocumentRequest::New(::google::protobuf::Arena* arena) co } void GetDocumentRequest::clear_consistency_selector() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.GetDocumentRequest) switch (consistency_selector_case()) { case kTransaction: { consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1533,7 +1523,7 @@ void GetDocumentRequest::clear_consistency_selector() { void GetDocumentRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.GetDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1551,7 +1541,7 @@ bool GetDocumentRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.GetDocumentRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1566,14 +1556,14 @@ bool GetDocumentRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.GetDocumentRequest.name")); + "google.firestore.v1.GetDocumentRequest.name")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.DocumentMask mask = 2; + // .google.firestore.v1.DocumentMask mask = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1621,17 +1611,17 @@ bool GetDocumentRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.GetDocumentRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.GetDocumentRequest) return false; #undef DO_ } void GetDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.GetDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1640,12 +1630,12 @@ void GetDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.GetDocumentRequest.name"); + "google.firestore.v1.GetDocumentRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } - // .google.firestore.v1beta1.DocumentMask mask = 2; + // .google.firestore.v1.DocumentMask mask = 2; if (this->has_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->mask_, output); @@ -1667,13 +1657,13 @@ void GetDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.GetDocumentRequest) } ::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.GetDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1682,13 +1672,13 @@ ::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesT ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.GetDocumentRequest.name"); + "google.firestore.v1.GetDocumentRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } - // .google.firestore.v1beta1.DocumentMask mask = 2; + // .google.firestore.v1.DocumentMask mask = 2; if (this->has_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1713,12 +1703,12 @@ ::google::protobuf::uint8* GetDocumentRequest::InternalSerializeWithCachedSizesT target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.GetDocumentRequest) return target; } size_t GetDocumentRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.GetDocumentRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1733,7 +1723,7 @@ size_t GetDocumentRequest::ByteSizeLong() const { this->name()); } - // .google.firestore.v1beta1.DocumentMask mask = 2; + // .google.firestore.v1.DocumentMask mask = 2; if (this->has_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1767,22 +1757,22 @@ size_t GetDocumentRequest::ByteSizeLong() const { } void GetDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.GetDocumentRequest) GOOGLE_DCHECK_NE(&from, this); const GetDocumentRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.GetDocumentRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.GetDocumentRequest) MergeFrom(*source); } } void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.GetDocumentRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1793,7 +1783,7 @@ void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_mask()) { - mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask()); + mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask()); } switch (from.consistency_selector_case()) { case kTransaction: { @@ -1811,14 +1801,14 @@ void GetDocumentRequest::MergeFrom(const GetDocumentRequest& from) { } void GetDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.GetDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); } void GetDocumentRequest::CopyFrom(const GetDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.GetDocumentRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.GetDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -1843,19 +1833,19 @@ void GetDocumentRequest::InternalSwap(GetDocumentRequest* other) { } ::google::protobuf::Metadata GetDocumentRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListDocumentsRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault( + ::google::firestore::v1::_ListDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_ListDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_ListDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void ListDocumentsRequest::clear_mask() { @@ -1877,7 +1867,7 @@ void ListDocumentsRequest::set_allocated_read_time(::google::protobuf::Timestamp set_has_read_time(); consistency_selector_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.read_time) } void ListDocumentsRequest::clear_read_time() { if (has_read_time()) { @@ -1900,10 +1890,10 @@ const int ListDocumentsRequest::kShowMissingFieldNumber; ListDocumentsRequest::ListDocumentsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsRequest) } ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from) : ::google::protobuf::Message(), @@ -1927,7 +1917,7 @@ ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from) order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_); } if (from.has_mask()) { - mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_); + mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_); } else { mask_ = NULL; } @@ -1948,7 +1938,7 @@ ListDocumentsRequest::ListDocumentsRequest(const ListDocumentsRequest& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsRequest) } void ListDocumentsRequest::SharedCtor() { @@ -1964,7 +1954,7 @@ void ListDocumentsRequest::SharedCtor() { } ListDocumentsRequest::~ListDocumentsRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsRequest) SharedDtor(); } @@ -1985,12 +1975,12 @@ void ListDocumentsRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListDocumentsRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListDocumentsRequest& ListDocumentsRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsRequest(); return *internal_default_instance(); } @@ -2003,7 +1993,7 @@ ListDocumentsRequest* ListDocumentsRequest::New(::google::protobuf::Arena* arena } void ListDocumentsRequest::clear_consistency_selector() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListDocumentsRequest) switch (consistency_selector_case()) { case kTransaction: { consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -2022,7 +2012,7 @@ void ListDocumentsRequest::clear_consistency_selector() { void ListDocumentsRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2046,7 +2036,7 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -2061,7 +2051,7 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListDocumentsRequest.parent")); + "google.firestore.v1.ListDocumentsRequest.parent")); } else { goto handle_unusual; } @@ -2077,7 +2067,7 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListDocumentsRequest.collection_id")); + "google.firestore.v1.ListDocumentsRequest.collection_id")); } else { goto handle_unusual; } @@ -2107,7 +2097,7 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListDocumentsRequest.page_token")); + "google.firestore.v1.ListDocumentsRequest.page_token")); } else { goto handle_unusual; } @@ -2123,14 +2113,14 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->order_by().data(), static_cast(this->order_by().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListDocumentsRequest.order_by")); + "google.firestore.v1.ListDocumentsRequest.order_by")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.DocumentMask mask = 7; + // .google.firestore.v1.DocumentMask mask = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -2192,17 +2182,17 @@ bool ListDocumentsRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsRequest) return false; #undef DO_ } void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2211,7 +2201,7 @@ void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.parent"); + "google.firestore.v1.ListDocumentsRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->parent(), output); } @@ -2221,7 +2211,7 @@ void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.collection_id"); + "google.firestore.v1.ListDocumentsRequest.collection_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->collection_id(), output); } @@ -2236,7 +2226,7 @@ void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.page_token"); + "google.firestore.v1.ListDocumentsRequest.page_token"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 4, this->page_token(), output); } @@ -2246,12 +2236,12 @@ void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->order_by().data(), static_cast(this->order_by().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.order_by"); + "google.firestore.v1.ListDocumentsRequest.order_by"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 6, this->order_by(), output); } - // .google.firestore.v1beta1.DocumentMask mask = 7; + // .google.firestore.v1.DocumentMask mask = 7; if (this->has_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, *this->mask_, output); @@ -2278,13 +2268,13 @@ void ListDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsRequest) } ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2293,7 +2283,7 @@ ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSize ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.parent"); + "google.firestore.v1.ListDocumentsRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->parent(), target); @@ -2304,7 +2294,7 @@ ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSize ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.collection_id"); + "google.firestore.v1.ListDocumentsRequest.collection_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->collection_id(), target); @@ -2320,7 +2310,7 @@ ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSize ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.page_token"); + "google.firestore.v1.ListDocumentsRequest.page_token"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 4, this->page_token(), target); @@ -2331,13 +2321,13 @@ ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSize ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->order_by().data(), static_cast(this->order_by().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsRequest.order_by"); + "google.firestore.v1.ListDocumentsRequest.order_by"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 6, this->order_by(), target); } - // .google.firestore.v1beta1.DocumentMask mask = 7; + // .google.firestore.v1.DocumentMask mask = 7; if (this->has_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -2367,12 +2357,12 @@ ::google::protobuf::uint8* ListDocumentsRequest::InternalSerializeWithCachedSize target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsRequest) return target; } size_t ListDocumentsRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2408,7 +2398,7 @@ size_t ListDocumentsRequest::ByteSizeLong() const { this->order_by()); } - // .google.firestore.v1beta1.DocumentMask mask = 7; + // .google.firestore.v1.DocumentMask mask = 7; if (this->has_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -2454,22 +2444,22 @@ size_t ListDocumentsRequest::ByteSizeLong() const { } void ListDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsRequest) GOOGLE_DCHECK_NE(&from, this); const ListDocumentsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsRequest) MergeFrom(*source); } } void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2492,7 +2482,7 @@ void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) { order_by_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.order_by_); } if (from.has_mask()) { - mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask()); + mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask()); } if (from.page_size() != 0) { set_page_size(from.page_size()); @@ -2516,14 +2506,14 @@ void ListDocumentsRequest::MergeFrom(const ListDocumentsRequest& from) { } void ListDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListDocumentsRequest::CopyFrom(const ListDocumentsRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -2553,8 +2543,8 @@ void ListDocumentsRequest::InternalSwap(ListDocumentsRequest* other) { } ::google::protobuf::Metadata ListDocumentsRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -2573,10 +2563,10 @@ const int ListDocumentsResponse::kNextPageTokenFieldNumber; ListDocumentsResponse::ListDocumentsResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListDocumentsResponse) } ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from) : ::google::protobuf::Message(), @@ -2588,7 +2578,7 @@ ListDocumentsResponse::ListDocumentsResponse(const ListDocumentsResponse& from) if (from.next_page_token().size() > 0) { next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListDocumentsResponse) } void ListDocumentsResponse::SharedCtor() { @@ -2597,7 +2587,7 @@ void ListDocumentsResponse::SharedCtor() { } ListDocumentsResponse::~ListDocumentsResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListDocumentsResponse) SharedDtor(); } @@ -2611,12 +2601,12 @@ void ListDocumentsResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListDocumentsResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListDocumentsResponse& ListDocumentsResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsResponse(); return *internal_default_instance(); } @@ -2629,7 +2619,7 @@ ListDocumentsResponse* ListDocumentsResponse::New(::google::protobuf::Arena* are } void ListDocumentsResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2643,13 +2633,13 @@ bool ListDocumentsResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListDocumentsResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.firestore.v1beta1.Document documents = 1; + // repeated .google.firestore.v1.Document documents = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -2669,7 +2659,7 @@ bool ListDocumentsResponse::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListDocumentsResponse.next_page_token")); + "google.firestore.v1.ListDocumentsResponse.next_page_token")); } else { goto handle_unusual; } @@ -2688,21 +2678,21 @@ bool ListDocumentsResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListDocumentsResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListDocumentsResponse) return false; #undef DO_ } void ListDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Document documents = 1; + // repeated .google.firestore.v1.Document documents = 1; for (unsigned int i = 0, n = static_cast(this->documents_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2714,7 +2704,7 @@ void ListDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsResponse.next_page_token"); + "google.firestore.v1.ListDocumentsResponse.next_page_token"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->next_page_token(), output); } @@ -2723,17 +2713,17 @@ void ListDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListDocumentsResponse) } ::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Document documents = 1; + // repeated .google.firestore.v1.Document documents = 1; for (unsigned int i = 0, n = static_cast(this->documents_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2746,7 +2736,7 @@ ::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSiz ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListDocumentsResponse.next_page_token"); + "google.firestore.v1.ListDocumentsResponse.next_page_token"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->next_page_token(), target); @@ -2756,12 +2746,12 @@ ::google::protobuf::uint8* ListDocumentsResponse::InternalSerializeWithCachedSiz target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListDocumentsResponse) return target; } size_t ListDocumentsResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListDocumentsResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2769,7 +2759,7 @@ size_t ListDocumentsResponse::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Document documents = 1; + // repeated .google.firestore.v1.Document documents = 1; { unsigned int count = static_cast(this->documents_size()); total_size += 1UL * count; @@ -2795,22 +2785,22 @@ size_t ListDocumentsResponse::ByteSizeLong() const { } void ListDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListDocumentsResponse) GOOGLE_DCHECK_NE(&from, this); const ListDocumentsResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListDocumentsResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListDocumentsResponse) MergeFrom(*source); } } void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListDocumentsResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2824,14 +2814,14 @@ void ListDocumentsResponse::MergeFrom(const ListDocumentsResponse& from) { } void ListDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListDocumentsResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListDocumentsResponse::CopyFrom(const ListDocumentsResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListDocumentsResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListDocumentsResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -2854,18 +2844,18 @@ void ListDocumentsResponse::InternalSwap(ListDocumentsResponse* other) { } ::google::protobuf::Metadata ListDocumentsResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CreateDocumentRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); - ::google::firestore::v1beta1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); + ::google::firestore::v1::_CreateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); } void CreateDocumentRequest::clear_document() { if (GetArenaNoVirtual() == NULL && document_ != NULL) { @@ -2890,10 +2880,10 @@ const int CreateDocumentRequest::kMaskFieldNumber; CreateDocumentRequest::CreateDocumentRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.CreateDocumentRequest) } CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from) : ::google::protobuf::Message(), @@ -2913,16 +2903,16 @@ CreateDocumentRequest::CreateDocumentRequest(const CreateDocumentRequest& from) document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_); } if (from.has_document()) { - document_ = new ::google::firestore::v1beta1::Document(*from.document_); + document_ = new ::google::firestore::v1::Document(*from.document_); } else { document_ = NULL; } if (from.has_mask()) { - mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_); + mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_); } else { mask_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CreateDocumentRequest) } void CreateDocumentRequest::SharedCtor() { @@ -2936,7 +2926,7 @@ void CreateDocumentRequest::SharedCtor() { } CreateDocumentRequest::~CreateDocumentRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.CreateDocumentRequest) SharedDtor(); } @@ -2954,12 +2944,12 @@ void CreateDocumentRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CreateDocumentRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CreateDocumentRequest& CreateDocumentRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequest(); return *internal_default_instance(); } @@ -2972,7 +2962,7 @@ CreateDocumentRequest* CreateDocumentRequest::New(::google::protobuf::Arena* are } void CreateDocumentRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CreateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2995,7 +2985,7 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.CreateDocumentRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -3010,7 +3000,7 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.CreateDocumentRequest.parent")); + "google.firestore.v1.CreateDocumentRequest.parent")); } else { goto handle_unusual; } @@ -3026,7 +3016,7 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.CreateDocumentRequest.collection_id")); + "google.firestore.v1.CreateDocumentRequest.collection_id")); } else { goto handle_unusual; } @@ -3042,14 +3032,14 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document_id().data(), static_cast(this->document_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.CreateDocumentRequest.document_id")); + "google.firestore.v1.CreateDocumentRequest.document_id")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.Document document = 4; + // .google.firestore.v1.Document document = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -3061,7 +3051,7 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentMask mask = 5; + // .google.firestore.v1.DocumentMask mask = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { @@ -3085,17 +3075,17 @@ bool CreateDocumentRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.CreateDocumentRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.CreateDocumentRequest) return false; #undef DO_ } void CreateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.CreateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3104,7 +3094,7 @@ void CreateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.parent"); + "google.firestore.v1.CreateDocumentRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->parent(), output); } @@ -3114,7 +3104,7 @@ void CreateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.collection_id"); + "google.firestore.v1.CreateDocumentRequest.collection_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->collection_id(), output); } @@ -3124,18 +3114,18 @@ void CreateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document_id().data(), static_cast(this->document_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.document_id"); + "google.firestore.v1.CreateDocumentRequest.document_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->document_id(), output); } - // .google.firestore.v1beta1.Document document = 4; + // .google.firestore.v1.Document document = 4; if (this->has_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *this->document_, output); } - // .google.firestore.v1beta1.DocumentMask mask = 5; + // .google.firestore.v1.DocumentMask mask = 5; if (this->has_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, *this->mask_, output); @@ -3145,13 +3135,13 @@ void CreateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.CreateDocumentRequest) } ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CreateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3160,7 +3150,7 @@ ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSiz ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.parent"); + "google.firestore.v1.CreateDocumentRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->parent(), target); @@ -3171,7 +3161,7 @@ ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSiz ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.collection_id"); + "google.firestore.v1.CreateDocumentRequest.collection_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->collection_id(), target); @@ -3182,20 +3172,20 @@ ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSiz ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document_id().data(), static_cast(this->document_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CreateDocumentRequest.document_id"); + "google.firestore.v1.CreateDocumentRequest.document_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->document_id(), target); } - // .google.firestore.v1beta1.Document document = 4; + // .google.firestore.v1.Document document = 4; if (this->has_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, *this->document_, deterministic, target); } - // .google.firestore.v1beta1.DocumentMask mask = 5; + // .google.firestore.v1.DocumentMask mask = 5; if (this->has_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -3206,12 +3196,12 @@ ::google::protobuf::uint8* CreateDocumentRequest::InternalSerializeWithCachedSiz target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CreateDocumentRequest) return target; } size_t CreateDocumentRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CreateDocumentRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3240,14 +3230,14 @@ size_t CreateDocumentRequest::ByteSizeLong() const { this->document_id()); } - // .google.firestore.v1beta1.Document document = 4; + // .google.firestore.v1.Document document = 4; if (this->has_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->document_); } - // .google.firestore.v1beta1.DocumentMask mask = 5; + // .google.firestore.v1.DocumentMask mask = 5; if (this->has_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -3262,22 +3252,22 @@ size_t CreateDocumentRequest::ByteSizeLong() const { } void CreateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CreateDocumentRequest) GOOGLE_DCHECK_NE(&from, this); const CreateDocumentRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CreateDocumentRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CreateDocumentRequest) MergeFrom(*source); } } void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CreateDocumentRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3296,22 +3286,22 @@ void CreateDocumentRequest::MergeFrom(const CreateDocumentRequest& from) { document_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_id_); } if (from.has_document()) { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); } if (from.has_mask()) { - mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask()); + mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask()); } } void CreateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CreateDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CreateDocumentRequest::CopyFrom(const CreateDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CreateDocumentRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CreateDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -3337,22 +3327,22 @@ void CreateDocumentRequest::InternalSwap(CreateDocumentRequest* other) { } ::google::protobuf::Metadata CreateDocumentRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void UpdateDocumentRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); - ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>( - ::google::firestore::v1beta1::Precondition::internal_default_instance()); + ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); + ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_UpdateDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>( + ::google::firestore::v1::Precondition::internal_default_instance()); } void UpdateDocumentRequest::clear_document() { if (GetArenaNoVirtual() == NULL && document_ != NULL) { @@ -3388,10 +3378,10 @@ const int UpdateDocumentRequest::kCurrentDocumentFieldNumber; UpdateDocumentRequest::UpdateDocumentRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.UpdateDocumentRequest) } UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from) : ::google::protobuf::Message(), @@ -3399,26 +3389,26 @@ UpdateDocumentRequest::UpdateDocumentRequest(const UpdateDocumentRequest& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_document()) { - document_ = new ::google::firestore::v1beta1::Document(*from.document_); + document_ = new ::google::firestore::v1::Document(*from.document_); } else { document_ = NULL; } if (from.has_update_mask()) { - update_mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.update_mask_); + update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_); } else { update_mask_ = NULL; } if (from.has_mask()) { - mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_); + mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_); } else { mask_ = NULL; } if (from.has_current_document()) { - current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_); + current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_); } else { current_document_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.UpdateDocumentRequest) } void UpdateDocumentRequest::SharedCtor() { @@ -3429,7 +3419,7 @@ void UpdateDocumentRequest::SharedCtor() { } UpdateDocumentRequest::~UpdateDocumentRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.UpdateDocumentRequest) SharedDtor(); } @@ -3446,12 +3436,12 @@ void UpdateDocumentRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* UpdateDocumentRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const UpdateDocumentRequest& UpdateDocumentRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequest(); return *internal_default_instance(); } @@ -3464,7 +3454,7 @@ UpdateDocumentRequest* UpdateDocumentRequest::New(::google::protobuf::Arena* are } void UpdateDocumentRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.UpdateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3492,13 +3482,13 @@ bool UpdateDocumentRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.UpdateDocumentRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -3510,7 +3500,7 @@ bool UpdateDocumentRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentMask update_mask = 2; + // .google.firestore.v1.DocumentMask update_mask = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -3522,7 +3512,7 @@ bool UpdateDocumentRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -3534,7 +3524,7 @@ bool UpdateDocumentRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -3558,39 +3548,39 @@ bool UpdateDocumentRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.UpdateDocumentRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.UpdateDocumentRequest) return false; #undef DO_ } void UpdateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.UpdateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->document_, output); } - // .google.firestore.v1beta1.DocumentMask update_mask = 2; + // .google.firestore.v1.DocumentMask update_mask = 2; if (this->has_update_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->update_mask_, output); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->mask_, output); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *this->current_document_, output); @@ -3600,38 +3590,38 @@ void UpdateDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.UpdateDocumentRequest) } ::google::protobuf::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.UpdateDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *this->document_, deterministic, target); } - // .google.firestore.v1beta1.DocumentMask update_mask = 2; + // .google.firestore.v1.DocumentMask update_mask = 2; if (this->has_update_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, *this->update_mask_, deterministic, target); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, *this->mask_, deterministic, target); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -3642,12 +3632,12 @@ ::google::protobuf::uint8* UpdateDocumentRequest::InternalSerializeWithCachedSiz target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.UpdateDocumentRequest) return target; } size_t UpdateDocumentRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.UpdateDocumentRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3655,28 +3645,28 @@ size_t UpdateDocumentRequest::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->document_); } - // .google.firestore.v1beta1.DocumentMask update_mask = 2; + // .google.firestore.v1.DocumentMask update_mask = 2; if (this->has_update_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->update_mask_); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->mask_); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -3691,50 +3681,50 @@ size_t UpdateDocumentRequest::ByteSizeLong() const { } void UpdateDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.UpdateDocumentRequest) GOOGLE_DCHECK_NE(&from, this); const UpdateDocumentRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.UpdateDocumentRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.UpdateDocumentRequest) MergeFrom(*source); } } void UpdateDocumentRequest::MergeFrom(const UpdateDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.UpdateDocumentRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_document()) { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); } if (from.has_update_mask()) { - mutable_update_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.update_mask()); + mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.update_mask()); } if (from.has_mask()) { - mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask()); + mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask()); } if (from.has_current_document()) { - mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document()); + mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document()); } } void UpdateDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.UpdateDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); } void UpdateDocumentRequest::CopyFrom(const UpdateDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.UpdateDocumentRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.UpdateDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -3759,16 +3749,16 @@ void UpdateDocumentRequest::InternalSwap(UpdateDocumentRequest* other) { } ::google::protobuf::Metadata UpdateDocumentRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DeleteDocumentRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>( - ::google::firestore::v1beta1::Precondition::internal_default_instance()); + ::google::firestore::v1::_DeleteDocumentRequest_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>( + ::google::firestore::v1::Precondition::internal_default_instance()); } void DeleteDocumentRequest::clear_current_document() { if (GetArenaNoVirtual() == NULL && current_document_ != NULL) { @@ -3784,10 +3774,10 @@ const int DeleteDocumentRequest::kCurrentDocumentFieldNumber; DeleteDocumentRequest::DeleteDocumentRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.DeleteDocumentRequest) } DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from) : ::google::protobuf::Message(), @@ -3799,11 +3789,11 @@ DeleteDocumentRequest::DeleteDocumentRequest(const DeleteDocumentRequest& from) name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_current_document()) { - current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_); + current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_); } else { current_document_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DeleteDocumentRequest) } void DeleteDocumentRequest::SharedCtor() { @@ -3813,7 +3803,7 @@ void DeleteDocumentRequest::SharedCtor() { } DeleteDocumentRequest::~DeleteDocumentRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.DeleteDocumentRequest) SharedDtor(); } @@ -3828,12 +3818,12 @@ void DeleteDocumentRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DeleteDocumentRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DeleteDocumentRequest& DeleteDocumentRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequest(); return *internal_default_instance(); } @@ -3846,7 +3836,7 @@ DeleteDocumentRequest* DeleteDocumentRequest::New(::google::protobuf::Arena* are } void DeleteDocumentRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DeleteDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3863,7 +3853,7 @@ bool DeleteDocumentRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DeleteDocumentRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -3878,14 +3868,14 @@ bool DeleteDocumentRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DeleteDocumentRequest.name")); + "google.firestore.v1.DeleteDocumentRequest.name")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.Precondition current_document = 2; + // .google.firestore.v1.Precondition current_document = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -3909,17 +3899,17 @@ bool DeleteDocumentRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DeleteDocumentRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DeleteDocumentRequest) return false; #undef DO_ } void DeleteDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DeleteDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3928,12 +3918,12 @@ void DeleteDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DeleteDocumentRequest.name"); + "google.firestore.v1.DeleteDocumentRequest.name"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->name(), output); } - // .google.firestore.v1beta1.Precondition current_document = 2; + // .google.firestore.v1.Precondition current_document = 2; if (this->has_current_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->current_document_, output); @@ -3943,13 +3933,13 @@ void DeleteDocumentRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DeleteDocumentRequest) } ::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DeleteDocumentRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3958,13 +3948,13 @@ ::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSiz ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->name().data(), static_cast(this->name().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DeleteDocumentRequest.name"); + "google.firestore.v1.DeleteDocumentRequest.name"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->name(), target); } - // .google.firestore.v1beta1.Precondition current_document = 2; + // .google.firestore.v1.Precondition current_document = 2; if (this->has_current_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -3975,12 +3965,12 @@ ::google::protobuf::uint8* DeleteDocumentRequest::InternalSerializeWithCachedSiz target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DeleteDocumentRequest) return target; } size_t DeleteDocumentRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DeleteDocumentRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3995,7 +3985,7 @@ size_t DeleteDocumentRequest::ByteSizeLong() const { this->name()); } - // .google.firestore.v1beta1.Precondition current_document = 2; + // .google.firestore.v1.Precondition current_document = 2; if (this->has_current_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4010,22 +4000,22 @@ size_t DeleteDocumentRequest::ByteSizeLong() const { } void DeleteDocumentRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DeleteDocumentRequest) GOOGLE_DCHECK_NE(&from, this); const DeleteDocumentRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DeleteDocumentRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DeleteDocumentRequest) MergeFrom(*source); } } void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DeleteDocumentRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -4036,19 +4026,19 @@ void DeleteDocumentRequest::MergeFrom(const DeleteDocumentRequest& from) { name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.has_current_document()) { - mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document()); + mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document()); } } void DeleteDocumentRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DeleteDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); } void DeleteDocumentRequest::CopyFrom(const DeleteDocumentRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DeleteDocumentRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DeleteDocumentRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -4071,21 +4061,21 @@ void DeleteDocumentRequest::InternalSwap(DeleteDocumentRequest* other) { } ::google::protobuf::Metadata DeleteDocumentRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void BatchGetDocumentsRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault( + ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_._instance.get_mutable()->mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.transaction_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>( - ::google::firestore::v1beta1::TransactionOptions::internal_default_instance()); - ::google::firestore::v1beta1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>( + ::google::firestore::v1::TransactionOptions::internal_default_instance()); + ::google::firestore::v1::_BatchGetDocumentsRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void BatchGetDocumentsRequest::clear_mask() { @@ -4094,7 +4084,7 @@ void BatchGetDocumentsRequest::clear_mask() { } mask_ = NULL; } -void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) { +void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_consistency_selector(); if (new_transaction) { @@ -4106,7 +4096,7 @@ void BatchGetDocumentsRequest::set_allocated_new_transaction(::google::firestore set_has_new_transaction(); consistency_selector_.new_transaction_ = new_transaction; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.new_transaction) } void BatchGetDocumentsRequest::clear_new_transaction() { if (has_new_transaction()) { @@ -4127,7 +4117,7 @@ void BatchGetDocumentsRequest::set_allocated_read_time(::google::protobuf::Times set_has_read_time(); consistency_selector_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.read_time) } void BatchGetDocumentsRequest::clear_read_time() { if (has_read_time()) { @@ -4147,10 +4137,10 @@ const int BatchGetDocumentsRequest::kReadTimeFieldNumber; BatchGetDocumentsRequest::BatchGetDocumentsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsRequest) } BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsRequest& from) : ::google::protobuf::Message(), @@ -4163,7 +4153,7 @@ BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsReques database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_); } if (from.has_mask()) { - mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.mask_); + mask_ = new ::google::firestore::v1::DocumentMask(*from.mask_); } else { mask_ = NULL; } @@ -4174,7 +4164,7 @@ BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsReques break; } case kNewTransaction: { - mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction()); + mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction()); break; } case kReadTime: { @@ -4185,7 +4175,7 @@ BatchGetDocumentsRequest::BatchGetDocumentsRequest(const BatchGetDocumentsReques break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsRequest) } void BatchGetDocumentsRequest::SharedCtor() { @@ -4196,7 +4186,7 @@ void BatchGetDocumentsRequest::SharedCtor() { } BatchGetDocumentsRequest::~BatchGetDocumentsRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsRequest) SharedDtor(); } @@ -4214,12 +4204,12 @@ void BatchGetDocumentsRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* BatchGetDocumentsRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const BatchGetDocumentsRequest& BatchGetDocumentsRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequest(); return *internal_default_instance(); } @@ -4232,7 +4222,7 @@ BatchGetDocumentsRequest* BatchGetDocumentsRequest::New(::google::protobuf::Aren } void BatchGetDocumentsRequest::clear_consistency_selector() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsRequest) switch (consistency_selector_case()) { case kTransaction: { consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -4255,7 +4245,7 @@ void BatchGetDocumentsRequest::clear_consistency_selector() { void BatchGetDocumentsRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4274,7 +4264,7 @@ bool BatchGetDocumentsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -4289,7 +4279,7 @@ bool BatchGetDocumentsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.database")); + "google.firestore.v1.BatchGetDocumentsRequest.database")); } else { goto handle_unusual; } @@ -4306,14 +4296,14 @@ bool BatchGetDocumentsRequest::MergePartialFromCodedStream( this->documents(this->documents_size() - 1).data(), static_cast(this->documents(this->documents_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.documents")); + "google.firestore.v1.BatchGetDocumentsRequest.documents")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -4337,7 +4327,7 @@ bool BatchGetDocumentsRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 5; + // .google.firestore.v1.TransactionOptions new_transaction = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { @@ -4373,17 +4363,17 @@ bool BatchGetDocumentsRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsRequest) return false; #undef DO_ } void BatchGetDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4392,7 +4382,7 @@ void BatchGetDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.database"); + "google.firestore.v1.BatchGetDocumentsRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } @@ -4402,12 +4392,12 @@ void BatchGetDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->documents(i).data(), static_cast(this->documents(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.documents"); + "google.firestore.v1.BatchGetDocumentsRequest.documents"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->documents(i), output); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->mask_, output); @@ -4419,7 +4409,7 @@ void BatchGetDocumentsRequest::SerializeWithCachedSizes( 4, this->transaction(), output); } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 5; + // .google.firestore.v1.TransactionOptions new_transaction = 5; if (has_new_transaction()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, *consistency_selector_.new_transaction_, output); @@ -4435,13 +4425,13 @@ void BatchGetDocumentsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsRequest) } ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -4450,7 +4440,7 @@ ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCached ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.database"); + "google.firestore.v1.BatchGetDocumentsRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); @@ -4461,12 +4451,12 @@ ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCached ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->documents(i).data(), static_cast(this->documents(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsRequest.documents"); + "google.firestore.v1.BatchGetDocumentsRequest.documents"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->documents(i), target); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4480,7 +4470,7 @@ ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCached 4, this->transaction(), target); } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 5; + // .google.firestore.v1.TransactionOptions new_transaction = 5; if (has_new_transaction()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4498,12 +4488,12 @@ ::google::protobuf::uint8* BatchGetDocumentsRequest::InternalSerializeWithCached target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsRequest) return target; } size_t BatchGetDocumentsRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -4526,7 +4516,7 @@ size_t BatchGetDocumentsRequest::ByteSizeLong() const { this->database()); } - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; if (this->has_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4541,7 +4531,7 @@ size_t BatchGetDocumentsRequest::ByteSizeLong() const { this->transaction()); break; } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 5; + // .google.firestore.v1.TransactionOptions new_transaction = 5; case kNewTransaction: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -4567,22 +4557,22 @@ size_t BatchGetDocumentsRequest::ByteSizeLong() const { } void BatchGetDocumentsRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest) GOOGLE_DCHECK_NE(&from, this); const BatchGetDocumentsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsRequest) MergeFrom(*source); } } void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -4594,7 +4584,7 @@ void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) { database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_); } if (from.has_mask()) { - mutable_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.mask()); + mutable_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.mask()); } switch (from.consistency_selector_case()) { case kTransaction: { @@ -4602,7 +4592,7 @@ void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) { break; } case kNewTransaction: { - mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction()); + mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction()); break; } case kReadTime: { @@ -4616,14 +4606,14 @@ void BatchGetDocumentsRequest::MergeFrom(const BatchGetDocumentsRequest& from) { } void BatchGetDocumentsRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void BatchGetDocumentsRequest::CopyFrom(const BatchGetDocumentsRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -4649,22 +4639,22 @@ void BatchGetDocumentsRequest::InternalSwap(BatchGetDocumentsRequest* other) { } ::google::protobuf::Metadata BatchGetDocumentsRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void BatchGetDocumentsResponse::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); - ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault( + ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.found_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); + ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_.missing_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_BatchGetDocumentsResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } -void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1beta1::Document* found) { +void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1::Document* found) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_result(); if (found) { @@ -4676,7 +4666,7 @@ void BatchGetDocumentsResponse::set_allocated_found(::google::firestore::v1beta1 set_has_found(); result_.found_ = found; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.found) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.found) } void BatchGetDocumentsResponse::clear_found() { if (has_found()) { @@ -4700,10 +4690,10 @@ const int BatchGetDocumentsResponse::kReadTimeFieldNumber; BatchGetDocumentsResponse::BatchGetDocumentsResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.BatchGetDocumentsResponse) } BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResponse& from) : ::google::protobuf::Message(), @@ -4722,7 +4712,7 @@ BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResp clear_has_result(); switch (from.result_case()) { case kFound: { - mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found()); + mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found()); break; } case kMissing: { @@ -4733,7 +4723,7 @@ BatchGetDocumentsResponse::BatchGetDocumentsResponse(const BatchGetDocumentsResp break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BatchGetDocumentsResponse) } void BatchGetDocumentsResponse::SharedCtor() { @@ -4744,7 +4734,7 @@ void BatchGetDocumentsResponse::SharedCtor() { } BatchGetDocumentsResponse::~BatchGetDocumentsResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.BatchGetDocumentsResponse) SharedDtor(); } @@ -4762,12 +4752,12 @@ void BatchGetDocumentsResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* BatchGetDocumentsResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const BatchGetDocumentsResponse& BatchGetDocumentsResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponse(); return *internal_default_instance(); } @@ -4780,7 +4770,7 @@ BatchGetDocumentsResponse* BatchGetDocumentsResponse::New(::google::protobuf::Ar } void BatchGetDocumentsResponse::clear_result() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.BatchGetDocumentsResponse) switch (result_case()) { case kFound: { delete result_.found_; @@ -4799,7 +4789,7 @@ void BatchGetDocumentsResponse::clear_result() { void BatchGetDocumentsResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BatchGetDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -4817,13 +4807,13 @@ bool BatchGetDocumentsResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.BatchGetDocumentsResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Document found = 1; + // .google.firestore.v1.Document found = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -4844,7 +4834,7 @@ bool BatchGetDocumentsResponse::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing().data(), static_cast(this->missing().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.BatchGetDocumentsResponse.missing")); + "google.firestore.v1.BatchGetDocumentsResponse.missing")); } else { goto handle_unusual; } @@ -4887,21 +4877,21 @@ bool BatchGetDocumentsResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.BatchGetDocumentsResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.BatchGetDocumentsResponse) return false; #undef DO_ } void BatchGetDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.BatchGetDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document found = 1; + // .google.firestore.v1.Document found = 1; if (has_found()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *result_.found_, output); @@ -4912,7 +4902,7 @@ void BatchGetDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing().data(), static_cast(this->missing().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsResponse.missing"); + "google.firestore.v1.BatchGetDocumentsResponse.missing"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->missing(), output); } @@ -4933,17 +4923,17 @@ void BatchGetDocumentsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.BatchGetDocumentsResponse) } ::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BatchGetDocumentsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document found = 1; + // .google.firestore.v1.Document found = 1; if (has_found()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -4955,7 +4945,7 @@ ::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCache ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->missing().data(), static_cast(this->missing().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BatchGetDocumentsResponse.missing"); + "google.firestore.v1.BatchGetDocumentsResponse.missing"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->missing(), target); @@ -4979,12 +4969,12 @@ ::google::protobuf::uint8* BatchGetDocumentsResponse::InternalSerializeWithCache target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BatchGetDocumentsResponse) return target; } size_t BatchGetDocumentsResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BatchGetDocumentsResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -5007,7 +4997,7 @@ size_t BatchGetDocumentsResponse::ByteSizeLong() const { } switch (result_case()) { - // .google.firestore.v1beta1.Document found = 1; + // .google.firestore.v1.Document found = 1; case kFound: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -5033,22 +5023,22 @@ size_t BatchGetDocumentsResponse::ByteSizeLong() const { } void BatchGetDocumentsResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse) GOOGLE_DCHECK_NE(&from, this); const BatchGetDocumentsResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BatchGetDocumentsResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BatchGetDocumentsResponse) MergeFrom(*source); } } void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BatchGetDocumentsResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -5063,7 +5053,7 @@ void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) } switch (from.result_case()) { case kFound: { - mutable_found()->::google::firestore::v1beta1::Document::MergeFrom(from.found()); + mutable_found()->::google::firestore::v1::Document::MergeFrom(from.found()); break; } case kMissing: { @@ -5077,14 +5067,14 @@ void BatchGetDocumentsResponse::MergeFrom(const BatchGetDocumentsResponse& from) } void BatchGetDocumentsResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse) if (&from == this) return; Clear(); MergeFrom(from); } void BatchGetDocumentsResponse::CopyFrom(const BatchGetDocumentsResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BatchGetDocumentsResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BatchGetDocumentsResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -5109,16 +5099,16 @@ void BatchGetDocumentsResponse::InternalSwap(BatchGetDocumentsResponse* other) { } ::google::protobuf::Metadata BatchGetDocumentsResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void BeginTransactionRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>( - ::google::firestore::v1beta1::TransactionOptions::internal_default_instance()); + ::google::firestore::v1::_BeginTransactionRequest_default_instance_._instance.get_mutable()->options_ = const_cast< ::google::firestore::v1::TransactionOptions*>( + ::google::firestore::v1::TransactionOptions::internal_default_instance()); } void BeginTransactionRequest::clear_options() { if (GetArenaNoVirtual() == NULL && options_ != NULL) { @@ -5134,10 +5124,10 @@ const int BeginTransactionRequest::kOptionsFieldNumber; BeginTransactionRequest::BeginTransactionRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionRequest) } BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& from) : ::google::protobuf::Message(), @@ -5149,11 +5139,11 @@ BeginTransactionRequest::BeginTransactionRequest(const BeginTransactionRequest& database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_); } if (from.has_options()) { - options_ = new ::google::firestore::v1beta1::TransactionOptions(*from.options_); + options_ = new ::google::firestore::v1::TransactionOptions(*from.options_); } else { options_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionRequest) } void BeginTransactionRequest::SharedCtor() { @@ -5163,7 +5153,7 @@ void BeginTransactionRequest::SharedCtor() { } BeginTransactionRequest::~BeginTransactionRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionRequest) SharedDtor(); } @@ -5178,12 +5168,12 @@ void BeginTransactionRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* BeginTransactionRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const BeginTransactionRequest& BeginTransactionRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequest(); return *internal_default_instance(); } @@ -5196,7 +5186,7 @@ BeginTransactionRequest* BeginTransactionRequest::New(::google::protobuf::Arena* } void BeginTransactionRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5213,7 +5203,7 @@ bool BeginTransactionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -5228,14 +5218,14 @@ bool BeginTransactionRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.BeginTransactionRequest.database")); + "google.firestore.v1.BeginTransactionRequest.database")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.TransactionOptions options = 2; + // .google.firestore.v1.TransactionOptions options = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -5259,17 +5249,17 @@ bool BeginTransactionRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionRequest) return false; #undef DO_ } void BeginTransactionRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5278,12 +5268,12 @@ void BeginTransactionRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BeginTransactionRequest.database"); + "google.firestore.v1.BeginTransactionRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } - // .google.firestore.v1beta1.TransactionOptions options = 2; + // .google.firestore.v1.TransactionOptions options = 2; if (this->has_options()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *this->options_, output); @@ -5293,13 +5283,13 @@ void BeginTransactionRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionRequest) } ::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5308,13 +5298,13 @@ ::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedS ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.BeginTransactionRequest.database"); + "google.firestore.v1.BeginTransactionRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); } - // .google.firestore.v1beta1.TransactionOptions options = 2; + // .google.firestore.v1.TransactionOptions options = 2; if (this->has_options()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -5325,12 +5315,12 @@ ::google::protobuf::uint8* BeginTransactionRequest::InternalSerializeWithCachedS target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionRequest) return target; } size_t BeginTransactionRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -5345,7 +5335,7 @@ size_t BeginTransactionRequest::ByteSizeLong() const { this->database()); } - // .google.firestore.v1beta1.TransactionOptions options = 2; + // .google.firestore.v1.TransactionOptions options = 2; if (this->has_options()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -5360,22 +5350,22 @@ size_t BeginTransactionRequest::ByteSizeLong() const { } void BeginTransactionRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionRequest) GOOGLE_DCHECK_NE(&from, this); const BeginTransactionRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionRequest) MergeFrom(*source); } } void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -5386,19 +5376,19 @@ void BeginTransactionRequest::MergeFrom(const BeginTransactionRequest& from) { database_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.database_); } if (from.has_options()) { - mutable_options()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.options()); + mutable_options()->::google::firestore::v1::TransactionOptions::MergeFrom(from.options()); } } void BeginTransactionRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionRequest) if (&from == this) return; Clear(); MergeFrom(from); } void BeginTransactionRequest::CopyFrom(const BeginTransactionRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -5421,8 +5411,8 @@ void BeginTransactionRequest::InternalSwap(BeginTransactionRequest* other) { } ::google::protobuf::Metadata BeginTransactionRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -5437,10 +5427,10 @@ const int BeginTransactionResponse::kTransactionFieldNumber; BeginTransactionResponse::BeginTransactionResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.BeginTransactionResponse) } BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionResponse& from) : ::google::protobuf::Message(), @@ -5451,7 +5441,7 @@ BeginTransactionResponse::BeginTransactionResponse(const BeginTransactionRespons if (from.transaction().size() > 0) { transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.BeginTransactionResponse) } void BeginTransactionResponse::SharedCtor() { @@ -5460,7 +5450,7 @@ void BeginTransactionResponse::SharedCtor() { } BeginTransactionResponse::~BeginTransactionResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.BeginTransactionResponse) SharedDtor(); } @@ -5474,12 +5464,12 @@ void BeginTransactionResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* BeginTransactionResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const BeginTransactionResponse& BeginTransactionResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponse(); return *internal_default_instance(); } @@ -5492,7 +5482,7 @@ BeginTransactionResponse* BeginTransactionResponse::New(::google::protobuf::Aren } void BeginTransactionResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.BeginTransactionResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5505,7 +5495,7 @@ bool BeginTransactionResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.BeginTransactionResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -5535,17 +5525,17 @@ bool BeginTransactionResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.BeginTransactionResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.BeginTransactionResponse) return false; #undef DO_ } void BeginTransactionResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.BeginTransactionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5559,13 +5549,13 @@ void BeginTransactionResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.BeginTransactionResponse) } ::google::protobuf::uint8* BeginTransactionResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.BeginTransactionResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5580,12 +5570,12 @@ ::google::protobuf::uint8* BeginTransactionResponse::InternalSerializeWithCached target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.BeginTransactionResponse) return target; } size_t BeginTransactionResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.BeginTransactionResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -5608,22 +5598,22 @@ size_t BeginTransactionResponse::ByteSizeLong() const { } void BeginTransactionResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.BeginTransactionResponse) GOOGLE_DCHECK_NE(&from, this); const BeginTransactionResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.BeginTransactionResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.BeginTransactionResponse) MergeFrom(*source); } } void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.BeginTransactionResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -5636,14 +5626,14 @@ void BeginTransactionResponse::MergeFrom(const BeginTransactionResponse& from) { } void BeginTransactionResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.BeginTransactionResponse) if (&from == this) return; Clear(); MergeFrom(from); } void BeginTransactionResponse::CopyFrom(const BeginTransactionResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.BeginTransactionResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.BeginTransactionResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -5665,8 +5655,8 @@ void BeginTransactionResponse::InternalSwap(BeginTransactionResponse* other) { } ::google::protobuf::Metadata BeginTransactionResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -5686,10 +5676,10 @@ const int CommitRequest::kTransactionFieldNumber; CommitRequest::CommitRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.CommitRequest) } CommitRequest::CommitRequest(const CommitRequest& from) : ::google::protobuf::Message(), @@ -5705,7 +5695,7 @@ CommitRequest::CommitRequest(const CommitRequest& from) if (from.transaction().size() > 0) { transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitRequest) } void CommitRequest::SharedCtor() { @@ -5715,7 +5705,7 @@ void CommitRequest::SharedCtor() { } CommitRequest::~CommitRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.CommitRequest) SharedDtor(); } @@ -5730,12 +5720,12 @@ void CommitRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CommitRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CommitRequest& CommitRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitRequest(); return *internal_default_instance(); } @@ -5748,7 +5738,7 @@ CommitRequest* CommitRequest::New(::google::protobuf::Arena* arena) const { } void CommitRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5763,7 +5753,7 @@ bool CommitRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -5778,14 +5768,14 @@ bool CommitRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.CommitRequest.database")); + "google.firestore.v1.CommitRequest.database")); } else { goto handle_unusual; } break; } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -5820,17 +5810,17 @@ bool CommitRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitRequest) return false; #undef DO_ } void CommitRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5839,12 +5829,12 @@ void CommitRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CommitRequest.database"); + "google.firestore.v1.CommitRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -5861,13 +5851,13 @@ void CommitRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitRequest) } ::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -5876,13 +5866,13 @@ ::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArra ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.CommitRequest.database"); + "google.firestore.v1.CommitRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -5901,12 +5891,12 @@ ::google::protobuf::uint8* CommitRequest::InternalSerializeWithCachedSizesToArra target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitRequest) return target; } size_t CommitRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -5914,7 +5904,7 @@ size_t CommitRequest::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; { unsigned int count = static_cast(this->writes_size()); total_size += 1UL * count; @@ -5947,22 +5937,22 @@ size_t CommitRequest::ByteSizeLong() const { } void CommitRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitRequest) GOOGLE_DCHECK_NE(&from, this); const CommitRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitRequest) MergeFrom(*source); } } void CommitRequest::MergeFrom(const CommitRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -5980,14 +5970,14 @@ void CommitRequest::MergeFrom(const CommitRequest& from) { } void CommitRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitRequest) if (&from == this) return; Clear(); MergeFrom(from); } void CommitRequest::CopyFrom(const CommitRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -6011,15 +6001,15 @@ void CommitRequest::InternalSwap(CommitRequest* other) { } ::google::protobuf::Metadata CommitRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void CommitResponse::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_CommitResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void CommitResponse::clear_write_results() { @@ -6039,10 +6029,10 @@ const int CommitResponse::kCommitTimeFieldNumber; CommitResponse::CommitResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.CommitResponse) } CommitResponse::CommitResponse(const CommitResponse& from) : ::google::protobuf::Message(), @@ -6055,7 +6045,7 @@ CommitResponse::CommitResponse(const CommitResponse& from) } else { commit_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.CommitResponse) } void CommitResponse::SharedCtor() { @@ -6064,7 +6054,7 @@ void CommitResponse::SharedCtor() { } CommitResponse::~CommitResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.CommitResponse) SharedDtor(); } @@ -6078,12 +6068,12 @@ void CommitResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* CommitResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const CommitResponse& CommitResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitResponse(); return *internal_default_instance(); } @@ -6096,7 +6086,7 @@ CommitResponse* CommitResponse::New(::google::protobuf::Arena* arena) const { } void CommitResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.CommitResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6113,13 +6103,13 @@ bool CommitResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.CommitResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.firestore.v1beta1.WriteResult write_results = 1; + // repeated .google.firestore.v1.WriteResult write_results = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -6154,21 +6144,21 @@ bool CommitResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.CommitResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.CommitResponse) return false; #undef DO_ } void CommitResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.CommitResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.WriteResult write_results = 1; + // repeated .google.firestore.v1.WriteResult write_results = 1; for (unsigned int i = 0, n = static_cast(this->write_results_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -6185,17 +6175,17 @@ void CommitResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.CommitResponse) } ::google::protobuf::uint8* CommitResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.CommitResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.WriteResult write_results = 1; + // repeated .google.firestore.v1.WriteResult write_results = 1; for (unsigned int i = 0, n = static_cast(this->write_results_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -6214,12 +6204,12 @@ ::google::protobuf::uint8* CommitResponse::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.CommitResponse) return target; } size_t CommitResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.CommitResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -6227,7 +6217,7 @@ size_t CommitResponse::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.WriteResult write_results = 1; + // repeated .google.firestore.v1.WriteResult write_results = 1; { unsigned int count = static_cast(this->write_results_size()); total_size += 1UL * count; @@ -6253,22 +6243,22 @@ size_t CommitResponse::ByteSizeLong() const { } void CommitResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.CommitResponse) GOOGLE_DCHECK_NE(&from, this); const CommitResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.CommitResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.CommitResponse) MergeFrom(*source); } } void CommitResponse::MergeFrom(const CommitResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.CommitResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -6281,14 +6271,14 @@ void CommitResponse::MergeFrom(const CommitResponse& from) { } void CommitResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.CommitResponse) if (&from == this) return; Clear(); MergeFrom(from); } void CommitResponse::CopyFrom(const CommitResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.CommitResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.CommitResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -6311,8 +6301,8 @@ void CommitResponse::InternalSwap(CommitResponse* other) { } ::google::protobuf::Metadata CommitResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -6328,10 +6318,10 @@ const int RollbackRequest::kTransactionFieldNumber; RollbackRequest::RollbackRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRollbackRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.RollbackRequest) } RollbackRequest::RollbackRequest(const RollbackRequest& from) : ::google::protobuf::Message(), @@ -6346,7 +6336,7 @@ RollbackRequest::RollbackRequest(const RollbackRequest& from) if (from.transaction().size() > 0) { transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RollbackRequest) } void RollbackRequest::SharedCtor() { @@ -6356,7 +6346,7 @@ void RollbackRequest::SharedCtor() { } RollbackRequest::~RollbackRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.RollbackRequest) SharedDtor(); } @@ -6371,12 +6361,12 @@ void RollbackRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* RollbackRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RollbackRequest& RollbackRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRollbackRequest(); return *internal_default_instance(); } @@ -6389,7 +6379,7 @@ RollbackRequest* RollbackRequest::New(::google::protobuf::Arena* arena) const { } void RollbackRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RollbackRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6403,7 +6393,7 @@ bool RollbackRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.RollbackRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -6418,7 +6408,7 @@ bool RollbackRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.RollbackRequest.database")); + "google.firestore.v1.RollbackRequest.database")); } else { goto handle_unusual; } @@ -6449,17 +6439,17 @@ bool RollbackRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.RollbackRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.RollbackRequest) return false; #undef DO_ } void RollbackRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.RollbackRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6468,7 +6458,7 @@ void RollbackRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.RollbackRequest.database"); + "google.firestore.v1.RollbackRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } @@ -6483,13 +6473,13 @@ void RollbackRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.RollbackRequest) } ::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RollbackRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6498,7 +6488,7 @@ ::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToAr ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.RollbackRequest.database"); + "google.firestore.v1.RollbackRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); @@ -6515,12 +6505,12 @@ ::google::protobuf::uint8* RollbackRequest::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RollbackRequest) return target; } size_t RollbackRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RollbackRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -6550,22 +6540,22 @@ size_t RollbackRequest::ByteSizeLong() const { } void RollbackRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RollbackRequest) GOOGLE_DCHECK_NE(&from, this); const RollbackRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RollbackRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RollbackRequest) MergeFrom(*source); } } void RollbackRequest::MergeFrom(const RollbackRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RollbackRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -6582,14 +6572,14 @@ void RollbackRequest::MergeFrom(const RollbackRequest& from) { } void RollbackRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RollbackRequest) if (&from == this) return; Clear(); MergeFrom(from); } void RollbackRequest::CopyFrom(const RollbackRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RollbackRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RollbackRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -6612,24 +6602,24 @@ void RollbackRequest::InternalSwap(RollbackRequest* other) { } ::google::protobuf::Metadata RollbackRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunQueryRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>( - ::google::firestore::v1beta1::StructuredQuery::internal_default_instance()); - ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault( + ::google::firestore::v1::_RunQueryRequest_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>( + ::google::firestore::v1::StructuredQuery::internal_default_instance()); + ::google::firestore::v1::_RunQueryRequest_default_instance_.transaction_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1beta1::TransactionOptions*>( - ::google::firestore::v1beta1::TransactionOptions::internal_default_instance()); - ::google::firestore::v1beta1::_RunQueryRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_RunQueryRequest_default_instance_.new_transaction_ = const_cast< ::google::firestore::v1::TransactionOptions*>( + ::google::firestore::v1::TransactionOptions::internal_default_instance()); + ::google::firestore::v1::_RunQueryRequest_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } -void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) { +void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_query_type(); if (structured_query) { @@ -6641,7 +6631,7 @@ void RunQueryRequest::set_allocated_structured_query(::google::firestore::v1beta set_has_structured_query(); query_type_.structured_query_ = structured_query; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.structured_query) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.structured_query) } void RunQueryRequest::clear_structured_query() { if (has_structured_query()) { @@ -6649,7 +6639,7 @@ void RunQueryRequest::clear_structured_query() { clear_has_query_type(); } } -void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction) { +void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_consistency_selector(); if (new_transaction) { @@ -6661,7 +6651,7 @@ void RunQueryRequest::set_allocated_new_transaction(::google::firestore::v1beta1 set_has_new_transaction(); consistency_selector_.new_transaction_ = new_transaction; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.new_transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.new_transaction) } void RunQueryRequest::clear_new_transaction() { if (has_new_transaction()) { @@ -6682,7 +6672,7 @@ void RunQueryRequest::set_allocated_read_time(::google::protobuf::Timestamp* rea set_has_read_time(); consistency_selector_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.read_time) } void RunQueryRequest::clear_read_time() { if (has_read_time()) { @@ -6701,10 +6691,10 @@ const int RunQueryRequest::kReadTimeFieldNumber; RunQueryRequest::RunQueryRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryRequest) } RunQueryRequest::RunQueryRequest(const RunQueryRequest& from) : ::google::protobuf::Message(), @@ -6718,7 +6708,7 @@ RunQueryRequest::RunQueryRequest(const RunQueryRequest& from) clear_has_query_type(); switch (from.query_type_case()) { case kStructuredQuery: { - mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query()); + mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query()); break; } case QUERY_TYPE_NOT_SET: { @@ -6732,7 +6722,7 @@ RunQueryRequest::RunQueryRequest(const RunQueryRequest& from) break; } case kNewTransaction: { - mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction()); + mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction()); break; } case kReadTime: { @@ -6743,7 +6733,7 @@ RunQueryRequest::RunQueryRequest(const RunQueryRequest& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryRequest) } void RunQueryRequest::SharedCtor() { @@ -6754,7 +6744,7 @@ void RunQueryRequest::SharedCtor() { } RunQueryRequest::~RunQueryRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryRequest) SharedDtor(); } @@ -6774,12 +6764,12 @@ void RunQueryRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* RunQueryRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunQueryRequest& RunQueryRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryRequest(); return *internal_default_instance(); } @@ -6792,7 +6782,7 @@ RunQueryRequest* RunQueryRequest::New(::google::protobuf::Arena* arena) const { } void RunQueryRequest::clear_query_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest) switch (query_type_case()) { case kStructuredQuery: { delete query_type_.structured_query_; @@ -6806,7 +6796,7 @@ void RunQueryRequest::clear_query_type() { } void RunQueryRequest::clear_consistency_selector() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.RunQueryRequest) switch (consistency_selector_case()) { case kTransaction: { consistency_selector_.transaction_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -6829,7 +6819,7 @@ void RunQueryRequest::clear_consistency_selector() { void RunQueryRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -6844,7 +6834,7 @@ bool RunQueryRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -6859,14 +6849,14 @@ bool RunQueryRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.RunQueryRequest.parent")); + "google.firestore.v1.RunQueryRequest.parent")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -6890,7 +6880,7 @@ bool RunQueryRequest::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 6; + // .google.firestore.v1.TransactionOptions new_transaction = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -6926,17 +6916,17 @@ bool RunQueryRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryRequest) return false; #undef DO_ } void RunQueryRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6945,12 +6935,12 @@ void RunQueryRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.RunQueryRequest.parent"); + "google.firestore.v1.RunQueryRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->parent(), output); } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; if (has_structured_query()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *query_type_.structured_query_, output); @@ -6962,7 +6952,7 @@ void RunQueryRequest::SerializeWithCachedSizes( 5, this->transaction(), output); } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 6; + // .google.firestore.v1.TransactionOptions new_transaction = 6; if (has_new_transaction()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *consistency_selector_.new_transaction_, output); @@ -6978,13 +6968,13 @@ void RunQueryRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryRequest) } ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -6993,13 +6983,13 @@ ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToAr ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.RunQueryRequest.parent"); + "google.firestore.v1.RunQueryRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->parent(), target); } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; if (has_structured_query()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -7013,7 +7003,7 @@ ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToAr 5, this->transaction(), target); } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 6; + // .google.firestore.v1.TransactionOptions new_transaction = 6; if (has_new_transaction()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -7031,12 +7021,12 @@ ::google::protobuf::uint8* RunQueryRequest::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryRequest) return target; } size_t RunQueryRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -7052,7 +7042,7 @@ size_t RunQueryRequest::ByteSizeLong() const { } switch (query_type_case()) { - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; case kStructuredQuery: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -7071,7 +7061,7 @@ size_t RunQueryRequest::ByteSizeLong() const { this->transaction()); break; } - // .google.firestore.v1beta1.TransactionOptions new_transaction = 6; + // .google.firestore.v1.TransactionOptions new_transaction = 6; case kNewTransaction: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -7097,22 +7087,22 @@ size_t RunQueryRequest::ByteSizeLong() const { } void RunQueryRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryRequest) GOOGLE_DCHECK_NE(&from, this); const RunQueryRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryRequest) MergeFrom(*source); } } void RunQueryRequest::MergeFrom(const RunQueryRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -7124,7 +7114,7 @@ void RunQueryRequest::MergeFrom(const RunQueryRequest& from) { } switch (from.query_type_case()) { case kStructuredQuery: { - mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query()); + mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query()); break; } case QUERY_TYPE_NOT_SET: { @@ -7137,7 +7127,7 @@ void RunQueryRequest::MergeFrom(const RunQueryRequest& from) { break; } case kNewTransaction: { - mutable_new_transaction()->::google::firestore::v1beta1::TransactionOptions::MergeFrom(from.new_transaction()); + mutable_new_transaction()->::google::firestore::v1::TransactionOptions::MergeFrom(from.new_transaction()); break; } case kReadTime: { @@ -7151,14 +7141,14 @@ void RunQueryRequest::MergeFrom(const RunQueryRequest& from) { } void RunQueryRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryRequest) if (&from == this) return; Clear(); MergeFrom(from); } void RunQueryRequest::CopyFrom(const RunQueryRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -7184,17 +7174,17 @@ void RunQueryRequest::InternalSwap(RunQueryRequest* other) { } ::google::protobuf::Metadata RunQueryRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void RunQueryResponse::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); - ::google::firestore::v1beta1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); + ::google::firestore::v1::_RunQueryResponse_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void RunQueryResponse::clear_document() { @@ -7219,10 +7209,10 @@ const int RunQueryResponse::kSkippedResultsFieldNumber; RunQueryResponse::RunQueryResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.RunQueryResponse) } RunQueryResponse::RunQueryResponse(const RunQueryResponse& from) : ::google::protobuf::Message(), @@ -7234,7 +7224,7 @@ RunQueryResponse::RunQueryResponse(const RunQueryResponse& from) transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_); } if (from.has_document()) { - document_ = new ::google::firestore::v1beta1::Document(*from.document_); + document_ = new ::google::firestore::v1::Document(*from.document_); } else { document_ = NULL; } @@ -7244,7 +7234,7 @@ RunQueryResponse::RunQueryResponse(const RunQueryResponse& from) read_time_ = NULL; } skipped_results_ = from.skipped_results_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.RunQueryResponse) } void RunQueryResponse::SharedCtor() { @@ -7256,7 +7246,7 @@ void RunQueryResponse::SharedCtor() { } RunQueryResponse::~RunQueryResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.RunQueryResponse) SharedDtor(); } @@ -7272,12 +7262,12 @@ void RunQueryResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* RunQueryResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const RunQueryResponse& RunQueryResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryResponse(); return *internal_default_instance(); } @@ -7290,7 +7280,7 @@ RunQueryResponse* RunQueryResponse::New(::google::protobuf::Arena* arena) const } void RunQueryResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.RunQueryResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7312,13 +7302,13 @@ bool RunQueryResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.RunQueryResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -7380,21 +7370,21 @@ bool RunQueryResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.RunQueryResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.RunQueryResponse) return false; #undef DO_ } void RunQueryResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.RunQueryResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->document_, output); @@ -7421,17 +7411,17 @@ void RunQueryResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.RunQueryResponse) } ::google::protobuf::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.RunQueryResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -7461,12 +7451,12 @@ ::google::protobuf::uint8* RunQueryResponse::InternalSerializeWithCachedSizesToA target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.RunQueryResponse) return target; } size_t RunQueryResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.RunQueryResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -7481,7 +7471,7 @@ size_t RunQueryResponse::ByteSizeLong() const { this->transaction()); } - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -7510,22 +7500,22 @@ size_t RunQueryResponse::ByteSizeLong() const { } void RunQueryResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.RunQueryResponse) GOOGLE_DCHECK_NE(&from, this); const RunQueryResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.RunQueryResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.RunQueryResponse) MergeFrom(*source); } } void RunQueryResponse::MergeFrom(const RunQueryResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.RunQueryResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -7536,7 +7526,7 @@ void RunQueryResponse::MergeFrom(const RunQueryResponse& from) { transaction_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.transaction_); } if (from.has_document()) { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); } if (from.has_read_time()) { mutable_read_time()->::google::protobuf::Timestamp::MergeFrom(from.read_time()); @@ -7547,14 +7537,14 @@ void RunQueryResponse::MergeFrom(const RunQueryResponse& from) { } void RunQueryResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.RunQueryResponse) if (&from == this) return; Clear(); MergeFrom(from); } void RunQueryResponse::CopyFrom(const RunQueryResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.RunQueryResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.RunQueryResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -7579,8 +7569,8 @@ void RunQueryResponse::InternalSwap(RunQueryResponse* other) { } ::google::protobuf::Metadata RunQueryResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -7592,8 +7582,8 @@ void WriteRequest_LabelsEntry_DoNotUse::MergeFrom(const WriteRequest_LabelsEntry MergeFromInternal(other); } ::google::protobuf::Metadata WriteRequest_LabelsEntry_DoNotUse::GetMetadata() const { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[15]; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[15]; } void WriteRequest_LabelsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -7619,10 +7609,10 @@ const int WriteRequest::kLabelsFieldNumber; WriteRequest::WriteRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.WriteRequest) } WriteRequest::WriteRequest(const WriteRequest& from) : ::google::protobuf::Message(), @@ -7643,7 +7633,7 @@ WriteRequest::WriteRequest(const WriteRequest& from) if (from.stream_token().size() > 0) { stream_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.stream_token_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteRequest) } void WriteRequest::SharedCtor() { @@ -7654,7 +7644,7 @@ void WriteRequest::SharedCtor() { } WriteRequest::~WriteRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.WriteRequest) SharedDtor(); } @@ -7670,12 +7660,12 @@ void WriteRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* WriteRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const WriteRequest& WriteRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequest(); return *internal_default_instance(); } @@ -7688,7 +7678,7 @@ WriteRequest* WriteRequest::New(::google::protobuf::Arena* arena) const { } void WriteRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7705,7 +7695,7 @@ bool WriteRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -7720,7 +7710,7 @@ bool WriteRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.WriteRequest.database")); + "google.firestore.v1.WriteRequest.database")); } else { goto handle_unusual; } @@ -7736,14 +7726,14 @@ bool WriteRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.WriteRequest.stream_id")); + "google.firestore.v1.WriteRequest.stream_id")); } else { goto handle_unusual; } break; } - // repeated .google.firestore.v1beta1.Write writes = 3; + // repeated .google.firestore.v1.Write writes = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -7782,11 +7772,11 @@ bool WriteRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.key")); + "google.firestore.v1.WriteRequest.LabelsEntry.key")); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.value().data(), static_cast(parser.value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.value")); + "google.firestore.v1.WriteRequest.LabelsEntry.value")); } else { goto handle_unusual; } @@ -7805,17 +7795,17 @@ bool WriteRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteRequest) return false; #undef DO_ } void WriteRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7824,7 +7814,7 @@ void WriteRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.database"); + "google.firestore.v1.WriteRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } @@ -7834,12 +7824,12 @@ void WriteRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.stream_id"); + "google.firestore.v1.WriteRequest.stream_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->stream_id(), output); } - // repeated .google.firestore.v1beta1.Write writes = 3; + // repeated .google.firestore.v1.Write writes = 3; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -7863,11 +7853,11 @@ void WriteRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.key"); + "google.firestore.v1.WriteRequest.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.value"); + "google.firestore.v1.WriteRequest.LabelsEntry.value"); } }; @@ -7909,13 +7899,13 @@ void WriteRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteRequest) } ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -7924,7 +7914,7 @@ ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.database"); + "google.firestore.v1.WriteRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); @@ -7935,13 +7925,13 @@ ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.stream_id"); + "google.firestore.v1.WriteRequest.stream_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->stream_id(), target); } - // repeated .google.firestore.v1beta1.Write writes = 3; + // repeated .google.firestore.v1.Write writes = 3; for (unsigned int i = 0, n = static_cast(this->writes_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -7967,11 +7957,11 @@ ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.key"); + "google.firestore.v1.WriteRequest.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteRequest.LabelsEntry.value"); + "google.firestore.v1.WriteRequest.LabelsEntry.value"); } }; @@ -8017,12 +8007,12 @@ ::google::protobuf::uint8* WriteRequest::InternalSerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteRequest) return target; } size_t WriteRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -8030,7 +8020,7 @@ size_t WriteRequest::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Write writes = 3; + // repeated .google.firestore.v1.Write writes = 3; { unsigned int count = static_cast(this->writes_size()); total_size += 1UL * count; @@ -8084,22 +8074,22 @@ size_t WriteRequest::ByteSizeLong() const { } void WriteRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteRequest) GOOGLE_DCHECK_NE(&from, this); const WriteRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteRequest) MergeFrom(*source); } } void WriteRequest::MergeFrom(const WriteRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -8122,14 +8112,14 @@ void WriteRequest::MergeFrom(const WriteRequest& from) { } void WriteRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteRequest) if (&from == this) return; Clear(); MergeFrom(from); } void WriteRequest::CopyFrom(const WriteRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -8155,15 +8145,15 @@ void WriteRequest::InternalSwap(WriteRequest* other) { } ::google::protobuf::Metadata WriteRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void WriteResponse::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_WriteResponse_default_instance_._instance.get_mutable()->commit_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void WriteResponse::clear_write_results() { @@ -8185,10 +8175,10 @@ const int WriteResponse::kCommitTimeFieldNumber; WriteResponse::WriteResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResponse) } WriteResponse::WriteResponse(const WriteResponse& from) : ::google::protobuf::Message(), @@ -8209,7 +8199,7 @@ WriteResponse::WriteResponse(const WriteResponse& from) } else { commit_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResponse) } void WriteResponse::SharedCtor() { @@ -8220,7 +8210,7 @@ void WriteResponse::SharedCtor() { } WriteResponse::~WriteResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResponse) SharedDtor(); } @@ -8236,12 +8226,12 @@ void WriteResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* WriteResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const WriteResponse& WriteResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteResponse(); return *internal_default_instance(); } @@ -8254,7 +8244,7 @@ WriteResponse* WriteResponse::New(::google::protobuf::Arena* arena) const { } void WriteResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8273,7 +8263,7 @@ bool WriteResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -8288,7 +8278,7 @@ bool WriteResponse::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.WriteResponse.stream_id")); + "google.firestore.v1.WriteResponse.stream_id")); } else { goto handle_unusual; } @@ -8307,7 +8297,7 @@ bool WriteResponse::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.WriteResult write_results = 3; + // repeated .google.firestore.v1.WriteResult write_results = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -8342,17 +8332,17 @@ bool WriteResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteResponse) return false; #undef DO_ } void WriteResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8361,7 +8351,7 @@ void WriteResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteResponse.stream_id"); + "google.firestore.v1.WriteResponse.stream_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->stream_id(), output); } @@ -8372,7 +8362,7 @@ void WriteResponse::SerializeWithCachedSizes( 2, this->stream_token(), output); } - // repeated .google.firestore.v1beta1.WriteResult write_results = 3; + // repeated .google.firestore.v1.WriteResult write_results = 3; for (unsigned int i = 0, n = static_cast(this->write_results_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -8389,13 +8379,13 @@ void WriteResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteResponse) } ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8404,7 +8394,7 @@ ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArra ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->stream_id().data(), static_cast(this->stream_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.WriteResponse.stream_id"); + "google.firestore.v1.WriteResponse.stream_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->stream_id(), target); @@ -8417,7 +8407,7 @@ ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArra 2, this->stream_token(), target); } - // repeated .google.firestore.v1beta1.WriteResult write_results = 3; + // repeated .google.firestore.v1.WriteResult write_results = 3; for (unsigned int i = 0, n = static_cast(this->write_results_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -8436,12 +8426,12 @@ ::google::protobuf::uint8* WriteResponse::InternalSerializeWithCachedSizesToArra target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResponse) return target; } size_t WriteResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -8449,7 +8439,7 @@ size_t WriteResponse::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.WriteResult write_results = 3; + // repeated .google.firestore.v1.WriteResult write_results = 3; { unsigned int count = static_cast(this->write_results_size()); total_size += 1UL * count; @@ -8489,22 +8479,22 @@ size_t WriteResponse::ByteSizeLong() const { } void WriteResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResponse) GOOGLE_DCHECK_NE(&from, this); const WriteResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResponse) MergeFrom(*source); } } void WriteResponse::MergeFrom(const WriteResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -8525,14 +8515,14 @@ void WriteResponse::MergeFrom(const WriteResponse& from) { } void WriteResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResponse) if (&from == this) return; Clear(); MergeFrom(from); } void WriteResponse::CopyFrom(const WriteResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -8557,8 +8547,8 @@ void WriteResponse::InternalSwap(WriteResponse* other) { } ::google::protobuf::Metadata WriteResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -8570,8 +8560,8 @@ void ListenRequest_LabelsEntry_DoNotUse::MergeFrom(const ListenRequest_LabelsEnt MergeFromInternal(other); } ::google::protobuf::Metadata ListenRequest_LabelsEntry_DoNotUse::GetMetadata() const { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[18]; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[18]; } void ListenRequest_LabelsEntry_DoNotUse::MergeFrom( const ::google::protobuf::Message& other) { @@ -8582,11 +8572,11 @@ void ListenRequest_LabelsEntry_DoNotUse::MergeFrom( // =================================================================== void ListenRequest::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1beta1::Target*>( - ::google::firestore::v1beta1::Target::internal_default_instance()); - ::google::firestore::v1beta1::_ListenRequest_default_instance_.remove_target_ = 0; + ::google::firestore::v1::_ListenRequest_default_instance_.add_target_ = const_cast< ::google::firestore::v1::Target*>( + ::google::firestore::v1::Target::internal_default_instance()); + ::google::firestore::v1::_ListenRequest_default_instance_.remove_target_ = 0; } -void ListenRequest::set_allocated_add_target(::google::firestore::v1beta1::Target* add_target) { +void ListenRequest::set_allocated_add_target(::google::firestore::v1::Target* add_target) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_target_change(); if (add_target) { @@ -8598,7 +8588,7 @@ void ListenRequest::set_allocated_add_target(::google::firestore::v1beta1::Targe set_has_add_target(); target_change_.add_target_ = add_target; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenRequest.add_target) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenRequest.add_target) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int ListenRequest::kDatabaseFieldNumber; @@ -8610,10 +8600,10 @@ const int ListenRequest::kLabelsFieldNumber; ListenRequest::ListenRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListenRequest) } ListenRequest::ListenRequest(const ListenRequest& from) : ::google::protobuf::Message(), @@ -8628,7 +8618,7 @@ ListenRequest::ListenRequest(const ListenRequest& from) clear_has_target_change(); switch (from.target_change_case()) { case kAddTarget: { - mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target()); + mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target()); break; } case kRemoveTarget: { @@ -8639,7 +8629,7 @@ ListenRequest::ListenRequest(const ListenRequest& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenRequest) } void ListenRequest::SharedCtor() { @@ -8649,7 +8639,7 @@ void ListenRequest::SharedCtor() { } ListenRequest::~ListenRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListenRequest) SharedDtor(); } @@ -8666,12 +8656,12 @@ void ListenRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListenRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListenRequest& ListenRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequest(); return *internal_default_instance(); } @@ -8684,7 +8674,7 @@ ListenRequest* ListenRequest::New(::google::protobuf::Arena* arena) const { } void ListenRequest::clear_target_change() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenRequest) switch (target_change_case()) { case kAddTarget: { delete target_change_.add_target_; @@ -8703,7 +8693,7 @@ void ListenRequest::clear_target_change() { void ListenRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -8718,7 +8708,7 @@ bool ListenRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -8733,14 +8723,14 @@ bool ListenRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListenRequest.database")); + "google.firestore.v1.ListenRequest.database")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.Target add_target = 2; + // .google.firestore.v1.Target add_target = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -8783,11 +8773,11 @@ bool ListenRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.key().data(), static_cast(parser.key().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.key")); + "google.firestore.v1.ListenRequest.LabelsEntry.key")); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( parser.value().data(), static_cast(parser.value().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.value")); + "google.firestore.v1.ListenRequest.LabelsEntry.value")); } else { goto handle_unusual; } @@ -8806,17 +8796,17 @@ bool ListenRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenRequest) return false; #undef DO_ } void ListenRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8825,12 +8815,12 @@ void ListenRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.database"); + "google.firestore.v1.ListenRequest.database"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->database(), output); } - // .google.firestore.v1beta1.Target add_target = 2; + // .google.firestore.v1.Target add_target = 2; if (has_add_target()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *target_change_.add_target_, output); @@ -8852,11 +8842,11 @@ void ListenRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.key"); + "google.firestore.v1.ListenRequest.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.value"); + "google.firestore.v1.ListenRequest.LabelsEntry.value"); } }; @@ -8898,13 +8888,13 @@ void ListenRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenRequest) } ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -8913,13 +8903,13 @@ ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArra ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->database().data(), static_cast(this->database().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.database"); + "google.firestore.v1.ListenRequest.database"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->database(), target); } - // .google.firestore.v1beta1.Target add_target = 2; + // .google.firestore.v1.Target add_target = 2; if (has_add_target()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -8942,11 +8932,11 @@ ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArra ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->first.data(), static_cast(p->first.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.key"); + "google.firestore.v1.ListenRequest.LabelsEntry.key"); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( p->second.data(), static_cast(p->second.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListenRequest.LabelsEntry.value"); + "google.firestore.v1.ListenRequest.LabelsEntry.value"); } }; @@ -8992,12 +8982,12 @@ ::google::protobuf::uint8* ListenRequest::InternalSerializeWithCachedSizesToArra target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenRequest) return target; } size_t ListenRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -9027,7 +9017,7 @@ size_t ListenRequest::ByteSizeLong() const { } switch (target_change_case()) { - // .google.firestore.v1beta1.Target add_target = 2; + // .google.firestore.v1.Target add_target = 2; case kAddTarget: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -9053,22 +9043,22 @@ size_t ListenRequest::ByteSizeLong() const { } void ListenRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenRequest) GOOGLE_DCHECK_NE(&from, this); const ListenRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenRequest) MergeFrom(*source); } } void ListenRequest::MergeFrom(const ListenRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -9081,7 +9071,7 @@ void ListenRequest::MergeFrom(const ListenRequest& from) { } switch (from.target_change_case()) { case kAddTarget: { - mutable_add_target()->::google::firestore::v1beta1::Target::MergeFrom(from.add_target()); + mutable_add_target()->::google::firestore::v1::Target::MergeFrom(from.add_target()); break; } case kRemoveTarget: { @@ -9095,14 +9085,14 @@ void ListenRequest::MergeFrom(const ListenRequest& from) { } void ListenRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListenRequest::CopyFrom(const ListenRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -9127,26 +9117,26 @@ void ListenRequest::InternalSwap(ListenRequest* other) { } ::google::protobuf::Metadata ListenRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void ListenResponse::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1beta1::TargetChange*>( - ::google::firestore::v1beta1::TargetChange::internal_default_instance()); - ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1beta1::DocumentChange*>( - ::google::firestore::v1beta1::DocumentChange::internal_default_instance()); - ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1beta1::DocumentDelete*>( - ::google::firestore::v1beta1::DocumentDelete::internal_default_instance()); - ::google::firestore::v1beta1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1beta1::DocumentRemove*>( - ::google::firestore::v1beta1::DocumentRemove::internal_default_instance()); - ::google::firestore::v1beta1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1beta1::ExistenceFilter*>( - ::google::firestore::v1beta1::ExistenceFilter::internal_default_instance()); -} -void ListenResponse::set_allocated_target_change(::google::firestore::v1beta1::TargetChange* target_change) { + ::google::firestore::v1::_ListenResponse_default_instance_.target_change_ = const_cast< ::google::firestore::v1::TargetChange*>( + ::google::firestore::v1::TargetChange::internal_default_instance()); + ::google::firestore::v1::_ListenResponse_default_instance_.document_change_ = const_cast< ::google::firestore::v1::DocumentChange*>( + ::google::firestore::v1::DocumentChange::internal_default_instance()); + ::google::firestore::v1::_ListenResponse_default_instance_.document_delete_ = const_cast< ::google::firestore::v1::DocumentDelete*>( + ::google::firestore::v1::DocumentDelete::internal_default_instance()); + ::google::firestore::v1::_ListenResponse_default_instance_.document_remove_ = const_cast< ::google::firestore::v1::DocumentRemove*>( + ::google::firestore::v1::DocumentRemove::internal_default_instance()); + ::google::firestore::v1::_ListenResponse_default_instance_.filter_ = const_cast< ::google::firestore::v1::ExistenceFilter*>( + ::google::firestore::v1::ExistenceFilter::internal_default_instance()); +} +void ListenResponse::set_allocated_target_change(::google::firestore::v1::TargetChange* target_change) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_response_type(); if (target_change) { @@ -9158,9 +9148,9 @@ void ListenResponse::set_allocated_target_change(::google::firestore::v1beta1::T set_has_target_change(); response_type_.target_change_ = target_change; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.target_change) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.target_change) } -void ListenResponse::set_allocated_document_change(::google::firestore::v1beta1::DocumentChange* document_change) { +void ListenResponse::set_allocated_document_change(::google::firestore::v1::DocumentChange* document_change) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_response_type(); if (document_change) { @@ -9172,7 +9162,7 @@ void ListenResponse::set_allocated_document_change(::google::firestore::v1beta1: set_has_document_change(); response_type_.document_change_ = document_change; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_change) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_change) } void ListenResponse::clear_document_change() { if (has_document_change()) { @@ -9180,7 +9170,7 @@ void ListenResponse::clear_document_change() { clear_has_response_type(); } } -void ListenResponse::set_allocated_document_delete(::google::firestore::v1beta1::DocumentDelete* document_delete) { +void ListenResponse::set_allocated_document_delete(::google::firestore::v1::DocumentDelete* document_delete) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_response_type(); if (document_delete) { @@ -9192,7 +9182,7 @@ void ListenResponse::set_allocated_document_delete(::google::firestore::v1beta1: set_has_document_delete(); response_type_.document_delete_ = document_delete; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_delete) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_delete) } void ListenResponse::clear_document_delete() { if (has_document_delete()) { @@ -9200,7 +9190,7 @@ void ListenResponse::clear_document_delete() { clear_has_response_type(); } } -void ListenResponse::set_allocated_document_remove(::google::firestore::v1beta1::DocumentRemove* document_remove) { +void ListenResponse::set_allocated_document_remove(::google::firestore::v1::DocumentRemove* document_remove) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_response_type(); if (document_remove) { @@ -9212,7 +9202,7 @@ void ListenResponse::set_allocated_document_remove(::google::firestore::v1beta1: set_has_document_remove(); response_type_.document_remove_ = document_remove; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.document_remove) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.document_remove) } void ListenResponse::clear_document_remove() { if (has_document_remove()) { @@ -9220,7 +9210,7 @@ void ListenResponse::clear_document_remove() { clear_has_response_type(); } } -void ListenResponse::set_allocated_filter(::google::firestore::v1beta1::ExistenceFilter* filter) { +void ListenResponse::set_allocated_filter(::google::firestore::v1::ExistenceFilter* filter) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_response_type(); if (filter) { @@ -9232,7 +9222,7 @@ void ListenResponse::set_allocated_filter(::google::firestore::v1beta1::Existenc set_has_filter(); response_type_.filter_ = filter; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenResponse.filter) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenResponse.filter) } void ListenResponse::clear_filter() { if (has_filter()) { @@ -9251,10 +9241,10 @@ const int ListenResponse::kFilterFieldNumber; ListenResponse::ListenResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListenResponse) } ListenResponse::ListenResponse(const ListenResponse& from) : ::google::protobuf::Message(), @@ -9264,30 +9254,30 @@ ListenResponse::ListenResponse(const ListenResponse& from) clear_has_response_type(); switch (from.response_type_case()) { case kTargetChange: { - mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change()); + mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change()); break; } case kDocumentChange: { - mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change()); + mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change()); break; } case kDocumentDelete: { - mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete()); + mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete()); break; } case kDocumentRemove: { - mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove()); + mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove()); break; } case kFilter: { - mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter()); + mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter()); break; } case RESPONSE_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListenResponse) } void ListenResponse::SharedCtor() { @@ -9296,7 +9286,7 @@ void ListenResponse::SharedCtor() { } ListenResponse::~ListenResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListenResponse) SharedDtor(); } @@ -9312,12 +9302,12 @@ void ListenResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListenResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListenResponse& ListenResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenResponse(); return *internal_default_instance(); } @@ -9330,7 +9320,7 @@ ListenResponse* ListenResponse::New(::google::protobuf::Arena* arena) const { } void ListenResponse::clear_response_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.ListenResponse) switch (response_type_case()) { case kTargetChange: { delete response_type_.target_change_; @@ -9361,7 +9351,7 @@ void ListenResponse::clear_response_type() { void ListenResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListenResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -9374,13 +9364,13 @@ bool ListenResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListenResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.TargetChange target_change = 2; + // .google.firestore.v1.TargetChange target_change = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -9392,7 +9382,7 @@ bool ListenResponse::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentChange document_change = 3; + // .google.firestore.v1.DocumentChange document_change = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -9404,7 +9394,7 @@ bool ListenResponse::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentDelete document_delete = 4; + // .google.firestore.v1.DocumentDelete document_delete = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -9416,7 +9406,7 @@ bool ListenResponse::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.ExistenceFilter filter = 5; + // .google.firestore.v1.ExistenceFilter filter = 5; case 5: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { @@ -9428,7 +9418,7 @@ bool ListenResponse::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentRemove document_remove = 6; + // .google.firestore.v1.DocumentRemove document_remove = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -9452,45 +9442,45 @@ bool ListenResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListenResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListenResponse) return false; #undef DO_ } void ListenResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListenResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TargetChange target_change = 2; + // .google.firestore.v1.TargetChange target_change = 2; if (has_target_change()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *response_type_.target_change_, output); } - // .google.firestore.v1beta1.DocumentChange document_change = 3; + // .google.firestore.v1.DocumentChange document_change = 3; if (has_document_change()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *response_type_.document_change_, output); } - // .google.firestore.v1beta1.DocumentDelete document_delete = 4; + // .google.firestore.v1.DocumentDelete document_delete = 4; if (has_document_delete()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *response_type_.document_delete_, output); } - // .google.firestore.v1beta1.ExistenceFilter filter = 5; + // .google.firestore.v1.ExistenceFilter filter = 5; if (has_filter()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 5, *response_type_.filter_, output); } - // .google.firestore.v1beta1.DocumentRemove document_remove = 6; + // .google.firestore.v1.DocumentRemove document_remove = 6; if (has_document_remove()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *response_type_.document_remove_, output); @@ -9500,45 +9490,45 @@ void ListenResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListenResponse) } ::google::protobuf::uint8* ListenResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListenResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TargetChange target_change = 2; + // .google.firestore.v1.TargetChange target_change = 2; if (has_target_change()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, *response_type_.target_change_, deterministic, target); } - // .google.firestore.v1beta1.DocumentChange document_change = 3; + // .google.firestore.v1.DocumentChange document_change = 3; if (has_document_change()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, *response_type_.document_change_, deterministic, target); } - // .google.firestore.v1beta1.DocumentDelete document_delete = 4; + // .google.firestore.v1.DocumentDelete document_delete = 4; if (has_document_delete()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, *response_type_.document_delete_, deterministic, target); } - // .google.firestore.v1beta1.ExistenceFilter filter = 5; + // .google.firestore.v1.ExistenceFilter filter = 5; if (has_filter()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 5, *response_type_.filter_, deterministic, target); } - // .google.firestore.v1beta1.DocumentRemove document_remove = 6; + // .google.firestore.v1.DocumentRemove document_remove = 6; if (has_document_remove()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -9549,12 +9539,12 @@ ::google::protobuf::uint8* ListenResponse::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListenResponse) return target; } size_t ListenResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListenResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -9563,35 +9553,35 @@ size_t ListenResponse::ByteSizeLong() const { (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } switch (response_type_case()) { - // .google.firestore.v1beta1.TargetChange target_change = 2; + // .google.firestore.v1.TargetChange target_change = 2; case kTargetChange: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *response_type_.target_change_); break; } - // .google.firestore.v1beta1.DocumentChange document_change = 3; + // .google.firestore.v1.DocumentChange document_change = 3; case kDocumentChange: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *response_type_.document_change_); break; } - // .google.firestore.v1beta1.DocumentDelete document_delete = 4; + // .google.firestore.v1.DocumentDelete document_delete = 4; case kDocumentDelete: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *response_type_.document_delete_); break; } - // .google.firestore.v1beta1.DocumentRemove document_remove = 6; + // .google.firestore.v1.DocumentRemove document_remove = 6; case kDocumentRemove: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *response_type_.document_remove_); break; } - // .google.firestore.v1beta1.ExistenceFilter filter = 5; + // .google.firestore.v1.ExistenceFilter filter = 5; case kFilter: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -9610,22 +9600,22 @@ size_t ListenResponse::ByteSizeLong() const { } void ListenResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListenResponse) GOOGLE_DCHECK_NE(&from, this); const ListenResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListenResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListenResponse) MergeFrom(*source); } } void ListenResponse::MergeFrom(const ListenResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListenResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -9633,23 +9623,23 @@ void ListenResponse::MergeFrom(const ListenResponse& from) { switch (from.response_type_case()) { case kTargetChange: { - mutable_target_change()->::google::firestore::v1beta1::TargetChange::MergeFrom(from.target_change()); + mutable_target_change()->::google::firestore::v1::TargetChange::MergeFrom(from.target_change()); break; } case kDocumentChange: { - mutable_document_change()->::google::firestore::v1beta1::DocumentChange::MergeFrom(from.document_change()); + mutable_document_change()->::google::firestore::v1::DocumentChange::MergeFrom(from.document_change()); break; } case kDocumentDelete: { - mutable_document_delete()->::google::firestore::v1beta1::DocumentDelete::MergeFrom(from.document_delete()); + mutable_document_delete()->::google::firestore::v1::DocumentDelete::MergeFrom(from.document_delete()); break; } case kDocumentRemove: { - mutable_document_remove()->::google::firestore::v1beta1::DocumentRemove::MergeFrom(from.document_remove()); + mutable_document_remove()->::google::firestore::v1::DocumentRemove::MergeFrom(from.document_remove()); break; } case kFilter: { - mutable_filter()->::google::firestore::v1beta1::ExistenceFilter::MergeFrom(from.filter()); + mutable_filter()->::google::firestore::v1::ExistenceFilter::MergeFrom(from.filter()); break; } case RESPONSE_TYPE_NOT_SET: { @@ -9659,14 +9649,14 @@ void ListenResponse::MergeFrom(const ListenResponse& from) { } void ListenResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListenResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListenResponse::CopyFrom(const ListenResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListenResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListenResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -9689,8 +9679,8 @@ void ListenResponse::InternalSwap(ListenResponse* other) { } ::google::protobuf::Metadata ListenResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -9705,10 +9695,10 @@ const int Target_DocumentsTarget::kDocumentsFieldNumber; Target_DocumentsTarget::Target_DocumentsTarget() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(constructor:google.firestore.v1.Target.DocumentsTarget) } Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& from) : ::google::protobuf::Message(), @@ -9716,7 +9706,7 @@ Target_DocumentsTarget::Target_DocumentsTarget(const Target_DocumentsTarget& fro documents_(from.documents_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.DocumentsTarget) } void Target_DocumentsTarget::SharedCtor() { @@ -9724,7 +9714,7 @@ void Target_DocumentsTarget::SharedCtor() { } Target_DocumentsTarget::~Target_DocumentsTarget() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(destructor:google.firestore.v1.Target.DocumentsTarget) SharedDtor(); } @@ -9737,12 +9727,12 @@ void Target_DocumentsTarget::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Target_DocumentsTarget::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Target_DocumentsTarget& Target_DocumentsTarget::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTarget(); return *internal_default_instance(); } @@ -9755,7 +9745,7 @@ Target_DocumentsTarget* Target_DocumentsTarget::New(::google::protobuf::Arena* a } void Target_DocumentsTarget::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.DocumentsTarget) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -9768,7 +9758,7 @@ bool Target_DocumentsTarget::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.DocumentsTarget) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -9784,7 +9774,7 @@ bool Target_DocumentsTarget::MergePartialFromCodedStream( this->documents(this->documents_size() - 1).data(), static_cast(this->documents(this->documents_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Target.DocumentsTarget.documents")); + "google.firestore.v1.Target.DocumentsTarget.documents")); } else { goto handle_unusual; } @@ -9803,17 +9793,17 @@ bool Target_DocumentsTarget::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.DocumentsTarget) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.DocumentsTarget) return false; #undef DO_ } void Target_DocumentsTarget::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.DocumentsTarget) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -9822,7 +9812,7 @@ void Target_DocumentsTarget::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->documents(i).data(), static_cast(this->documents(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Target.DocumentsTarget.documents"); + "google.firestore.v1.Target.DocumentsTarget.documents"); ::google::protobuf::internal::WireFormatLite::WriteString( 2, this->documents(i), output); } @@ -9831,13 +9821,13 @@ void Target_DocumentsTarget::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.DocumentsTarget) } ::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.DocumentsTarget) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -9846,7 +9836,7 @@ ::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSi ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->documents(i).data(), static_cast(this->documents(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Target.DocumentsTarget.documents"); + "google.firestore.v1.Target.DocumentsTarget.documents"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(2, this->documents(i), target); } @@ -9855,12 +9845,12 @@ ::google::protobuf::uint8* Target_DocumentsTarget::InternalSerializeWithCachedSi target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.DocumentsTarget) return target; } size_t Target_DocumentsTarget::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.DocumentsTarget) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -9884,22 +9874,22 @@ size_t Target_DocumentsTarget::ByteSizeLong() const { } void Target_DocumentsTarget::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.DocumentsTarget) GOOGLE_DCHECK_NE(&from, this); const Target_DocumentsTarget* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.DocumentsTarget) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.DocumentsTarget) MergeFrom(*source); } } void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.DocumentsTarget) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -9909,14 +9899,14 @@ void Target_DocumentsTarget::MergeFrom(const Target_DocumentsTarget& from) { } void Target_DocumentsTarget::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.DocumentsTarget) if (&from == this) return; Clear(); MergeFrom(from); } void Target_DocumentsTarget::CopyFrom(const Target_DocumentsTarget& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.DocumentsTarget) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.DocumentsTarget) if (&from == this) return; Clear(); MergeFrom(from); @@ -9938,18 +9928,18 @@ void Target_DocumentsTarget::InternalSwap(Target_DocumentsTarget* other) { } ::google::protobuf::Metadata Target_DocumentsTarget::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Target_QueryTarget::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1beta1::StructuredQuery*>( - ::google::firestore::v1beta1::StructuredQuery::internal_default_instance()); + ::google::firestore::v1::_Target_QueryTarget_default_instance_.structured_query_ = const_cast< ::google::firestore::v1::StructuredQuery*>( + ::google::firestore::v1::StructuredQuery::internal_default_instance()); } -void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query) { +void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_query_type(); if (structured_query) { @@ -9961,7 +9951,7 @@ void Target_QueryTarget::set_allocated_structured_query(::google::firestore::v1b set_has_structured_query(); query_type_.structured_query_ = structured_query; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.QueryTarget.structured_query) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.QueryTarget.structured_query) } void Target_QueryTarget::clear_structured_query() { if (has_structured_query()) { @@ -9977,10 +9967,10 @@ const int Target_QueryTarget::kStructuredQueryFieldNumber; Target_QueryTarget::Target_QueryTarget() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(constructor:google.firestore.v1.Target.QueryTarget) } Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from) : ::google::protobuf::Message(), @@ -9994,14 +9984,14 @@ Target_QueryTarget::Target_QueryTarget(const Target_QueryTarget& from) clear_has_query_type(); switch (from.query_type_case()) { case kStructuredQuery: { - mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query()); + mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query()); break; } case QUERY_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target.QueryTarget) } void Target_QueryTarget::SharedCtor() { @@ -10011,7 +10001,7 @@ void Target_QueryTarget::SharedCtor() { } Target_QueryTarget::~Target_QueryTarget() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(destructor:google.firestore.v1.Target.QueryTarget) SharedDtor(); } @@ -10028,12 +10018,12 @@ void Target_QueryTarget::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Target_QueryTarget::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Target_QueryTarget& Target_QueryTarget::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTarget(); return *internal_default_instance(); } @@ -10046,7 +10036,7 @@ Target_QueryTarget* Target_QueryTarget::New(::google::protobuf::Arena* arena) co } void Target_QueryTarget::clear_query_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target.QueryTarget) switch (query_type_case()) { case kStructuredQuery: { delete query_type_.structured_query_; @@ -10061,7 +10051,7 @@ void Target_QueryTarget::clear_query_type() { void Target_QueryTarget::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target.QueryTarget) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10075,7 +10065,7 @@ bool Target_QueryTarget::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Target.QueryTarget) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -10090,14 +10080,14 @@ bool Target_QueryTarget::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Target.QueryTarget.parent")); + "google.firestore.v1.Target.QueryTarget.parent")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -10121,17 +10111,17 @@ bool Target_QueryTarget::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Target.QueryTarget) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target.QueryTarget) return false; #undef DO_ } void Target_QueryTarget::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target.QueryTarget) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10140,12 +10130,12 @@ void Target_QueryTarget::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Target.QueryTarget.parent"); + "google.firestore.v1.Target.QueryTarget.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->parent(), output); } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; if (has_structured_query()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *query_type_.structured_query_, output); @@ -10155,13 +10145,13 @@ void Target_QueryTarget::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target.QueryTarget) } ::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target.QueryTarget) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -10170,13 +10160,13 @@ ::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesT ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Target.QueryTarget.parent"); + "google.firestore.v1.Target.QueryTarget.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->parent(), target); } - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; if (has_structured_query()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -10187,12 +10177,12 @@ ::google::protobuf::uint8* Target_QueryTarget::InternalSerializeWithCachedSizesT target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target.QueryTarget) return target; } size_t Target_QueryTarget::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target.QueryTarget) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -10208,7 +10198,7 @@ size_t Target_QueryTarget::ByteSizeLong() const { } switch (query_type_case()) { - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; case kStructuredQuery: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -10227,22 +10217,22 @@ size_t Target_QueryTarget::ByteSizeLong() const { } void Target_QueryTarget::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target.QueryTarget) GOOGLE_DCHECK_NE(&from, this); const Target_QueryTarget* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target.QueryTarget) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target.QueryTarget) MergeFrom(*source); } } void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target.QueryTarget) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -10254,7 +10244,7 @@ void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) { } switch (from.query_type_case()) { case kStructuredQuery: { - mutable_structured_query()->::google::firestore::v1beta1::StructuredQuery::MergeFrom(from.structured_query()); + mutable_structured_query()->::google::firestore::v1::StructuredQuery::MergeFrom(from.structured_query()); break; } case QUERY_TYPE_NOT_SET: { @@ -10264,14 +10254,14 @@ void Target_QueryTarget::MergeFrom(const Target_QueryTarget& from) { } void Target_QueryTarget::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target.QueryTarget) if (&from == this) return; Clear(); MergeFrom(from); } void Target_QueryTarget::CopyFrom(const Target_QueryTarget& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target.QueryTarget) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target.QueryTarget) if (&from == this) return; Clear(); MergeFrom(from); @@ -10295,24 +10285,24 @@ void Target_QueryTarget::InternalSwap(Target_QueryTarget* other) { } ::google::protobuf::Metadata Target_QueryTarget::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void Target::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1beta1::Target_QueryTarget*>( - ::google::firestore::v1beta1::Target_QueryTarget::internal_default_instance()); - ::google::firestore::v1beta1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>( - ::google::firestore::v1beta1::Target_DocumentsTarget::internal_default_instance()); - ::google::firestore::v1beta1::_Target_default_instance_.resume_token_.UnsafeSetDefault( + ::google::firestore::v1::_Target_default_instance_.query_ = const_cast< ::google::firestore::v1::Target_QueryTarget*>( + ::google::firestore::v1::Target_QueryTarget::internal_default_instance()); + ::google::firestore::v1::_Target_default_instance_.documents_ = const_cast< ::google::firestore::v1::Target_DocumentsTarget*>( + ::google::firestore::v1::Target_DocumentsTarget::internal_default_instance()); + ::google::firestore::v1::_Target_default_instance_.resume_token_.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_Target_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_Target_default_instance_.read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } -void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* query) { +void Target::set_allocated_query(::google::firestore::v1::Target_QueryTarget* query) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_target_type(); if (query) { @@ -10324,9 +10314,9 @@ void Target::set_allocated_query(::google::firestore::v1beta1::Target_QueryTarge set_has_query(); target_type_.query_ = query; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.query) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.query) } -void Target::set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* documents) { +void Target::set_allocated_documents(::google::firestore::v1::Target_DocumentsTarget* documents) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_target_type(); if (documents) { @@ -10338,7 +10328,7 @@ void Target::set_allocated_documents(::google::firestore::v1beta1::Target_Docume set_has_documents(); target_type_.documents_ = documents; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.documents) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.documents) } void Target::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); @@ -10353,7 +10343,7 @@ void Target::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { set_has_read_time(); resume_type_.read_time_ = read_time; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.read_time) } void Target::clear_read_time() { if (has_read_time()) { @@ -10373,10 +10363,10 @@ const int Target::kOnceFieldNumber; Target::Target() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(constructor:google.firestore.v1.Target) } Target::Target(const Target& from) : ::google::protobuf::Message(), @@ -10389,11 +10379,11 @@ Target::Target(const Target& from) clear_has_target_type(); switch (from.target_type_case()) { case kQuery: { - mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query()); + mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query()); break; } case kDocuments: { - mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents()); + mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents()); break; } case TARGET_TYPE_NOT_SET: { @@ -10414,7 +10404,7 @@ Target::Target(const Target& from) break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Target) } void Target::SharedCtor() { @@ -10427,7 +10417,7 @@ void Target::SharedCtor() { } Target::~Target() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(destructor:google.firestore.v1.Target) SharedDtor(); } @@ -10446,12 +10436,12 @@ void Target::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Target::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Target& Target::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget(); return *internal_default_instance(); } @@ -10464,7 +10454,7 @@ Target* Target::New(::google::protobuf::Arena* arena) const { } void Target::clear_target_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target) switch (target_type_case()) { case kQuery: { delete target_type_.query_; @@ -10482,7 +10472,7 @@ void Target::clear_target_type() { } void Target::clear_resume_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Target) switch (resume_type_case()) { case kResumeToken: { resume_type_.resume_token_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -10501,7 +10491,7 @@ void Target::clear_resume_type() { void Target::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Target) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -10518,13 +10508,13 @@ bool Target::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Target) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Target.QueryTarget query = 2; + // .google.firestore.v1.Target.QueryTarget query = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -10536,7 +10526,7 @@ bool Target::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; + // .google.firestore.v1.Target.DocumentsTarget documents = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -10612,27 +10602,27 @@ bool Target::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Target) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Target) return false; #undef DO_ } void Target::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Target) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Target.QueryTarget query = 2; + // .google.firestore.v1.Target.QueryTarget query = 2; if (has_query()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *target_type_.query_, output); } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; + // .google.firestore.v1.Target.DocumentsTarget documents = 3; if (has_documents()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *target_type_.documents_, output); @@ -10664,24 +10654,24 @@ void Target::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Target) } ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Target) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Target.QueryTarget query = 2; + // .google.firestore.v1.Target.QueryTarget query = 2; if (has_query()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, *target_type_.query_, deterministic, target); } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; + // .google.firestore.v1.Target.DocumentsTarget documents = 3; if (has_documents()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -10716,12 +10706,12 @@ ::google::protobuf::uint8* Target::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Target) return target; } size_t Target::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Target) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -10742,14 +10732,14 @@ size_t Target::ByteSizeLong() const { } switch (target_type_case()) { - // .google.firestore.v1beta1.Target.QueryTarget query = 2; + // .google.firestore.v1.Target.QueryTarget query = 2; case kQuery: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *target_type_.query_); break; } - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; + // .google.firestore.v1.Target.DocumentsTarget documents = 3; case kDocuments: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -10787,22 +10777,22 @@ size_t Target::ByteSizeLong() const { } void Target::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Target) GOOGLE_DCHECK_NE(&from, this); const Target* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Target) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Target) MergeFrom(*source); } } void Target::MergeFrom(const Target& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Target) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -10816,11 +10806,11 @@ void Target::MergeFrom(const Target& from) { } switch (from.target_type_case()) { case kQuery: { - mutable_query()->::google::firestore::v1beta1::Target_QueryTarget::MergeFrom(from.query()); + mutable_query()->::google::firestore::v1::Target_QueryTarget::MergeFrom(from.query()); break; } case kDocuments: { - mutable_documents()->::google::firestore::v1beta1::Target_DocumentsTarget::MergeFrom(from.documents()); + mutable_documents()->::google::firestore::v1::Target_DocumentsTarget::MergeFrom(from.documents()); break; } case TARGET_TYPE_NOT_SET: { @@ -10843,14 +10833,14 @@ void Target::MergeFrom(const Target& from) { } void Target::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Target) if (&from == this) return; Clear(); MergeFrom(from); } void Target::CopyFrom(const Target& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Target) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Target) if (&from == this) return; Clear(); MergeFrom(from); @@ -10877,17 +10867,17 @@ void Target::InternalSwap(Target* other) { } ::google::protobuf::Metadata Target::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void TargetChange::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>( + ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->cause_ = const_cast< ::google::rpc::Status*>( ::google::rpc::Status::internal_default_instance()); - ::google::firestore::v1beta1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_TargetChange_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void TargetChange::clear_cause() { @@ -10913,10 +10903,10 @@ const int TargetChange::kReadTimeFieldNumber; TargetChange::TargetChange() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(constructor:google.firestore.v1.TargetChange) } TargetChange::TargetChange(const TargetChange& from) : ::google::protobuf::Message(), @@ -10939,7 +10929,7 @@ TargetChange::TargetChange(const TargetChange& from) read_time_ = NULL; } target_change_type_ = from.target_change_type_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.TargetChange) } void TargetChange::SharedCtor() { @@ -10951,7 +10941,7 @@ void TargetChange::SharedCtor() { } TargetChange::~TargetChange() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(destructor:google.firestore.v1.TargetChange) SharedDtor(); } @@ -10967,12 +10957,12 @@ void TargetChange::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* TargetChange::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const TargetChange& TargetChange::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChange(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChange(); return *internal_default_instance(); } @@ -10985,7 +10975,7 @@ TargetChange* TargetChange::New(::google::protobuf::Arena* arena) const { } void TargetChange::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.TargetChange) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11008,13 +10998,13 @@ bool TargetChange::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(parse_start:google.firestore.v1.TargetChange) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; + // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { @@ -11022,7 +11012,7 @@ bool TargetChange::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_target_change_type(static_cast< ::google::firestore::v1beta1::TargetChange_TargetChangeType >(value)); + set_target_change_type(static_cast< ::google::firestore::v1::TargetChange_TargetChangeType >(value)); } else { goto handle_unusual; } @@ -11096,21 +11086,21 @@ bool TargetChange::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(parse_success:google.firestore.v1.TargetChange) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.TargetChange) return false; #undef DO_ } void TargetChange::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.TargetChange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; + // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; if (this->target_change_type() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->target_change_type(), output); @@ -11149,17 +11139,17 @@ void TargetChange::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.TargetChange) } ::google::protobuf::uint8* TargetChange::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.TargetChange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; + // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; if (this->target_change_type() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->target_change_type(), target); @@ -11203,12 +11193,12 @@ ::google::protobuf::uint8* TargetChange::InternalSerializeWithCachedSizesToArray target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.TargetChange) return target; } size_t TargetChange::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.TargetChange) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -11253,7 +11243,7 @@ size_t TargetChange::ByteSizeLong() const { *this->read_time_); } - // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; + // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; if (this->target_change_type() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->target_change_type()); @@ -11267,22 +11257,22 @@ size_t TargetChange::ByteSizeLong() const { } void TargetChange::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.TargetChange) GOOGLE_DCHECK_NE(&from, this); const TargetChange* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.TargetChange) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.TargetChange) MergeFrom(*source); } } void TargetChange::MergeFrom(const TargetChange& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.TargetChange) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -11305,14 +11295,14 @@ void TargetChange::MergeFrom(const TargetChange& from) { } void TargetChange::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.TargetChange) if (&from == this) return; Clear(); MergeFrom(from); } void TargetChange::CopyFrom(const TargetChange& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.TargetChange) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.TargetChange) if (&from == this) return; Clear(); MergeFrom(from); @@ -11338,8 +11328,8 @@ void TargetChange::InternalSwap(TargetChange* other) { } ::google::protobuf::Metadata TargetChange::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -11356,10 +11346,10 @@ const int ListCollectionIdsRequest::kPageTokenFieldNumber; ListCollectionIdsRequest::ListCollectionIdsRequest() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsRequest) } ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsRequest& from) : ::google::protobuf::Message(), @@ -11375,7 +11365,7 @@ ListCollectionIdsRequest::ListCollectionIdsRequest(const ListCollectionIdsReques page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.page_token_); } page_size_ = from.page_size_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsRequest) } void ListCollectionIdsRequest::SharedCtor() { @@ -11386,7 +11376,7 @@ void ListCollectionIdsRequest::SharedCtor() { } ListCollectionIdsRequest::~ListCollectionIdsRequest() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsRequest) SharedDtor(); } @@ -11401,12 +11391,12 @@ void ListCollectionIdsRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListCollectionIdsRequest::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListCollectionIdsRequest& ListCollectionIdsRequest::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequest(); return *internal_default_instance(); } @@ -11419,7 +11409,7 @@ ListCollectionIdsRequest* ListCollectionIdsRequest::New(::google::protobuf::Aren } void ListCollectionIdsRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsRequest) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11434,7 +11424,7 @@ bool ListCollectionIdsRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsRequest) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -11449,7 +11439,7 @@ bool ListCollectionIdsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListCollectionIdsRequest.parent")); + "google.firestore.v1.ListCollectionIdsRequest.parent")); } else { goto handle_unusual; } @@ -11479,7 +11469,7 @@ bool ListCollectionIdsRequest::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListCollectionIdsRequest.page_token")); + "google.firestore.v1.ListCollectionIdsRequest.page_token")); } else { goto handle_unusual; } @@ -11498,17 +11488,17 @@ bool ListCollectionIdsRequest::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsRequest) return false; #undef DO_ } void ListCollectionIdsRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11517,7 +11507,7 @@ void ListCollectionIdsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsRequest.parent"); + "google.firestore.v1.ListCollectionIdsRequest.parent"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->parent(), output); } @@ -11532,7 +11522,7 @@ void ListCollectionIdsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsRequest.page_token"); + "google.firestore.v1.ListCollectionIdsRequest.page_token"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 3, this->page_token(), output); } @@ -11541,13 +11531,13 @@ void ListCollectionIdsRequest::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsRequest) } ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsRequest) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11556,7 +11546,7 @@ ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCached ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->parent().data(), static_cast(this->parent().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsRequest.parent"); + "google.firestore.v1.ListCollectionIdsRequest.parent"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->parent(), target); @@ -11572,7 +11562,7 @@ ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCached ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->page_token().data(), static_cast(this->page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsRequest.page_token"); + "google.firestore.v1.ListCollectionIdsRequest.page_token"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 3, this->page_token(), target); @@ -11582,12 +11572,12 @@ ::google::protobuf::uint8* ListCollectionIdsRequest::InternalSerializeWithCached target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsRequest) return target; } size_t ListCollectionIdsRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsRequest) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -11624,22 +11614,22 @@ size_t ListCollectionIdsRequest::ByteSizeLong() const { } void ListCollectionIdsRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsRequest) GOOGLE_DCHECK_NE(&from, this); const ListCollectionIdsRequest* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsRequest) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsRequest) MergeFrom(*source); } } void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -11659,14 +11649,14 @@ void ListCollectionIdsRequest::MergeFrom(const ListCollectionIdsRequest& from) { } void ListCollectionIdsRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsRequest) if (&from == this) return; Clear(); MergeFrom(from); } void ListCollectionIdsRequest::CopyFrom(const ListCollectionIdsRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsRequest) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsRequest) if (&from == this) return; Clear(); MergeFrom(from); @@ -11690,8 +11680,8 @@ void ListCollectionIdsRequest::InternalSwap(ListCollectionIdsRequest* other) { } ::google::protobuf::Metadata ListCollectionIdsRequest::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -11707,10 +11697,10 @@ const int ListCollectionIdsResponse::kNextPageTokenFieldNumber; ListCollectionIdsResponse::ListCollectionIdsResponse() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(constructor:google.firestore.v1.ListCollectionIdsResponse) } ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResponse& from) : ::google::protobuf::Message(), @@ -11722,7 +11712,7 @@ ListCollectionIdsResponse::ListCollectionIdsResponse(const ListCollectionIdsResp if (from.next_page_token().size() > 0) { next_page_token_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.next_page_token_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ListCollectionIdsResponse) } void ListCollectionIdsResponse::SharedCtor() { @@ -11731,7 +11721,7 @@ void ListCollectionIdsResponse::SharedCtor() { } ListCollectionIdsResponse::~ListCollectionIdsResponse() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(destructor:google.firestore.v1.ListCollectionIdsResponse) SharedDtor(); } @@ -11745,12 +11735,12 @@ void ListCollectionIdsResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ListCollectionIdsResponse::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ListCollectionIdsResponse& ListCollectionIdsResponse::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse(); + ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponse(); return *internal_default_instance(); } @@ -11763,7 +11753,7 @@ ListCollectionIdsResponse* ListCollectionIdsResponse::New(::google::protobuf::Ar } void ListCollectionIdsResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ListCollectionIdsResponse) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -11777,7 +11767,7 @@ bool ListCollectionIdsResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ListCollectionIdsResponse) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -11793,7 +11783,7 @@ bool ListCollectionIdsResponse::MergePartialFromCodedStream( this->collection_ids(this->collection_ids_size() - 1).data(), static_cast(this->collection_ids(this->collection_ids_size() - 1).length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids")); + "google.firestore.v1.ListCollectionIdsResponse.collection_ids")); } else { goto handle_unusual; } @@ -11809,7 +11799,7 @@ bool ListCollectionIdsResponse::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token")); + "google.firestore.v1.ListCollectionIdsResponse.next_page_token")); } else { goto handle_unusual; } @@ -11828,17 +11818,17 @@ bool ListCollectionIdsResponse::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ListCollectionIdsResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ListCollectionIdsResponse) return false; #undef DO_ } void ListCollectionIdsResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ListCollectionIdsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11847,7 +11837,7 @@ void ListCollectionIdsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_ids(i).data(), static_cast(this->collection_ids(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids"); + "google.firestore.v1.ListCollectionIdsResponse.collection_ids"); ::google::protobuf::internal::WireFormatLite::WriteString( 1, this->collection_ids(i), output); } @@ -11857,7 +11847,7 @@ void ListCollectionIdsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token"); + "google.firestore.v1.ListCollectionIdsResponse.next_page_token"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->next_page_token(), output); } @@ -11866,13 +11856,13 @@ void ListCollectionIdsResponse::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ListCollectionIdsResponse) } ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ListCollectionIdsResponse) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -11881,7 +11871,7 @@ ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCache ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_ids(i).data(), static_cast(this->collection_ids(i).length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids"); + "google.firestore.v1.ListCollectionIdsResponse.collection_ids"); target = ::google::protobuf::internal::WireFormatLite:: WriteStringToArray(1, this->collection_ids(i), target); } @@ -11891,7 +11881,7 @@ ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCache ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->next_page_token().data(), static_cast(this->next_page_token().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token"); + "google.firestore.v1.ListCollectionIdsResponse.next_page_token"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->next_page_token(), target); @@ -11901,12 +11891,12 @@ ::google::protobuf::uint8* ListCollectionIdsResponse::InternalSerializeWithCache target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ListCollectionIdsResponse) return target; } size_t ListCollectionIdsResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ListCollectionIdsResponse) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -11937,22 +11927,22 @@ size_t ListCollectionIdsResponse::ByteSizeLong() const { } void ListCollectionIdsResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ListCollectionIdsResponse) GOOGLE_DCHECK_NE(&from, this); const ListCollectionIdsResponse* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ListCollectionIdsResponse) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ListCollectionIdsResponse) MergeFrom(*source); } } void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ListCollectionIdsResponse) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -11966,14 +11956,14 @@ void ListCollectionIdsResponse::MergeFrom(const ListCollectionIdsResponse& from) } void ListCollectionIdsResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ListCollectionIdsResponse) if (&from == this) return; Clear(); MergeFrom(from); } void ListCollectionIdsResponse::CopyFrom(const ListCollectionIdsResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ListCollectionIdsResponse) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ListCollectionIdsResponse) if (&from == this) return; Clear(); MergeFrom(from); @@ -11996,13 +11986,13 @@ void ListCollectionIdsResponse::InternalSwap(ListCollectionIdsResponse* other) { } ::google::protobuf::Metadata ListCollectionIdsResponse::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.h b/Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h similarity index 77% rename from Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.h rename to Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h index e3d3c815760..91f5411b2d2 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.h +++ b/Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/firestore.proto +// source: google/firestore/v1/firestore.proto -#ifndef PROTOBUF_google_2ffirestore_2fv1beta1_2ffirestore_2eproto__INCLUDED -#define PROTOBUF_google_2ffirestore_2fv1beta1_2ffirestore_2eproto__INCLUDED +#ifndef PROTOBUF_google_2ffirestore_2fv1_2ffirestore_2eproto__INCLUDED +#define PROTOBUF_google_2ffirestore_2fv1_2ffirestore_2eproto__INCLUDED #include @@ -50,16 +50,16 @@ #include #include #include "google/api/annotations.pb.h" -#include "google/firestore/v1beta1/common.pb.h" -#include "google/firestore/v1beta1/document.pb.h" -#include "google/firestore/v1beta1/query.pb.h" -#include "google/firestore/v1beta1/write.pb.h" +#include "google/firestore/v1/common.pb.h" +#include "google/firestore/v1/document.pb.h" +#include "google/firestore/v1/query.pb.h" +#include "google/firestore/v1/write.pb.h" #include #include #include "google/rpc/status.pb.h" // @@protoc_insertion_point(includes) -namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -153,10 +153,10 @@ inline void InitDefaults() { InitDefaultsListCollectionIdsRequest(); InitDefaultsListCollectionIdsResponse(); } -} // namespace protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class BatchGetDocumentsRequest; class BatchGetDocumentsRequestDefaultTypeInternal; extern BatchGetDocumentsRequestDefaultTypeInternal _BatchGetDocumentsRequest_default_instance_; @@ -238,12 +238,12 @@ extern WriteRequest_LabelsEntry_DoNotUseDefaultTypeInternal _WriteRequest_Labels class WriteResponse; class WriteResponseDefaultTypeInternal; extern WriteResponseDefaultTypeInternal _WriteResponse_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { enum TargetChange_TargetChangeType { TargetChange_TargetChangeType_NO_CHANGE = 0, @@ -271,7 +271,7 @@ inline bool TargetChange_TargetChangeType_Parse( } // =================================================================== -class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.GetDocumentRequest) */ { +class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.GetDocumentRequest) */ { public: GetDocumentRequest(); virtual ~GetDocumentRequest(); @@ -373,14 +373,14 @@ class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insert ::std::string* release_name(); void set_allocated_name(::std::string* name); - // .google.firestore.v1beta1.DocumentMask mask = 2; + // .google.firestore.v1.DocumentMask mask = 2; bool has_mask() const; void clear_mask(); static const int kMaskFieldNumber = 2; - const ::google::firestore::v1beta1::DocumentMask& mask() const; - ::google::firestore::v1beta1::DocumentMask* release_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_mask(); - void set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask); + const ::google::firestore::v1::DocumentMask& mask() const; + ::google::firestore::v1::DocumentMask* release_mask(); + ::google::firestore::v1::DocumentMask* mutable_mask(); + void set_allocated_mask(::google::firestore::v1::DocumentMask* mask); // bytes transaction = 3; private: @@ -409,7 +409,7 @@ class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insert void set_allocated_read_time(::google::protobuf::Timestamp* read_time); ConsistencySelectorCase consistency_selector_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.GetDocumentRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.GetDocumentRequest) private: void set_has_transaction(); void set_has_read_time(); @@ -420,7 +420,7 @@ class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insert ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr name_; - ::google::firestore::v1beta1::DocumentMask* mask_; + ::google::firestore::v1::DocumentMask* mask_; union ConsistencySelectorUnion { ConsistencySelectorUnion() {} ::google::protobuf::internal::ArenaStringPtr transaction_; @@ -429,12 +429,12 @@ class GetDocumentRequest : public ::google::protobuf::Message /* @@protoc_insert mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsGetDocumentRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsGetDocumentRequestImpl(); }; // ------------------------------------------------------------------- -class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListDocumentsRequest) */ { +class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListDocumentsRequest) */ { public: ListDocumentsRequest(); virtual ~ListDocumentsRequest(); @@ -578,14 +578,14 @@ class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_inse ::std::string* release_order_by(); void set_allocated_order_by(::std::string* order_by); - // .google.firestore.v1beta1.DocumentMask mask = 7; + // .google.firestore.v1.DocumentMask mask = 7; bool has_mask() const; void clear_mask(); static const int kMaskFieldNumber = 7; - const ::google::firestore::v1beta1::DocumentMask& mask() const; - ::google::firestore::v1beta1::DocumentMask* release_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_mask(); - void set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask); + const ::google::firestore::v1::DocumentMask& mask() const; + ::google::firestore::v1::DocumentMask* release_mask(); + ::google::firestore::v1::DocumentMask* mutable_mask(); + void set_allocated_mask(::google::firestore::v1::DocumentMask* mask); // int32 page_size = 3; void clear_page_size(); @@ -626,7 +626,7 @@ class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_inse void set_allocated_read_time(::google::protobuf::Timestamp* read_time); ConsistencySelectorCase consistency_selector_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListDocumentsRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListDocumentsRequest) private: void set_has_transaction(); void set_has_read_time(); @@ -640,7 +640,7 @@ class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_inse ::google::protobuf::internal::ArenaStringPtr collection_id_; ::google::protobuf::internal::ArenaStringPtr page_token_; ::google::protobuf::internal::ArenaStringPtr order_by_; - ::google::firestore::v1beta1::DocumentMask* mask_; + ::google::firestore::v1::DocumentMask* mask_; ::google::protobuf::int32 page_size_; bool show_missing_; union ConsistencySelectorUnion { @@ -651,12 +651,12 @@ class ListDocumentsRequest : public ::google::protobuf::Message /* @@protoc_inse mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsRequestImpl(); }; // ------------------------------------------------------------------- -class ListDocumentsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListDocumentsResponse) */ { +class ListDocumentsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListDocumentsResponse) */ { public: ListDocumentsResponse(); virtual ~ListDocumentsResponse(); @@ -738,16 +738,16 @@ class ListDocumentsResponse : public ::google::protobuf::Message /* @@protoc_ins // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Document documents = 1; + // repeated .google.firestore.v1.Document documents = 1; int documents_size() const; void clear_documents(); static const int kDocumentsFieldNumber = 1; - const ::google::firestore::v1beta1::Document& documents(int index) const; - ::google::firestore::v1beta1::Document* mutable_documents(int index); - ::google::firestore::v1beta1::Document* add_documents(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Document >* + const ::google::firestore::v1::Document& documents(int index) const; + ::google::firestore::v1::Document* mutable_documents(int index); + ::google::firestore::v1::Document* add_documents(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Document >* mutable_documents(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Document >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Document >& documents() const; // string next_page_token = 2; @@ -764,19 +764,19 @@ class ListDocumentsResponse : public ::google::protobuf::Message /* @@protoc_ins ::std::string* release_next_page_token(); void set_allocated_next_page_token(::std::string* next_page_token); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListDocumentsResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListDocumentsResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Document > documents_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Document > documents_; ::google::protobuf::internal::ArenaStringPtr next_page_token_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListDocumentsResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListDocumentsResponseImpl(); }; // ------------------------------------------------------------------- -class CreateDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.CreateDocumentRequest) */ { +class CreateDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.CreateDocumentRequest) */ { public: CreateDocumentRequest(); virtual ~CreateDocumentRequest(); @@ -900,40 +900,40 @@ class CreateDocumentRequest : public ::google::protobuf::Message /* @@protoc_ins ::std::string* release_document_id(); void set_allocated_document_id(::std::string* document_id); - // .google.firestore.v1beta1.Document document = 4; + // .google.firestore.v1.Document document = 4; bool has_document() const; void clear_document(); static const int kDocumentFieldNumber = 4; - const ::google::firestore::v1beta1::Document& document() const; - ::google::firestore::v1beta1::Document* release_document(); - ::google::firestore::v1beta1::Document* mutable_document(); - void set_allocated_document(::google::firestore::v1beta1::Document* 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); - // .google.firestore.v1beta1.DocumentMask mask = 5; + // .google.firestore.v1.DocumentMask mask = 5; bool has_mask() const; void clear_mask(); static const int kMaskFieldNumber = 5; - const ::google::firestore::v1beta1::DocumentMask& mask() const; - ::google::firestore::v1beta1::DocumentMask* release_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_mask(); - void set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask); + const ::google::firestore::v1::DocumentMask& mask() const; + ::google::firestore::v1::DocumentMask* release_mask(); + ::google::firestore::v1::DocumentMask* mutable_mask(); + void set_allocated_mask(::google::firestore::v1::DocumentMask* mask); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.CreateDocumentRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.CreateDocumentRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr parent_; ::google::protobuf::internal::ArenaStringPtr collection_id_; ::google::protobuf::internal::ArenaStringPtr document_id_; - ::google::firestore::v1beta1::Document* document_; - ::google::firestore::v1beta1::DocumentMask* mask_; + ::google::firestore::v1::Document* document_; + ::google::firestore::v1::DocumentMask* mask_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCreateDocumentRequestImpl(); }; // ------------------------------------------------------------------- -class UpdateDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.UpdateDocumentRequest) */ { +class UpdateDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.UpdateDocumentRequest) */ { public: UpdateDocumentRequest(); virtual ~UpdateDocumentRequest(); @@ -1015,57 +1015,57 @@ class UpdateDocumentRequest : public ::google::protobuf::Message /* @@protoc_ins // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; bool has_document() const; void clear_document(); static const int kDocumentFieldNumber = 1; - const ::google::firestore::v1beta1::Document& document() const; - ::google::firestore::v1beta1::Document* release_document(); - ::google::firestore::v1beta1::Document* mutable_document(); - void set_allocated_document(::google::firestore::v1beta1::Document* 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); - // .google.firestore.v1beta1.DocumentMask update_mask = 2; + // .google.firestore.v1.DocumentMask update_mask = 2; bool has_update_mask() const; void clear_update_mask(); static const int kUpdateMaskFieldNumber = 2; - const ::google::firestore::v1beta1::DocumentMask& update_mask() const; - ::google::firestore::v1beta1::DocumentMask* release_update_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_update_mask(); - void set_allocated_update_mask(::google::firestore::v1beta1::DocumentMask* update_mask); + const ::google::firestore::v1::DocumentMask& update_mask() const; + ::google::firestore::v1::DocumentMask* release_update_mask(); + ::google::firestore::v1::DocumentMask* mutable_update_mask(); + void set_allocated_update_mask(::google::firestore::v1::DocumentMask* update_mask); - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; bool has_mask() const; void clear_mask(); static const int kMaskFieldNumber = 3; - const ::google::firestore::v1beta1::DocumentMask& mask() const; - ::google::firestore::v1beta1::DocumentMask* release_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_mask(); - void set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask); + const ::google::firestore::v1::DocumentMask& mask() const; + ::google::firestore::v1::DocumentMask* release_mask(); + ::google::firestore::v1::DocumentMask* mutable_mask(); + void set_allocated_mask(::google::firestore::v1::DocumentMask* mask); - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; bool has_current_document() const; void clear_current_document(); static const int kCurrentDocumentFieldNumber = 4; - const ::google::firestore::v1beta1::Precondition& current_document() const; - ::google::firestore::v1beta1::Precondition* release_current_document(); - ::google::firestore::v1beta1::Precondition* mutable_current_document(); - void set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document); + const ::google::firestore::v1::Precondition& current_document() const; + ::google::firestore::v1::Precondition* release_current_document(); + ::google::firestore::v1::Precondition* mutable_current_document(); + void set_allocated_current_document(::google::firestore::v1::Precondition* current_document); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.UpdateDocumentRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.UpdateDocumentRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::firestore::v1beta1::Document* document_; - ::google::firestore::v1beta1::DocumentMask* update_mask_; - ::google::firestore::v1beta1::DocumentMask* mask_; - ::google::firestore::v1beta1::Precondition* current_document_; + ::google::firestore::v1::Document* document_; + ::google::firestore::v1::DocumentMask* update_mask_; + ::google::firestore::v1::DocumentMask* mask_; + ::google::firestore::v1::Precondition* current_document_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsUpdateDocumentRequestImpl(); }; // ------------------------------------------------------------------- -class DeleteDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DeleteDocumentRequest) */ { +class DeleteDocumentRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DeleteDocumentRequest) */ { public: DeleteDocumentRequest(); virtual ~DeleteDocumentRequest(); @@ -1161,28 +1161,28 @@ class DeleteDocumentRequest : public ::google::protobuf::Message /* @@protoc_ins ::std::string* release_name(); void set_allocated_name(::std::string* name); - // .google.firestore.v1beta1.Precondition current_document = 2; + // .google.firestore.v1.Precondition current_document = 2; bool has_current_document() const; void clear_current_document(); static const int kCurrentDocumentFieldNumber = 2; - const ::google::firestore::v1beta1::Precondition& current_document() const; - ::google::firestore::v1beta1::Precondition* release_current_document(); - ::google::firestore::v1beta1::Precondition* mutable_current_document(); - void set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document); + const ::google::firestore::v1::Precondition& current_document() const; + ::google::firestore::v1::Precondition* release_current_document(); + ::google::firestore::v1::Precondition* mutable_current_document(); + void set_allocated_current_document(::google::firestore::v1::Precondition* current_document); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DeleteDocumentRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DeleteDocumentRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr name_; - ::google::firestore::v1beta1::Precondition* current_document_; + ::google::firestore::v1::Precondition* current_document_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsDeleteDocumentRequestImpl(); }; // ------------------------------------------------------------------- -class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.BatchGetDocumentsRequest) */ { +class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.BatchGetDocumentsRequest) */ { public: BatchGetDocumentsRequest(); virtual ~BatchGetDocumentsRequest(); @@ -1307,14 +1307,14 @@ class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_ ::std::string* release_database(); void set_allocated_database(::std::string* database); - // .google.firestore.v1beta1.DocumentMask mask = 3; + // .google.firestore.v1.DocumentMask mask = 3; bool has_mask() const; void clear_mask(); static const int kMaskFieldNumber = 3; - const ::google::firestore::v1beta1::DocumentMask& mask() const; - ::google::firestore::v1beta1::DocumentMask* release_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_mask(); - void set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask); + const ::google::firestore::v1::DocumentMask& mask() const; + ::google::firestore::v1::DocumentMask* release_mask(); + ::google::firestore::v1::DocumentMask* mutable_mask(); + void set_allocated_mask(::google::firestore::v1::DocumentMask* mask); // bytes transaction = 4; private: @@ -1333,14 +1333,14 @@ class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_ ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // .google.firestore.v1beta1.TransactionOptions new_transaction = 5; + // .google.firestore.v1.TransactionOptions new_transaction = 5; bool has_new_transaction() const; void clear_new_transaction(); static const int kNewTransactionFieldNumber = 5; - const ::google::firestore::v1beta1::TransactionOptions& new_transaction() const; - ::google::firestore::v1beta1::TransactionOptions* release_new_transaction(); - ::google::firestore::v1beta1::TransactionOptions* mutable_new_transaction(); - void set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction); + const ::google::firestore::v1::TransactionOptions& new_transaction() const; + ::google::firestore::v1::TransactionOptions* release_new_transaction(); + ::google::firestore::v1::TransactionOptions* mutable_new_transaction(); + void set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction); // .google.protobuf.Timestamp read_time = 7; bool has_read_time() const; @@ -1352,7 +1352,7 @@ class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_ void set_allocated_read_time(::google::protobuf::Timestamp* read_time); ConsistencySelectorCase consistency_selector_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.BatchGetDocumentsRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchGetDocumentsRequest) private: void set_has_transaction(); void set_has_new_transaction(); @@ -1365,22 +1365,22 @@ class BatchGetDocumentsRequest : public ::google::protobuf::Message /* @@protoc_ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::std::string> documents_; ::google::protobuf::internal::ArenaStringPtr database_; - ::google::firestore::v1beta1::DocumentMask* mask_; + ::google::firestore::v1::DocumentMask* mask_; union ConsistencySelectorUnion { ConsistencySelectorUnion() {} ::google::protobuf::internal::ArenaStringPtr transaction_; - ::google::firestore::v1beta1::TransactionOptions* new_transaction_; + ::google::firestore::v1::TransactionOptions* new_transaction_; ::google::protobuf::Timestamp* read_time_; } consistency_selector_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsRequestImpl(); }; // ------------------------------------------------------------------- -class BatchGetDocumentsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.BatchGetDocumentsResponse) */ { +class BatchGetDocumentsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.BatchGetDocumentsResponse) */ { public: BatchGetDocumentsResponse(); virtual ~BatchGetDocumentsResponse(); @@ -1491,14 +1491,14 @@ class BatchGetDocumentsResponse : public ::google::protobuf::Message /* @@protoc ::google::protobuf::Timestamp* mutable_read_time(); void set_allocated_read_time(::google::protobuf::Timestamp* read_time); - // .google.firestore.v1beta1.Document found = 1; + // .google.firestore.v1.Document found = 1; bool has_found() const; void clear_found(); static const int kFoundFieldNumber = 1; - const ::google::firestore::v1beta1::Document& found() const; - ::google::firestore::v1beta1::Document* release_found(); - ::google::firestore::v1beta1::Document* mutable_found(); - void set_allocated_found(::google::firestore::v1beta1::Document* found); + const ::google::firestore::v1::Document& found() const; + ::google::firestore::v1::Document* release_found(); + ::google::firestore::v1::Document* mutable_found(); + void set_allocated_found(::google::firestore::v1::Document* found); // string missing = 2; private: @@ -1518,7 +1518,7 @@ class BatchGetDocumentsResponse : public ::google::protobuf::Message /* @@protoc void set_allocated_missing(::std::string* missing); ResultCase result_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.BatchGetDocumentsResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.BatchGetDocumentsResponse) private: void set_has_found(); void set_has_missing(); @@ -1532,18 +1532,18 @@ class BatchGetDocumentsResponse : public ::google::protobuf::Message /* @@protoc ::google::protobuf::Timestamp* read_time_; union ResultUnion { ResultUnion() {} - ::google::firestore::v1beta1::Document* found_; + ::google::firestore::v1::Document* found_; ::google::protobuf::internal::ArenaStringPtr missing_; } result_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBatchGetDocumentsResponseImpl(); }; // ------------------------------------------------------------------- -class BeginTransactionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.BeginTransactionRequest) */ { +class BeginTransactionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.BeginTransactionRequest) */ { public: BeginTransactionRequest(); virtual ~BeginTransactionRequest(); @@ -1639,28 +1639,28 @@ class BeginTransactionRequest : public ::google::protobuf::Message /* @@protoc_i ::std::string* release_database(); void set_allocated_database(::std::string* database); - // .google.firestore.v1beta1.TransactionOptions options = 2; + // .google.firestore.v1.TransactionOptions options = 2; bool has_options() const; void clear_options(); static const int kOptionsFieldNumber = 2; - const ::google::firestore::v1beta1::TransactionOptions& options() const; - ::google::firestore::v1beta1::TransactionOptions* release_options(); - ::google::firestore::v1beta1::TransactionOptions* mutable_options(); - void set_allocated_options(::google::firestore::v1beta1::TransactionOptions* options); + const ::google::firestore::v1::TransactionOptions& options() const; + ::google::firestore::v1::TransactionOptions* release_options(); + ::google::firestore::v1::TransactionOptions* mutable_options(); + void set_allocated_options(::google::firestore::v1::TransactionOptions* options); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.BeginTransactionRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.BeginTransactionRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr database_; - ::google::firestore::v1beta1::TransactionOptions* options_; + ::google::firestore::v1::TransactionOptions* options_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionRequestImpl(); }; // ------------------------------------------------------------------- -class BeginTransactionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.BeginTransactionResponse) */ { +class BeginTransactionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.BeginTransactionResponse) */ { public: BeginTransactionResponse(); virtual ~BeginTransactionResponse(); @@ -1756,18 +1756,18 @@ class BeginTransactionResponse : public ::google::protobuf::Message /* @@protoc_ ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.BeginTransactionResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.BeginTransactionResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr transaction_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsBeginTransactionResponseImpl(); }; // ------------------------------------------------------------------- -class CommitRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.CommitRequest) */ { +class CommitRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.CommitRequest) */ { public: CommitRequest(); virtual ~CommitRequest(); @@ -1849,16 +1849,16 @@ class CommitRequest : public ::google::protobuf::Message /* @@protoc_insertion_p // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Write writes = 2; + // repeated .google.firestore.v1.Write writes = 2; int writes_size() const; void clear_writes(); static const int kWritesFieldNumber = 2; - const ::google::firestore::v1beta1::Write& writes(int index) const; - ::google::firestore::v1beta1::Write* mutable_writes(int index); - ::google::firestore::v1beta1::Write* add_writes(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* + const ::google::firestore::v1::Write& writes(int index) const; + ::google::firestore::v1::Write* mutable_writes(int index); + ::google::firestore::v1::Write* add_writes(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* mutable_writes(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& writes() const; // string database = 1; @@ -1889,20 +1889,20 @@ class CommitRequest : public ::google::protobuf::Message /* @@protoc_insertion_p ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.CommitRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.CommitRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write > writes_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write > writes_; ::google::protobuf::internal::ArenaStringPtr database_; ::google::protobuf::internal::ArenaStringPtr transaction_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitRequestImpl(); }; // ------------------------------------------------------------------- -class CommitResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.CommitResponse) */ { +class CommitResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.CommitResponse) */ { public: CommitResponse(); virtual ~CommitResponse(); @@ -1984,16 +1984,16 @@ class CommitResponse : public ::google::protobuf::Message /* @@protoc_insertion_ // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.WriteResult write_results = 1; + // repeated .google.firestore.v1.WriteResult write_results = 1; int write_results_size() const; void clear_write_results(); static const int kWriteResultsFieldNumber = 1; - const ::google::firestore::v1beta1::WriteResult& write_results(int index) const; - ::google::firestore::v1beta1::WriteResult* mutable_write_results(int index); - ::google::firestore::v1beta1::WriteResult* add_write_results(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >* + const ::google::firestore::v1::WriteResult& write_results(int index) const; + ::google::firestore::v1::WriteResult* mutable_write_results(int index); + ::google::firestore::v1::WriteResult* add_write_results(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >* mutable_write_results(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >& write_results() const; // .google.protobuf.Timestamp commit_time = 2; @@ -2005,19 +2005,19 @@ class CommitResponse : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::Timestamp* mutable_commit_time(); void set_allocated_commit_time(::google::protobuf::Timestamp* commit_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.CommitResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.CommitResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult > write_results_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult > write_results_; ::google::protobuf::Timestamp* commit_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsCommitResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsCommitResponseImpl(); }; // ------------------------------------------------------------------- -class RollbackRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.RollbackRequest) */ { +class RollbackRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.RollbackRequest) */ { public: RollbackRequest(); virtual ~RollbackRequest(); @@ -2127,19 +2127,19 @@ class RollbackRequest : public ::google::protobuf::Message /* @@protoc_insertion ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.RollbackRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.RollbackRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr database_; ::google::protobuf::internal::ArenaStringPtr transaction_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRollbackRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRollbackRequestImpl(); }; // ------------------------------------------------------------------- -class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.RunQueryRequest) */ { +class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.RunQueryRequest) */ { public: RunQueryRequest(); virtual ~RunQueryRequest(); @@ -2247,14 +2247,14 @@ class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion ::std::string* release_parent(); void set_allocated_parent(::std::string* parent); - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; bool has_structured_query() const; void clear_structured_query(); static const int kStructuredQueryFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery& structured_query() const; - ::google::firestore::v1beta1::StructuredQuery* release_structured_query(); - ::google::firestore::v1beta1::StructuredQuery* mutable_structured_query(); - void set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query); + const ::google::firestore::v1::StructuredQuery& structured_query() const; + ::google::firestore::v1::StructuredQuery* release_structured_query(); + ::google::firestore::v1::StructuredQuery* mutable_structured_query(); + void set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query); // bytes transaction = 5; private: @@ -2273,14 +2273,14 @@ class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // .google.firestore.v1beta1.TransactionOptions new_transaction = 6; + // .google.firestore.v1.TransactionOptions new_transaction = 6; bool has_new_transaction() const; void clear_new_transaction(); static const int kNewTransactionFieldNumber = 6; - const ::google::firestore::v1beta1::TransactionOptions& new_transaction() const; - ::google::firestore::v1beta1::TransactionOptions* release_new_transaction(); - ::google::firestore::v1beta1::TransactionOptions* mutable_new_transaction(); - void set_allocated_new_transaction(::google::firestore::v1beta1::TransactionOptions* new_transaction); + const ::google::firestore::v1::TransactionOptions& new_transaction() const; + ::google::firestore::v1::TransactionOptions* release_new_transaction(); + ::google::firestore::v1::TransactionOptions* mutable_new_transaction(); + void set_allocated_new_transaction(::google::firestore::v1::TransactionOptions* new_transaction); // .google.protobuf.Timestamp read_time = 7; bool has_read_time() const; @@ -2293,7 +2293,7 @@ class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion QueryTypeCase query_type_case() const; ConsistencySelectorCase consistency_selector_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.RunQueryRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.RunQueryRequest) private: void set_has_structured_query(); void set_has_transaction(); @@ -2312,23 +2312,23 @@ class RunQueryRequest : public ::google::protobuf::Message /* @@protoc_insertion ::google::protobuf::internal::ArenaStringPtr parent_; union QueryTypeUnion { QueryTypeUnion() {} - ::google::firestore::v1beta1::StructuredQuery* structured_query_; + ::google::firestore::v1::StructuredQuery* structured_query_; } query_type_; union ConsistencySelectorUnion { ConsistencySelectorUnion() {} ::google::protobuf::internal::ArenaStringPtr transaction_; - ::google::firestore::v1beta1::TransactionOptions* new_transaction_; + ::google::firestore::v1::TransactionOptions* new_transaction_; ::google::protobuf::Timestamp* read_time_; } consistency_selector_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[2]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryRequestImpl(); }; // ------------------------------------------------------------------- -class RunQueryResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.RunQueryResponse) */ { +class RunQueryResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.RunQueryResponse) */ { public: RunQueryResponse(); virtual ~RunQueryResponse(); @@ -2424,14 +2424,14 @@ class RunQueryResponse : public ::google::protobuf::Message /* @@protoc_insertio ::std::string* release_transaction(); void set_allocated_transaction(::std::string* transaction); - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; bool has_document() const; void clear_document(); static const int kDocumentFieldNumber = 1; - const ::google::firestore::v1beta1::Document& document() const; - ::google::firestore::v1beta1::Document* release_document(); - ::google::firestore::v1beta1::Document* mutable_document(); - void set_allocated_document(::google::firestore::v1beta1::Document* 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); // .google.protobuf.Timestamp read_time = 3; bool has_read_time() const; @@ -2448,17 +2448,17 @@ class RunQueryResponse : public ::google::protobuf::Message /* @@protoc_insertio ::google::protobuf::int32 skipped_results() const; void set_skipped_results(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.RunQueryResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.RunQueryResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr transaction_; - ::google::firestore::v1beta1::Document* document_; + ::google::firestore::v1::Document* document_; ::google::protobuf::Timestamp* read_time_; ::google::protobuf::int32 skipped_results_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsRunQueryResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsRunQueryResponseImpl(); }; // ------------------------------------------------------------------- @@ -2483,7 +2483,7 @@ class WriteRequest_LabelsEntry_DoNotUse : public ::google::protobuf::internal::M // ------------------------------------------------------------------- -class WriteRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.WriteRequest) */ { +class WriteRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.WriteRequest) */ { public: WriteRequest(); virtual ~WriteRequest(); @@ -2566,16 +2566,16 @@ class WriteRequest : public ::google::protobuf::Message /* @@protoc_insertion_po // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Write writes = 3; + // repeated .google.firestore.v1.Write writes = 3; int writes_size() const; void clear_writes(); static const int kWritesFieldNumber = 3; - const ::google::firestore::v1beta1::Write& writes(int index) const; - ::google::firestore::v1beta1::Write* mutable_writes(int index); - ::google::firestore::v1beta1::Write* add_writes(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* + const ::google::firestore::v1::Write& writes(int index) const; + ::google::firestore::v1::Write* mutable_writes(int index); + ::google::firestore::v1::Write* add_writes(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* mutable_writes(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& writes() const; // map labels = 5; @@ -2629,11 +2629,11 @@ class WriteRequest : public ::google::protobuf::Message /* @@protoc_insertion_po ::std::string* release_stream_token(); void set_allocated_stream_token(::std::string* stream_token); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.WriteRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.WriteRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write > writes_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write > writes_; ::google::protobuf::internal::MapField< WriteRequest_LabelsEntry_DoNotUse, ::std::string, ::std::string, @@ -2644,12 +2644,12 @@ class WriteRequest : public ::google::protobuf::Message /* @@protoc_insertion_po ::google::protobuf::internal::ArenaStringPtr stream_id_; ::google::protobuf::internal::ArenaStringPtr stream_token_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteRequestImpl(); }; // ------------------------------------------------------------------- -class WriteResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.WriteResponse) */ { +class WriteResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.WriteResponse) */ { public: WriteResponse(); virtual ~WriteResponse(); @@ -2731,16 +2731,16 @@ class WriteResponse : public ::google::protobuf::Message /* @@protoc_insertion_p // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.WriteResult write_results = 3; + // repeated .google.firestore.v1.WriteResult write_results = 3; int write_results_size() const; void clear_write_results(); static const int kWriteResultsFieldNumber = 3; - const ::google::firestore::v1beta1::WriteResult& write_results(int index) const; - ::google::firestore::v1beta1::WriteResult* mutable_write_results(int index); - ::google::firestore::v1beta1::WriteResult* add_write_results(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >* + const ::google::firestore::v1::WriteResult& write_results(int index) const; + ::google::firestore::v1::WriteResult* mutable_write_results(int index); + ::google::firestore::v1::WriteResult* add_write_results(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >* mutable_write_results(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >& write_results() const; // string stream_id = 1; @@ -2780,17 +2780,17 @@ class WriteResponse : public ::google::protobuf::Message /* @@protoc_insertion_p ::google::protobuf::Timestamp* mutable_commit_time(); void set_allocated_commit_time(::google::protobuf::Timestamp* commit_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.WriteResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.WriteResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult > write_results_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult > write_results_; ::google::protobuf::internal::ArenaStringPtr stream_id_; ::google::protobuf::internal::ArenaStringPtr stream_token_; ::google::protobuf::Timestamp* commit_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsWriteResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsWriteResponseImpl(); }; // ------------------------------------------------------------------- @@ -2815,7 +2815,7 @@ class ListenRequest_LabelsEntry_DoNotUse : public ::google::protobuf::internal:: // ------------------------------------------------------------------- -class ListenRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListenRequest) */ { +class ListenRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListenRequest) */ { public: ListenRequest(); virtual ~ListenRequest(); @@ -2927,14 +2927,14 @@ class ListenRequest : public ::google::protobuf::Message /* @@protoc_insertion_p ::std::string* release_database(); void set_allocated_database(::std::string* database); - // .google.firestore.v1beta1.Target add_target = 2; + // .google.firestore.v1.Target add_target = 2; bool has_add_target() const; void clear_add_target(); static const int kAddTargetFieldNumber = 2; - const ::google::firestore::v1beta1::Target& add_target() const; - ::google::firestore::v1beta1::Target* release_add_target(); - ::google::firestore::v1beta1::Target* mutable_add_target(); - void set_allocated_add_target(::google::firestore::v1beta1::Target* add_target); + const ::google::firestore::v1::Target& add_target() const; + ::google::firestore::v1::Target* release_add_target(); + ::google::firestore::v1::Target* mutable_add_target(); + void set_allocated_add_target(::google::firestore::v1::Target* add_target); // int32 remove_target = 3; private: @@ -2946,7 +2946,7 @@ class ListenRequest : public ::google::protobuf::Message /* @@protoc_insertion_p void set_remove_target(::google::protobuf::int32 value); TargetChangeCase target_change_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListenRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListenRequest) private: void set_has_add_target(); void set_has_remove_target(); @@ -2965,18 +2965,18 @@ class ListenRequest : public ::google::protobuf::Message /* @@protoc_insertion_p ::google::protobuf::internal::ArenaStringPtr database_; union TargetChangeUnion { TargetChangeUnion() {} - ::google::firestore::v1beta1::Target* add_target_; + ::google::firestore::v1::Target* add_target_; ::google::protobuf::int32 remove_target_; } target_change_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenRequestImpl(); }; // ------------------------------------------------------------------- -class ListenResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListenResponse) */ { +class ListenResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListenResponse) */ { public: ListenResponse(); virtual ~ListenResponse(); @@ -3067,53 +3067,53 @@ class ListenResponse : public ::google::protobuf::Message /* @@protoc_insertion_ // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.TargetChange target_change = 2; + // .google.firestore.v1.TargetChange target_change = 2; bool has_target_change() const; void clear_target_change(); static const int kTargetChangeFieldNumber = 2; - const ::google::firestore::v1beta1::TargetChange& target_change() const; - ::google::firestore::v1beta1::TargetChange* release_target_change(); - ::google::firestore::v1beta1::TargetChange* mutable_target_change(); - void set_allocated_target_change(::google::firestore::v1beta1::TargetChange* target_change); + const ::google::firestore::v1::TargetChange& target_change() const; + ::google::firestore::v1::TargetChange* release_target_change(); + ::google::firestore::v1::TargetChange* mutable_target_change(); + void set_allocated_target_change(::google::firestore::v1::TargetChange* target_change); - // .google.firestore.v1beta1.DocumentChange document_change = 3; + // .google.firestore.v1.DocumentChange document_change = 3; bool has_document_change() const; void clear_document_change(); static const int kDocumentChangeFieldNumber = 3; - const ::google::firestore::v1beta1::DocumentChange& document_change() const; - ::google::firestore::v1beta1::DocumentChange* release_document_change(); - ::google::firestore::v1beta1::DocumentChange* mutable_document_change(); - void set_allocated_document_change(::google::firestore::v1beta1::DocumentChange* document_change); + const ::google::firestore::v1::DocumentChange& document_change() const; + ::google::firestore::v1::DocumentChange* release_document_change(); + ::google::firestore::v1::DocumentChange* mutable_document_change(); + void set_allocated_document_change(::google::firestore::v1::DocumentChange* document_change); - // .google.firestore.v1beta1.DocumentDelete document_delete = 4; + // .google.firestore.v1.DocumentDelete document_delete = 4; bool has_document_delete() const; void clear_document_delete(); static const int kDocumentDeleteFieldNumber = 4; - const ::google::firestore::v1beta1::DocumentDelete& document_delete() const; - ::google::firestore::v1beta1::DocumentDelete* release_document_delete(); - ::google::firestore::v1beta1::DocumentDelete* mutable_document_delete(); - void set_allocated_document_delete(::google::firestore::v1beta1::DocumentDelete* document_delete); + const ::google::firestore::v1::DocumentDelete& document_delete() const; + ::google::firestore::v1::DocumentDelete* release_document_delete(); + ::google::firestore::v1::DocumentDelete* mutable_document_delete(); + void set_allocated_document_delete(::google::firestore::v1::DocumentDelete* document_delete); - // .google.firestore.v1beta1.DocumentRemove document_remove = 6; + // .google.firestore.v1.DocumentRemove document_remove = 6; bool has_document_remove() const; void clear_document_remove(); static const int kDocumentRemoveFieldNumber = 6; - const ::google::firestore::v1beta1::DocumentRemove& document_remove() const; - ::google::firestore::v1beta1::DocumentRemove* release_document_remove(); - ::google::firestore::v1beta1::DocumentRemove* mutable_document_remove(); - void set_allocated_document_remove(::google::firestore::v1beta1::DocumentRemove* document_remove); + const ::google::firestore::v1::DocumentRemove& document_remove() const; + ::google::firestore::v1::DocumentRemove* release_document_remove(); + ::google::firestore::v1::DocumentRemove* mutable_document_remove(); + void set_allocated_document_remove(::google::firestore::v1::DocumentRemove* document_remove); - // .google.firestore.v1beta1.ExistenceFilter filter = 5; + // .google.firestore.v1.ExistenceFilter filter = 5; bool has_filter() const; void clear_filter(); static const int kFilterFieldNumber = 5; - const ::google::firestore::v1beta1::ExistenceFilter& filter() const; - ::google::firestore::v1beta1::ExistenceFilter* release_filter(); - ::google::firestore::v1beta1::ExistenceFilter* mutable_filter(); - void set_allocated_filter(::google::firestore::v1beta1::ExistenceFilter* filter); + const ::google::firestore::v1::ExistenceFilter& filter() const; + ::google::firestore::v1::ExistenceFilter* release_filter(); + ::google::firestore::v1::ExistenceFilter* mutable_filter(); + void set_allocated_filter(::google::firestore::v1::ExistenceFilter* filter); ResponseTypeCase response_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListenResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListenResponse) private: void set_has_target_change(); void set_has_document_change(); @@ -3128,21 +3128,21 @@ class ListenResponse : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; union ResponseTypeUnion { ResponseTypeUnion() {} - ::google::firestore::v1beta1::TargetChange* target_change_; - ::google::firestore::v1beta1::DocumentChange* document_change_; - ::google::firestore::v1beta1::DocumentDelete* document_delete_; - ::google::firestore::v1beta1::DocumentRemove* document_remove_; - ::google::firestore::v1beta1::ExistenceFilter* filter_; + ::google::firestore::v1::TargetChange* target_change_; + ::google::firestore::v1::DocumentChange* document_change_; + ::google::firestore::v1::DocumentDelete* document_delete_; + ::google::firestore::v1::DocumentRemove* document_remove_; + ::google::firestore::v1::ExistenceFilter* filter_; } response_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListenResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListenResponseImpl(); }; // ------------------------------------------------------------------- -class Target_DocumentsTarget : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Target.DocumentsTarget) */ { +class Target_DocumentsTarget : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Target.DocumentsTarget) */ { public: Target_DocumentsTarget(); virtual ~Target_DocumentsTarget(); @@ -3246,18 +3246,18 @@ class Target_DocumentsTarget : public ::google::protobuf::Message /* @@protoc_in const ::google::protobuf::RepeatedPtrField< ::std::string>& documents() const; ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_documents(); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Target.DocumentsTarget) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Target.DocumentsTarget) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::std::string> documents_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTargetImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_DocumentsTargetImpl(); }; // ------------------------------------------------------------------- -class Target_QueryTarget : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Target.QueryTarget) */ { +class Target_QueryTarget : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Target.QueryTarget) */ { public: Target_QueryTarget(); virtual ~Target_QueryTarget(); @@ -3358,17 +3358,17 @@ class Target_QueryTarget : public ::google::protobuf::Message /* @@protoc_insert ::std::string* release_parent(); void set_allocated_parent(::std::string* parent); - // .google.firestore.v1beta1.StructuredQuery structured_query = 2; + // .google.firestore.v1.StructuredQuery structured_query = 2; bool has_structured_query() const; void clear_structured_query(); static const int kStructuredQueryFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery& structured_query() const; - ::google::firestore::v1beta1::StructuredQuery* release_structured_query(); - ::google::firestore::v1beta1::StructuredQuery* mutable_structured_query(); - void set_allocated_structured_query(::google::firestore::v1beta1::StructuredQuery* structured_query); + const ::google::firestore::v1::StructuredQuery& structured_query() const; + ::google::firestore::v1::StructuredQuery* release_structured_query(); + ::google::firestore::v1::StructuredQuery* mutable_structured_query(); + void set_allocated_structured_query(::google::firestore::v1::StructuredQuery* structured_query); QueryTypeCase query_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Target.QueryTarget) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Target.QueryTarget) private: void set_has_structured_query(); @@ -3380,17 +3380,17 @@ class Target_QueryTarget : public ::google::protobuf::Message /* @@protoc_insert ::google::protobuf::internal::ArenaStringPtr parent_; union QueryTypeUnion { QueryTypeUnion() {} - ::google::firestore::v1beta1::StructuredQuery* structured_query_; + ::google::firestore::v1::StructuredQuery* structured_query_; } query_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTarget_QueryTargetImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTarget_QueryTargetImpl(); }; // ------------------------------------------------------------------- -class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Target) */ { +class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Target) */ { public: Target(); virtual ~Target(); @@ -3499,23 +3499,23 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl bool once() const; void set_once(bool value); - // .google.firestore.v1beta1.Target.QueryTarget query = 2; + // .google.firestore.v1.Target.QueryTarget query = 2; bool has_query() const; void clear_query(); static const int kQueryFieldNumber = 2; - const ::google::firestore::v1beta1::Target_QueryTarget& query() const; - ::google::firestore::v1beta1::Target_QueryTarget* release_query(); - ::google::firestore::v1beta1::Target_QueryTarget* mutable_query(); - void set_allocated_query(::google::firestore::v1beta1::Target_QueryTarget* 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); - // .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; + // .google.firestore.v1.Target.DocumentsTarget documents = 3; bool has_documents() const; void clear_documents(); static const int kDocumentsFieldNumber = 3; - const ::google::firestore::v1beta1::Target_DocumentsTarget& documents() const; - ::google::firestore::v1beta1::Target_DocumentsTarget* release_documents(); - ::google::firestore::v1beta1::Target_DocumentsTarget* mutable_documents(); - void set_allocated_documents(::google::firestore::v1beta1::Target_DocumentsTarget* 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); // bytes resume_token = 4; private: @@ -3545,7 +3545,7 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl TargetTypeCase target_type_case() const; ResumeTypeCase resume_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Target) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Target) private: void set_has_query(); void set_has_documents(); @@ -3565,8 +3565,8 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl bool once_; union TargetTypeUnion { TargetTypeUnion() {} - ::google::firestore::v1beta1::Target_QueryTarget* query_; - ::google::firestore::v1beta1::Target_DocumentsTarget* documents_; + ::google::firestore::v1::Target_QueryTarget* query_; + ::google::firestore::v1::Target_DocumentsTarget* documents_; } target_type_; union ResumeTypeUnion { ResumeTypeUnion() {} @@ -3576,12 +3576,12 @@ class Target : public ::google::protobuf::Message /* @@protoc_insertion_point(cl mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[2]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetImpl(); }; // ------------------------------------------------------------------- -class TargetChange : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.TargetChange) */ { +class TargetChange : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.TargetChange) */ { public: TargetChange(); virtual ~TargetChange(); @@ -3739,13 +3739,13 @@ class TargetChange : public ::google::protobuf::Message /* @@protoc_insertion_po ::google::protobuf::Timestamp* mutable_read_time(); void set_allocated_read_time(::google::protobuf::Timestamp* read_time); - // .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; + // .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; void clear_target_change_type(); static const int kTargetChangeTypeFieldNumber = 1; - ::google::firestore::v1beta1::TargetChange_TargetChangeType target_change_type() const; - void set_target_change_type(::google::firestore::v1beta1::TargetChange_TargetChangeType value); + ::google::firestore::v1::TargetChange_TargetChangeType target_change_type() const; + void set_target_change_type(::google::firestore::v1::TargetChange_TargetChangeType value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.TargetChange) + // @@protoc_insertion_point(class_scope:google.firestore.v1.TargetChange) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -3756,12 +3756,12 @@ class TargetChange : public ::google::protobuf::Message /* @@protoc_insertion_po ::google::protobuf::Timestamp* read_time_; int target_change_type_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsTargetChangeImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsTargetChangeImpl(); }; // ------------------------------------------------------------------- -class ListCollectionIdsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListCollectionIdsRequest) */ { +class ListCollectionIdsRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListCollectionIdsRequest) */ { public: ListCollectionIdsRequest(); virtual ~ListCollectionIdsRequest(); @@ -3877,7 +3877,7 @@ class ListCollectionIdsRequest : public ::google::protobuf::Message /* @@protoc_ ::google::protobuf::int32 page_size() const; void set_page_size(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListCollectionIdsRequest) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListCollectionIdsRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -3885,12 +3885,12 @@ class ListCollectionIdsRequest : public ::google::protobuf::Message /* @@protoc_ ::google::protobuf::internal::ArenaStringPtr page_token_; ::google::protobuf::int32 page_size_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequestImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsRequestImpl(); }; // ------------------------------------------------------------------- -class ListCollectionIdsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ListCollectionIdsResponse) */ { +class ListCollectionIdsResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ListCollectionIdsResponse) */ { public: ListCollectionIdsResponse(); virtual ~ListCollectionIdsResponse(); @@ -4008,15 +4008,15 @@ class ListCollectionIdsResponse : public ::google::protobuf::Message /* @@protoc ::std::string* release_next_page_token(); void set_allocated_next_page_token(::std::string* next_page_token); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ListCollectionIdsResponse) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ListCollectionIdsResponse) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::RepeatedPtrField< ::std::string> collection_ids_; ::google::protobuf::internal::ArenaStringPtr next_page_token_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponseImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2ffirestore_2eproto::InitDefaultsListCollectionIdsResponseImpl(); }; // =================================================================== @@ -4034,41 +4034,41 @@ inline void GetDocumentRequest::clear_name() { name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& GetDocumentRequest::name() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_get:google.firestore.v1.GetDocumentRequest.name) return name_.GetNoArena(); } inline void GetDocumentRequest::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_set:google.firestore.v1.GetDocumentRequest.name) } #if LANG_CXX11 inline void GetDocumentRequest::set_name(::std::string&& value) { name_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.GetDocumentRequest.name) } #endif inline void GetDocumentRequest::set_name(const char* value) { GOOGLE_DCHECK(value != NULL); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.GetDocumentRequest.name) } inline void GetDocumentRequest::set_name(const char* value, size_t size) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.GetDocumentRequest.name) } inline ::std::string* GetDocumentRequest::mutable_name() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.GetDocumentRequest.name) return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* GetDocumentRequest::release_name() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_release:google.firestore.v1.GetDocumentRequest.name) return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4079,35 +4079,35 @@ inline void GetDocumentRequest::set_allocated_name(::std::string* name) { } name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.name) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.name) } -// .google.firestore.v1beta1.DocumentMask mask = 2; +// .google.firestore.v1.DocumentMask mask = 2; inline bool GetDocumentRequest::has_mask() const { return this != internal_default_instance() && mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& GetDocumentRequest::mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.GetDocumentRequest.mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& GetDocumentRequest::mask() const { + const ::google::firestore::v1::DocumentMask* p = mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.GetDocumentRequest.mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* GetDocumentRequest::release_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.GetDocumentRequest.mask) +inline ::google::firestore::v1::DocumentMask* GetDocumentRequest::release_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.GetDocumentRequest.mask) - ::google::firestore::v1beta1::DocumentMask* temp = mask_; + ::google::firestore::v1::DocumentMask* temp = mask_; mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* GetDocumentRequest::mutable_mask() { +inline ::google::firestore::v1::DocumentMask* GetDocumentRequest::mutable_mask() { if (mask_ == NULL) { - mask_ = new ::google::firestore::v1beta1::DocumentMask; + mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.GetDocumentRequest.mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.GetDocumentRequest.mask) return mask_; } -inline void GetDocumentRequest::set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask) { +inline void GetDocumentRequest::set_allocated_mask(::google::firestore::v1::DocumentMask* mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(mask_); @@ -4123,7 +4123,7 @@ inline void GetDocumentRequest::set_allocated_mask(::google::firestore::v1beta1: } mask_ = mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.mask) } // bytes transaction = 3; @@ -4140,25 +4140,25 @@ inline void GetDocumentRequest::clear_transaction() { } } inline const ::std::string& GetDocumentRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.GetDocumentRequest.transaction) if (has_transaction()) { return consistency_selector_.transaction_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void GetDocumentRequest::set_transaction(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.GetDocumentRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.GetDocumentRequest.transaction) } #if LANG_CXX11 inline void GetDocumentRequest::set_transaction(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.GetDocumentRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); @@ -4166,7 +4166,7 @@ inline void GetDocumentRequest::set_transaction(::std::string&& value) { } consistency_selector_.transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.GetDocumentRequest.transaction) } #endif inline void GetDocumentRequest::set_transaction(const char* value) { @@ -4178,7 +4178,7 @@ inline void GetDocumentRequest::set_transaction(const char* value) { } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.GetDocumentRequest.transaction) } inline void GetDocumentRequest::set_transaction(const void* value, size_t size) { if (!has_transaction()) { @@ -4188,7 +4188,7 @@ inline void GetDocumentRequest::set_transaction(const void* value, size_t size) } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.GetDocumentRequest.transaction) } inline ::std::string* GetDocumentRequest::mutable_transaction() { if (!has_transaction()) { @@ -4196,11 +4196,11 @@ inline ::std::string* GetDocumentRequest::mutable_transaction() { set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.GetDocumentRequest.transaction) return consistency_selector_.transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* GetDocumentRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.GetDocumentRequest.transaction) if (has_transaction()) { clear_has_consistency_selector(); return consistency_selector_.transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -4218,7 +4218,7 @@ inline void GetDocumentRequest::set_allocated_transaction(::std::string* transac consistency_selector_.transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.GetDocumentRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.GetDocumentRequest.transaction) } // .google.protobuf.Timestamp read_time = 5; @@ -4229,7 +4229,7 @@ inline void GetDocumentRequest::set_has_read_time() { _oneof_case_[0] = kReadTime; } inline ::google::protobuf::Timestamp* GetDocumentRequest::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.GetDocumentRequest.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.GetDocumentRequest.read_time) if (has_read_time()) { clear_has_consistency_selector(); ::google::protobuf::Timestamp* temp = consistency_selector_.read_time_; @@ -4240,7 +4240,7 @@ inline ::google::protobuf::Timestamp* GetDocumentRequest::release_read_time() { } } inline const ::google::protobuf::Timestamp& GetDocumentRequest::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.GetDocumentRequest.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.GetDocumentRequest.read_time) return has_read_time() ? *consistency_selector_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -4251,7 +4251,7 @@ inline ::google::protobuf::Timestamp* GetDocumentRequest::mutable_read_time() { set_has_read_time(); consistency_selector_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.GetDocumentRequest.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.GetDocumentRequest.read_time) return consistency_selector_.read_time_; } @@ -4273,41 +4273,41 @@ inline void ListDocumentsRequest::clear_parent() { parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListDocumentsRequest::parent() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.parent) return parent_.GetNoArena(); } inline void ListDocumentsRequest::set_parent(const ::std::string& value) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.parent) } #if LANG_CXX11 inline void ListDocumentsRequest::set_parent(::std::string&& value) { parent_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsRequest.parent) } #endif inline void ListDocumentsRequest::set_parent(const char* value) { GOOGLE_DCHECK(value != NULL); parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsRequest.parent) } inline void ListDocumentsRequest::set_parent(const char* value, size_t size) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsRequest.parent) } inline ::std::string* ListDocumentsRequest::mutable_parent() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.parent) return parent_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsRequest::release_parent() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.parent) return parent_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4318,7 +4318,7 @@ inline void ListDocumentsRequest::set_allocated_parent(::std::string* parent) { } parent_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parent); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.parent) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.parent) } // string collection_id = 2; @@ -4326,41 +4326,41 @@ inline void ListDocumentsRequest::clear_collection_id() { collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListDocumentsRequest::collection_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.collection_id) return collection_id_.GetNoArena(); } inline void ListDocumentsRequest::set_collection_id(const ::std::string& value) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.collection_id) } #if LANG_CXX11 inline void ListDocumentsRequest::set_collection_id(::std::string&& value) { collection_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsRequest.collection_id) } #endif inline void ListDocumentsRequest::set_collection_id(const char* value) { GOOGLE_DCHECK(value != NULL); collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsRequest.collection_id) } inline void ListDocumentsRequest::set_collection_id(const char* value, size_t size) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsRequest.collection_id) } inline ::std::string* ListDocumentsRequest::mutable_collection_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.collection_id) return collection_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsRequest::release_collection_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.collection_id) return collection_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4371,7 +4371,7 @@ inline void ListDocumentsRequest::set_allocated_collection_id(::std::string* col } collection_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), collection_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.collection_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.collection_id) } // int32 page_size = 3; @@ -4379,13 +4379,13 @@ inline void ListDocumentsRequest::clear_page_size() { page_size_ = 0; } inline ::google::protobuf::int32 ListDocumentsRequest::page_size() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.page_size) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.page_size) return page_size_; } inline void ListDocumentsRequest::set_page_size(::google::protobuf::int32 value) { page_size_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.page_size) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.page_size) } // string page_token = 4; @@ -4393,41 +4393,41 @@ inline void ListDocumentsRequest::clear_page_token() { page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListDocumentsRequest::page_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.page_token) return page_token_.GetNoArena(); } inline void ListDocumentsRequest::set_page_token(const ::std::string& value) { page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.page_token) } #if LANG_CXX11 inline void ListDocumentsRequest::set_page_token(::std::string&& value) { page_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsRequest.page_token) } #endif inline void ListDocumentsRequest::set_page_token(const char* value) { GOOGLE_DCHECK(value != NULL); page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsRequest.page_token) } inline void ListDocumentsRequest::set_page_token(const char* value, size_t size) { page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsRequest.page_token) } inline ::std::string* ListDocumentsRequest::mutable_page_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.page_token) return page_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsRequest::release_page_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.page_token) return page_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4438,7 +4438,7 @@ inline void ListDocumentsRequest::set_allocated_page_token(::std::string* page_t } page_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), page_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.page_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.page_token) } // string order_by = 6; @@ -4446,41 +4446,41 @@ inline void ListDocumentsRequest::clear_order_by() { order_by_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListDocumentsRequest::order_by() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.order_by) return order_by_.GetNoArena(); } inline void ListDocumentsRequest::set_order_by(const ::std::string& value) { order_by_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.order_by) } #if LANG_CXX11 inline void ListDocumentsRequest::set_order_by(::std::string&& value) { order_by_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsRequest.order_by) } #endif inline void ListDocumentsRequest::set_order_by(const char* value) { GOOGLE_DCHECK(value != NULL); order_by_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsRequest.order_by) } inline void ListDocumentsRequest::set_order_by(const char* value, size_t size) { order_by_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsRequest.order_by) } inline ::std::string* ListDocumentsRequest::mutable_order_by() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.order_by) return order_by_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsRequest::release_order_by() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.order_by) return order_by_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4491,35 +4491,35 @@ inline void ListDocumentsRequest::set_allocated_order_by(::std::string* order_by } order_by_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), order_by); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.order_by) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.order_by) } -// .google.firestore.v1beta1.DocumentMask mask = 7; +// .google.firestore.v1.DocumentMask mask = 7; inline bool ListDocumentsRequest::has_mask() const { return this != internal_default_instance() && mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& ListDocumentsRequest::mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& ListDocumentsRequest::mask() const { + const ::google::firestore::v1::DocumentMask* p = mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* ListDocumentsRequest::release_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.mask) +inline ::google::firestore::v1::DocumentMask* ListDocumentsRequest::release_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.mask) - ::google::firestore::v1beta1::DocumentMask* temp = mask_; + ::google::firestore::v1::DocumentMask* temp = mask_; mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* ListDocumentsRequest::mutable_mask() { +inline ::google::firestore::v1::DocumentMask* ListDocumentsRequest::mutable_mask() { if (mask_ == NULL) { - mask_ = new ::google::firestore::v1beta1::DocumentMask; + mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.mask) return mask_; } -inline void ListDocumentsRequest::set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask) { +inline void ListDocumentsRequest::set_allocated_mask(::google::firestore::v1::DocumentMask* mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(mask_); @@ -4535,7 +4535,7 @@ inline void ListDocumentsRequest::set_allocated_mask(::google::firestore::v1beta } mask_ = mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.mask) } // bytes transaction = 8; @@ -4552,25 +4552,25 @@ inline void ListDocumentsRequest::clear_transaction() { } } inline const ::std::string& ListDocumentsRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.transaction) if (has_transaction()) { return consistency_selector_.transaction_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void ListDocumentsRequest::set_transaction(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.transaction) } #if LANG_CXX11 inline void ListDocumentsRequest::set_transaction(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); @@ -4578,7 +4578,7 @@ inline void ListDocumentsRequest::set_transaction(::std::string&& value) { } consistency_selector_.transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsRequest.transaction) } #endif inline void ListDocumentsRequest::set_transaction(const char* value) { @@ -4590,7 +4590,7 @@ inline void ListDocumentsRequest::set_transaction(const char* value) { } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsRequest.transaction) } inline void ListDocumentsRequest::set_transaction(const void* value, size_t size) { if (!has_transaction()) { @@ -4600,7 +4600,7 @@ inline void ListDocumentsRequest::set_transaction(const void* value, size_t size } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsRequest.transaction) } inline ::std::string* ListDocumentsRequest::mutable_transaction() { if (!has_transaction()) { @@ -4608,11 +4608,11 @@ inline ::std::string* ListDocumentsRequest::mutable_transaction() { set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.transaction) return consistency_selector_.transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.transaction) if (has_transaction()) { clear_has_consistency_selector(); return consistency_selector_.transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -4630,7 +4630,7 @@ inline void ListDocumentsRequest::set_allocated_transaction(::std::string* trans consistency_selector_.transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsRequest.transaction) } // .google.protobuf.Timestamp read_time = 10; @@ -4641,7 +4641,7 @@ inline void ListDocumentsRequest::set_has_read_time() { _oneof_case_[0] = kReadTime; } inline ::google::protobuf::Timestamp* ListDocumentsRequest::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsRequest.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsRequest.read_time) if (has_read_time()) { clear_has_consistency_selector(); ::google::protobuf::Timestamp* temp = consistency_selector_.read_time_; @@ -4652,7 +4652,7 @@ inline ::google::protobuf::Timestamp* ListDocumentsRequest::release_read_time() } } inline const ::google::protobuf::Timestamp& ListDocumentsRequest::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.read_time) return has_read_time() ? *consistency_selector_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -4663,7 +4663,7 @@ inline ::google::protobuf::Timestamp* ListDocumentsRequest::mutable_read_time() set_has_read_time(); consistency_selector_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsRequest.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsRequest.read_time) return consistency_selector_.read_time_; } @@ -4672,13 +4672,13 @@ inline void ListDocumentsRequest::clear_show_missing() { show_missing_ = false; } inline bool ListDocumentsRequest::show_missing() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsRequest.show_missing) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsRequest.show_missing) return show_missing_; } inline void ListDocumentsRequest::set_show_missing(bool value) { show_missing_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsRequest.show_missing) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsRequest.show_missing) } inline bool ListDocumentsRequest::has_consistency_selector() const { @@ -4694,30 +4694,30 @@ inline ListDocumentsRequest::ConsistencySelectorCase ListDocumentsRequest::consi // ListDocumentsResponse -// repeated .google.firestore.v1beta1.Document documents = 1; +// repeated .google.firestore.v1.Document documents = 1; inline int ListDocumentsResponse::documents_size() const { return documents_.size(); } -inline const ::google::firestore::v1beta1::Document& ListDocumentsResponse::documents(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsResponse.documents) +inline const ::google::firestore::v1::Document& ListDocumentsResponse::documents(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsResponse.documents) return documents_.Get(index); } -inline ::google::firestore::v1beta1::Document* ListDocumentsResponse::mutable_documents(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsResponse.documents) +inline ::google::firestore::v1::Document* ListDocumentsResponse::mutable_documents(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsResponse.documents) return documents_.Mutable(index); } -inline ::google::firestore::v1beta1::Document* ListDocumentsResponse::add_documents() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.ListDocumentsResponse.documents) +inline ::google::firestore::v1::Document* ListDocumentsResponse::add_documents() { + // @@protoc_insertion_point(field_add:google.firestore.v1.ListDocumentsResponse.documents) return documents_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Document >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Document >* ListDocumentsResponse::mutable_documents() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.ListDocumentsResponse.documents) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.ListDocumentsResponse.documents) return &documents_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Document >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Document >& ListDocumentsResponse::documents() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.ListDocumentsResponse.documents) + // @@protoc_insertion_point(field_list:google.firestore.v1.ListDocumentsResponse.documents) return documents_; } @@ -4726,41 +4726,41 @@ inline void ListDocumentsResponse::clear_next_page_token() { next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListDocumentsResponse::next_page_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListDocumentsResponse.next_page_token) return next_page_token_.GetNoArena(); } inline void ListDocumentsResponse::set_next_page_token(const ::std::string& value) { next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListDocumentsResponse.next_page_token) } #if LANG_CXX11 inline void ListDocumentsResponse::set_next_page_token(::std::string&& value) { next_page_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListDocumentsResponse.next_page_token) } #endif inline void ListDocumentsResponse::set_next_page_token(const char* value) { GOOGLE_DCHECK(value != NULL); next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListDocumentsResponse.next_page_token) } inline void ListDocumentsResponse::set_next_page_token(const char* value, size_t size) { next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListDocumentsResponse.next_page_token) } inline ::std::string* ListDocumentsResponse::mutable_next_page_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListDocumentsResponse.next_page_token) return next_page_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListDocumentsResponse::release_next_page_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListDocumentsResponse.next_page_token) return next_page_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4771,7 +4771,7 @@ inline void ListDocumentsResponse::set_allocated_next_page_token(::std::string* } next_page_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), next_page_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListDocumentsResponse.next_page_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListDocumentsResponse.next_page_token) } // ------------------------------------------------------------------- @@ -4783,41 +4783,41 @@ inline void CreateDocumentRequest::clear_parent() { parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& CreateDocumentRequest::parent() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_get:google.firestore.v1.CreateDocumentRequest.parent) return parent_.GetNoArena(); } inline void CreateDocumentRequest::set_parent(const ::std::string& value) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_set:google.firestore.v1.CreateDocumentRequest.parent) } #if LANG_CXX11 inline void CreateDocumentRequest::set_parent(::std::string&& value) { parent_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.CreateDocumentRequest.parent) } #endif inline void CreateDocumentRequest::set_parent(const char* value) { GOOGLE_DCHECK(value != NULL); parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.CreateDocumentRequest.parent) } inline void CreateDocumentRequest::set_parent(const char* value, size_t size) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.CreateDocumentRequest.parent) } inline ::std::string* CreateDocumentRequest::mutable_parent() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CreateDocumentRequest.parent) return parent_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CreateDocumentRequest::release_parent() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_release:google.firestore.v1.CreateDocumentRequest.parent) return parent_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4828,7 +4828,7 @@ inline void CreateDocumentRequest::set_allocated_parent(::std::string* parent) { } parent_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parent); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CreateDocumentRequest.parent) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CreateDocumentRequest.parent) } // string collection_id = 2; @@ -4836,41 +4836,41 @@ inline void CreateDocumentRequest::clear_collection_id() { collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& CreateDocumentRequest::collection_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.CreateDocumentRequest.collection_id) return collection_id_.GetNoArena(); } inline void CreateDocumentRequest::set_collection_id(const ::std::string& value) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.CreateDocumentRequest.collection_id) } #if LANG_CXX11 inline void CreateDocumentRequest::set_collection_id(::std::string&& value) { collection_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.CreateDocumentRequest.collection_id) } #endif inline void CreateDocumentRequest::set_collection_id(const char* value) { GOOGLE_DCHECK(value != NULL); collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.CreateDocumentRequest.collection_id) } inline void CreateDocumentRequest::set_collection_id(const char* value, size_t size) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.CreateDocumentRequest.collection_id) } inline ::std::string* CreateDocumentRequest::mutable_collection_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CreateDocumentRequest.collection_id) return collection_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CreateDocumentRequest::release_collection_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.CreateDocumentRequest.collection_id) return collection_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4881,7 +4881,7 @@ inline void CreateDocumentRequest::set_allocated_collection_id(::std::string* co } collection_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), collection_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CreateDocumentRequest.collection_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CreateDocumentRequest.collection_id) } // string document_id = 3; @@ -4889,41 +4889,41 @@ inline void CreateDocumentRequest::clear_document_id() { document_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& CreateDocumentRequest::document_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.CreateDocumentRequest.document_id) return document_id_.GetNoArena(); } inline void CreateDocumentRequest::set_document_id(const ::std::string& value) { document_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.CreateDocumentRequest.document_id) } #if LANG_CXX11 inline void CreateDocumentRequest::set_document_id(::std::string&& value) { document_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.CreateDocumentRequest.document_id) } #endif inline void CreateDocumentRequest::set_document_id(const char* value) { GOOGLE_DCHECK(value != NULL); document_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.CreateDocumentRequest.document_id) } inline void CreateDocumentRequest::set_document_id(const char* value, size_t size) { document_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.CreateDocumentRequest.document_id) } inline ::std::string* CreateDocumentRequest::mutable_document_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CreateDocumentRequest.document_id) return document_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CreateDocumentRequest::release_document_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.CreateDocumentRequest.document_id) return document_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -4934,35 +4934,35 @@ inline void CreateDocumentRequest::set_allocated_document_id(::std::string* docu } document_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), document_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CreateDocumentRequest.document_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CreateDocumentRequest.document_id) } -// .google.firestore.v1beta1.Document document = 4; +// .google.firestore.v1.Document document = 4; inline bool CreateDocumentRequest::has_document() const { return this != internal_default_instance() && document_ != NULL; } -inline const ::google::firestore::v1beta1::Document& CreateDocumentRequest::document() const { - const ::google::firestore::v1beta1::Document* p = document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CreateDocumentRequest.document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Document_default_instance_); +inline const ::google::firestore::v1::Document& CreateDocumentRequest::document() const { + const ::google::firestore::v1::Document* p = document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.CreateDocumentRequest.document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* CreateDocumentRequest::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CreateDocumentRequest.document) +inline ::google::firestore::v1::Document* CreateDocumentRequest::release_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.CreateDocumentRequest.document) - ::google::firestore::v1beta1::Document* temp = document_; + ::google::firestore::v1::Document* temp = document_; document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Document* CreateDocumentRequest::mutable_document() { +inline ::google::firestore::v1::Document* CreateDocumentRequest::mutable_document() { if (document_ == NULL) { - document_ = new ::google::firestore::v1beta1::Document; + document_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CreateDocumentRequest.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CreateDocumentRequest.document) return document_; } -inline void CreateDocumentRequest::set_allocated_document(::google::firestore::v1beta1::Document* document) { +inline void CreateDocumentRequest::set_allocated_document(::google::firestore::v1::Document* document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(document_); @@ -4978,35 +4978,35 @@ inline void CreateDocumentRequest::set_allocated_document(::google::firestore::v } document_ = document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CreateDocumentRequest.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CreateDocumentRequest.document) } -// .google.firestore.v1beta1.DocumentMask mask = 5; +// .google.firestore.v1.DocumentMask mask = 5; inline bool CreateDocumentRequest::has_mask() const { return this != internal_default_instance() && mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& CreateDocumentRequest::mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CreateDocumentRequest.mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& CreateDocumentRequest::mask() const { + const ::google::firestore::v1::DocumentMask* p = mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.CreateDocumentRequest.mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* CreateDocumentRequest::release_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CreateDocumentRequest.mask) +inline ::google::firestore::v1::DocumentMask* CreateDocumentRequest::release_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.CreateDocumentRequest.mask) - ::google::firestore::v1beta1::DocumentMask* temp = mask_; + ::google::firestore::v1::DocumentMask* temp = mask_; mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* CreateDocumentRequest::mutable_mask() { +inline ::google::firestore::v1::DocumentMask* CreateDocumentRequest::mutable_mask() { if (mask_ == NULL) { - mask_ = new ::google::firestore::v1beta1::DocumentMask; + mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CreateDocumentRequest.mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CreateDocumentRequest.mask) return mask_; } -inline void CreateDocumentRequest::set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask) { +inline void CreateDocumentRequest::set_allocated_mask(::google::firestore::v1::DocumentMask* mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(mask_); @@ -5022,39 +5022,39 @@ inline void CreateDocumentRequest::set_allocated_mask(::google::firestore::v1bet } mask_ = mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CreateDocumentRequest.mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CreateDocumentRequest.mask) } // ------------------------------------------------------------------- // UpdateDocumentRequest -// .google.firestore.v1beta1.Document document = 1; +// .google.firestore.v1.Document document = 1; inline bool UpdateDocumentRequest::has_document() const { return this != internal_default_instance() && document_ != NULL; } -inline const ::google::firestore::v1beta1::Document& UpdateDocumentRequest::document() const { - const ::google::firestore::v1beta1::Document* p = document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.UpdateDocumentRequest.document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Document_default_instance_); +inline const ::google::firestore::v1::Document& UpdateDocumentRequest::document() const { + const ::google::firestore::v1::Document* p = document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.UpdateDocumentRequest.document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* UpdateDocumentRequest::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.UpdateDocumentRequest.document) +inline ::google::firestore::v1::Document* UpdateDocumentRequest::release_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.UpdateDocumentRequest.document) - ::google::firestore::v1beta1::Document* temp = document_; + ::google::firestore::v1::Document* temp = document_; document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Document* UpdateDocumentRequest::mutable_document() { +inline ::google::firestore::v1::Document* UpdateDocumentRequest::mutable_document() { if (document_ == NULL) { - document_ = new ::google::firestore::v1beta1::Document; + document_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.UpdateDocumentRequest.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.UpdateDocumentRequest.document) return document_; } -inline void UpdateDocumentRequest::set_allocated_document(::google::firestore::v1beta1::Document* document) { +inline void UpdateDocumentRequest::set_allocated_document(::google::firestore::v1::Document* document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(document_); @@ -5070,35 +5070,35 @@ inline void UpdateDocumentRequest::set_allocated_document(::google::firestore::v } document_ = document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.UpdateDocumentRequest.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.UpdateDocumentRequest.document) } -// .google.firestore.v1beta1.DocumentMask update_mask = 2; +// .google.firestore.v1.DocumentMask update_mask = 2; inline bool UpdateDocumentRequest::has_update_mask() const { return this != internal_default_instance() && update_mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& UpdateDocumentRequest::update_mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = update_mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.UpdateDocumentRequest.update_mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& UpdateDocumentRequest::update_mask() const { + const ::google::firestore::v1::DocumentMask* p = update_mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.UpdateDocumentRequest.update_mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* UpdateDocumentRequest::release_update_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.UpdateDocumentRequest.update_mask) +inline ::google::firestore::v1::DocumentMask* UpdateDocumentRequest::release_update_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.UpdateDocumentRequest.update_mask) - ::google::firestore::v1beta1::DocumentMask* temp = update_mask_; + ::google::firestore::v1::DocumentMask* temp = update_mask_; update_mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* UpdateDocumentRequest::mutable_update_mask() { +inline ::google::firestore::v1::DocumentMask* UpdateDocumentRequest::mutable_update_mask() { if (update_mask_ == NULL) { - update_mask_ = new ::google::firestore::v1beta1::DocumentMask; + update_mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.UpdateDocumentRequest.update_mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.UpdateDocumentRequest.update_mask) return update_mask_; } -inline void UpdateDocumentRequest::set_allocated_update_mask(::google::firestore::v1beta1::DocumentMask* update_mask) { +inline void UpdateDocumentRequest::set_allocated_update_mask(::google::firestore::v1::DocumentMask* update_mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(update_mask_); @@ -5114,35 +5114,35 @@ inline void UpdateDocumentRequest::set_allocated_update_mask(::google::firestore } update_mask_ = update_mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.UpdateDocumentRequest.update_mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.UpdateDocumentRequest.update_mask) } -// .google.firestore.v1beta1.DocumentMask mask = 3; +// .google.firestore.v1.DocumentMask mask = 3; inline bool UpdateDocumentRequest::has_mask() const { return this != internal_default_instance() && mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& UpdateDocumentRequest::mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.UpdateDocumentRequest.mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& UpdateDocumentRequest::mask() const { + const ::google::firestore::v1::DocumentMask* p = mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.UpdateDocumentRequest.mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* UpdateDocumentRequest::release_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.UpdateDocumentRequest.mask) +inline ::google::firestore::v1::DocumentMask* UpdateDocumentRequest::release_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.UpdateDocumentRequest.mask) - ::google::firestore::v1beta1::DocumentMask* temp = mask_; + ::google::firestore::v1::DocumentMask* temp = mask_; mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* UpdateDocumentRequest::mutable_mask() { +inline ::google::firestore::v1::DocumentMask* UpdateDocumentRequest::mutable_mask() { if (mask_ == NULL) { - mask_ = new ::google::firestore::v1beta1::DocumentMask; + mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.UpdateDocumentRequest.mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.UpdateDocumentRequest.mask) return mask_; } -inline void UpdateDocumentRequest::set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask) { +inline void UpdateDocumentRequest::set_allocated_mask(::google::firestore::v1::DocumentMask* mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(mask_); @@ -5158,35 +5158,35 @@ inline void UpdateDocumentRequest::set_allocated_mask(::google::firestore::v1bet } mask_ = mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.UpdateDocumentRequest.mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.UpdateDocumentRequest.mask) } -// .google.firestore.v1beta1.Precondition current_document = 4; +// .google.firestore.v1.Precondition current_document = 4; inline bool UpdateDocumentRequest::has_current_document() const { return this != internal_default_instance() && current_document_ != NULL; } -inline const ::google::firestore::v1beta1::Precondition& UpdateDocumentRequest::current_document() const { - const ::google::firestore::v1beta1::Precondition* p = current_document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.UpdateDocumentRequest.current_document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Precondition_default_instance_); +inline const ::google::firestore::v1::Precondition& UpdateDocumentRequest::current_document() const { + const ::google::firestore::v1::Precondition* p = current_document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.UpdateDocumentRequest.current_document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Precondition_default_instance_); } -inline ::google::firestore::v1beta1::Precondition* UpdateDocumentRequest::release_current_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.UpdateDocumentRequest.current_document) +inline ::google::firestore::v1::Precondition* UpdateDocumentRequest::release_current_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.UpdateDocumentRequest.current_document) - ::google::firestore::v1beta1::Precondition* temp = current_document_; + ::google::firestore::v1::Precondition* temp = current_document_; current_document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Precondition* UpdateDocumentRequest::mutable_current_document() { +inline ::google::firestore::v1::Precondition* UpdateDocumentRequest::mutable_current_document() { if (current_document_ == NULL) { - current_document_ = new ::google::firestore::v1beta1::Precondition; + current_document_ = new ::google::firestore::v1::Precondition; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.UpdateDocumentRequest.current_document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.UpdateDocumentRequest.current_document) return current_document_; } -inline void UpdateDocumentRequest::set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document) { +inline void UpdateDocumentRequest::set_allocated_current_document(::google::firestore::v1::Precondition* current_document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(current_document_); @@ -5202,7 +5202,7 @@ inline void UpdateDocumentRequest::set_allocated_current_document(::google::fire } current_document_ = current_document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.UpdateDocumentRequest.current_document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.UpdateDocumentRequest.current_document) } // ------------------------------------------------------------------- @@ -5214,41 +5214,41 @@ inline void DeleteDocumentRequest::clear_name() { name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& DeleteDocumentRequest::name() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_get:google.firestore.v1.DeleteDocumentRequest.name) return name_.GetNoArena(); } inline void DeleteDocumentRequest::set_name(const ::std::string& value) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_set:google.firestore.v1.DeleteDocumentRequest.name) } #if LANG_CXX11 inline void DeleteDocumentRequest::set_name(::std::string&& value) { name_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.DeleteDocumentRequest.name) } #endif inline void DeleteDocumentRequest::set_name(const char* value) { GOOGLE_DCHECK(value != NULL); name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DeleteDocumentRequest.name) } inline void DeleteDocumentRequest::set_name(const char* value, size_t size) { name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DeleteDocumentRequest.name) } inline ::std::string* DeleteDocumentRequest::mutable_name() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DeleteDocumentRequest.name) return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* DeleteDocumentRequest::release_name() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_release:google.firestore.v1.DeleteDocumentRequest.name) return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -5259,35 +5259,35 @@ inline void DeleteDocumentRequest::set_allocated_name(::std::string* name) { } name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DeleteDocumentRequest.name) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DeleteDocumentRequest.name) } -// .google.firestore.v1beta1.Precondition current_document = 2; +// .google.firestore.v1.Precondition current_document = 2; inline bool DeleteDocumentRequest::has_current_document() const { return this != internal_default_instance() && current_document_ != NULL; } -inline const ::google::firestore::v1beta1::Precondition& DeleteDocumentRequest::current_document() const { - const ::google::firestore::v1beta1::Precondition* p = current_document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DeleteDocumentRequest.current_document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Precondition_default_instance_); +inline const ::google::firestore::v1::Precondition& DeleteDocumentRequest::current_document() const { + const ::google::firestore::v1::Precondition* p = current_document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.DeleteDocumentRequest.current_document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Precondition_default_instance_); } -inline ::google::firestore::v1beta1::Precondition* DeleteDocumentRequest::release_current_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DeleteDocumentRequest.current_document) +inline ::google::firestore::v1::Precondition* DeleteDocumentRequest::release_current_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DeleteDocumentRequest.current_document) - ::google::firestore::v1beta1::Precondition* temp = current_document_; + ::google::firestore::v1::Precondition* temp = current_document_; current_document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Precondition* DeleteDocumentRequest::mutable_current_document() { +inline ::google::firestore::v1::Precondition* DeleteDocumentRequest::mutable_current_document() { if (current_document_ == NULL) { - current_document_ = new ::google::firestore::v1beta1::Precondition; + current_document_ = new ::google::firestore::v1::Precondition; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DeleteDocumentRequest.current_document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DeleteDocumentRequest.current_document) return current_document_; } -inline void DeleteDocumentRequest::set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document) { +inline void DeleteDocumentRequest::set_allocated_current_document(::google::firestore::v1::Precondition* current_document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(current_document_); @@ -5303,7 +5303,7 @@ inline void DeleteDocumentRequest::set_allocated_current_document(::google::fire } current_document_ = current_document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DeleteDocumentRequest.current_document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DeleteDocumentRequest.current_document) } // ------------------------------------------------------------------- @@ -5315,41 +5315,41 @@ inline void BatchGetDocumentsRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& BatchGetDocumentsRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.database) return database_.GetNoArena(); } inline void BatchGetDocumentsRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.database) } #if LANG_CXX11 inline void BatchGetDocumentsRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BatchGetDocumentsRequest.database) } #endif inline void BatchGetDocumentsRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BatchGetDocumentsRequest.database) } inline void BatchGetDocumentsRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BatchGetDocumentsRequest.database) } inline ::std::string* BatchGetDocumentsRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BatchGetDocumentsRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -5360,7 +5360,7 @@ inline void BatchGetDocumentsRequest::set_allocated_database(::std::string* data } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.database) } // repeated string documents = 2; @@ -5371,93 +5371,93 @@ inline void BatchGetDocumentsRequest::clear_documents() { documents_.Clear(); } inline const ::std::string& BatchGetDocumentsRequest::documents(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.documents) return documents_.Get(index); } inline ::std::string* BatchGetDocumentsRequest::mutable_documents(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.documents) return documents_.Mutable(index); } inline void BatchGetDocumentsRequest::set_documents(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.documents) documents_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void BatchGetDocumentsRequest::set_documents(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.documents) documents_.Mutable(index)->assign(std::move(value)); } #endif inline void BatchGetDocumentsRequest::set_documents(int index, const char* value) { GOOGLE_DCHECK(value != NULL); documents_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BatchGetDocumentsRequest.documents) } inline void BatchGetDocumentsRequest::set_documents(int index, const char* value, size_t size) { documents_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BatchGetDocumentsRequest.documents) } inline ::std::string* BatchGetDocumentsRequest::add_documents() { - // @@protoc_insertion_point(field_add_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.BatchGetDocumentsRequest.documents) return documents_.Add(); } inline void BatchGetDocumentsRequest::add_documents(const ::std::string& value) { documents_.Add()->assign(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_add:google.firestore.v1.BatchGetDocumentsRequest.documents) } #if LANG_CXX11 inline void BatchGetDocumentsRequest::add_documents(::std::string&& value) { documents_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_add:google.firestore.v1.BatchGetDocumentsRequest.documents) } #endif inline void BatchGetDocumentsRequest::add_documents(const char* value) { GOOGLE_DCHECK(value != NULL); documents_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_add_char:google.firestore.v1.BatchGetDocumentsRequest.documents) } inline void BatchGetDocumentsRequest::add_documents(const char* value, size_t size) { documents_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_add_pointer:google.firestore.v1.BatchGetDocumentsRequest.documents) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& BatchGetDocumentsRequest::documents() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_list:google.firestore.v1.BatchGetDocumentsRequest.documents) return documents_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* BatchGetDocumentsRequest::mutable_documents() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.BatchGetDocumentsRequest.documents) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.BatchGetDocumentsRequest.documents) return &documents_; } -// .google.firestore.v1beta1.DocumentMask mask = 3; +// .google.firestore.v1.DocumentMask mask = 3; inline bool BatchGetDocumentsRequest::has_mask() const { return this != internal_default_instance() && mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& BatchGetDocumentsRequest::mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& BatchGetDocumentsRequest::mask() const { + const ::google::firestore::v1::DocumentMask* p = mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* BatchGetDocumentsRequest::release_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsRequest.mask) +inline ::google::firestore::v1::DocumentMask* BatchGetDocumentsRequest::release_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsRequest.mask) - ::google::firestore::v1beta1::DocumentMask* temp = mask_; + ::google::firestore::v1::DocumentMask* temp = mask_; mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* BatchGetDocumentsRequest::mutable_mask() { +inline ::google::firestore::v1::DocumentMask* BatchGetDocumentsRequest::mutable_mask() { if (mask_ == NULL) { - mask_ = new ::google::firestore::v1beta1::DocumentMask; + mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.mask) return mask_; } -inline void BatchGetDocumentsRequest::set_allocated_mask(::google::firestore::v1beta1::DocumentMask* mask) { +inline void BatchGetDocumentsRequest::set_allocated_mask(::google::firestore::v1::DocumentMask* mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(mask_); @@ -5473,7 +5473,7 @@ inline void BatchGetDocumentsRequest::set_allocated_mask(::google::firestore::v1 } mask_ = mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.mask) } // bytes transaction = 4; @@ -5490,25 +5490,25 @@ inline void BatchGetDocumentsRequest::clear_transaction() { } } inline const ::std::string& BatchGetDocumentsRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.transaction) if (has_transaction()) { return consistency_selector_.transaction_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void BatchGetDocumentsRequest::set_transaction(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.transaction) } #if LANG_CXX11 inline void BatchGetDocumentsRequest::set_transaction(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); @@ -5516,7 +5516,7 @@ inline void BatchGetDocumentsRequest::set_transaction(::std::string&& value) { } consistency_selector_.transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BatchGetDocumentsRequest.transaction) } #endif inline void BatchGetDocumentsRequest::set_transaction(const char* value) { @@ -5528,7 +5528,7 @@ inline void BatchGetDocumentsRequest::set_transaction(const char* value) { } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BatchGetDocumentsRequest.transaction) } inline void BatchGetDocumentsRequest::set_transaction(const void* value, size_t size) { if (!has_transaction()) { @@ -5538,7 +5538,7 @@ inline void BatchGetDocumentsRequest::set_transaction(const void* value, size_t } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BatchGetDocumentsRequest.transaction) } inline ::std::string* BatchGetDocumentsRequest::mutable_transaction() { if (!has_transaction()) { @@ -5546,11 +5546,11 @@ inline ::std::string* BatchGetDocumentsRequest::mutable_transaction() { set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.transaction) return consistency_selector_.transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BatchGetDocumentsRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsRequest.transaction) if (has_transaction()) { clear_has_consistency_selector(); return consistency_selector_.transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -5568,40 +5568,40 @@ inline void BatchGetDocumentsRequest::set_allocated_transaction(::std::string* t consistency_selector_.transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsRequest.transaction) } -// .google.firestore.v1beta1.TransactionOptions new_transaction = 5; +// .google.firestore.v1.TransactionOptions new_transaction = 5; inline bool BatchGetDocumentsRequest::has_new_transaction() const { return consistency_selector_case() == kNewTransaction; } inline void BatchGetDocumentsRequest::set_has_new_transaction() { _oneof_case_[0] = kNewTransaction; } -inline ::google::firestore::v1beta1::TransactionOptions* BatchGetDocumentsRequest::release_new_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction) +inline ::google::firestore::v1::TransactionOptions* BatchGetDocumentsRequest::release_new_transaction() { + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsRequest.new_transaction) if (has_new_transaction()) { clear_has_consistency_selector(); - ::google::firestore::v1beta1::TransactionOptions* temp = consistency_selector_.new_transaction_; + ::google::firestore::v1::TransactionOptions* temp = consistency_selector_.new_transaction_; consistency_selector_.new_transaction_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::TransactionOptions& BatchGetDocumentsRequest::new_transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction) +inline const ::google::firestore::v1::TransactionOptions& BatchGetDocumentsRequest::new_transaction() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.new_transaction) return has_new_transaction() ? *consistency_selector_.new_transaction_ - : *reinterpret_cast< ::google::firestore::v1beta1::TransactionOptions*>(&::google::firestore::v1beta1::_TransactionOptions_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::TransactionOptions*>(&::google::firestore::v1::_TransactionOptions_default_instance_); } -inline ::google::firestore::v1beta1::TransactionOptions* BatchGetDocumentsRequest::mutable_new_transaction() { +inline ::google::firestore::v1::TransactionOptions* BatchGetDocumentsRequest::mutable_new_transaction() { if (!has_new_transaction()) { clear_consistency_selector(); set_has_new_transaction(); - consistency_selector_.new_transaction_ = new ::google::firestore::v1beta1::TransactionOptions; + consistency_selector_.new_transaction_ = new ::google::firestore::v1::TransactionOptions; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.new_transaction) return consistency_selector_.new_transaction_; } @@ -5613,7 +5613,7 @@ inline void BatchGetDocumentsRequest::set_has_read_time() { _oneof_case_[0] = kReadTime; } inline ::google::protobuf::Timestamp* BatchGetDocumentsRequest::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsRequest.read_time) if (has_read_time()) { clear_has_consistency_selector(); ::google::protobuf::Timestamp* temp = consistency_selector_.read_time_; @@ -5624,7 +5624,7 @@ inline ::google::protobuf::Timestamp* BatchGetDocumentsRequest::release_read_tim } } inline const ::google::protobuf::Timestamp& BatchGetDocumentsRequest::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsRequest.read_time) return has_read_time() ? *consistency_selector_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -5635,7 +5635,7 @@ inline ::google::protobuf::Timestamp* BatchGetDocumentsRequest::mutable_read_tim set_has_read_time(); consistency_selector_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsRequest.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsRequest.read_time) return consistency_selector_.read_time_; } @@ -5652,37 +5652,37 @@ inline BatchGetDocumentsRequest::ConsistencySelectorCase BatchGetDocumentsReques // BatchGetDocumentsResponse -// .google.firestore.v1beta1.Document found = 1; +// .google.firestore.v1.Document found = 1; inline bool BatchGetDocumentsResponse::has_found() const { return result_case() == kFound; } inline void BatchGetDocumentsResponse::set_has_found() { _oneof_case_[0] = kFound; } -inline ::google::firestore::v1beta1::Document* BatchGetDocumentsResponse::release_found() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsResponse.found) +inline ::google::firestore::v1::Document* BatchGetDocumentsResponse::release_found() { + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsResponse.found) if (has_found()) { clear_has_result(); - ::google::firestore::v1beta1::Document* temp = result_.found_; + ::google::firestore::v1::Document* temp = result_.found_; result_.found_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Document& BatchGetDocumentsResponse::found() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsResponse.found) +inline const ::google::firestore::v1::Document& BatchGetDocumentsResponse::found() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsResponse.found) return has_found() ? *result_.found_ - : *reinterpret_cast< ::google::firestore::v1beta1::Document*>(&::google::firestore::v1beta1::_Document_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Document*>(&::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* BatchGetDocumentsResponse::mutable_found() { +inline ::google::firestore::v1::Document* BatchGetDocumentsResponse::mutable_found() { if (!has_found()) { clear_result(); set_has_found(); - result_.found_ = new ::google::firestore::v1beta1::Document; + result_.found_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsResponse.found) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsResponse.found) return result_.found_; } @@ -5700,25 +5700,25 @@ inline void BatchGetDocumentsResponse::clear_missing() { } } inline const ::std::string& BatchGetDocumentsResponse::missing() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsResponse.missing) if (has_missing()) { return result_.missing_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void BatchGetDocumentsResponse::set_missing(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsResponse.missing) if (!has_missing()) { clear_result(); set_has_missing(); result_.missing_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } result_.missing_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsResponse.missing) } #if LANG_CXX11 inline void BatchGetDocumentsResponse::set_missing(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsResponse.missing) if (!has_missing()) { clear_result(); set_has_missing(); @@ -5726,7 +5726,7 @@ inline void BatchGetDocumentsResponse::set_missing(::std::string&& value) { } result_.missing_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BatchGetDocumentsResponse.missing) } #endif inline void BatchGetDocumentsResponse::set_missing(const char* value) { @@ -5738,7 +5738,7 @@ inline void BatchGetDocumentsResponse::set_missing(const char* value) { } result_.missing_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BatchGetDocumentsResponse.missing) } inline void BatchGetDocumentsResponse::set_missing(const char* value, size_t size) { if (!has_missing()) { @@ -5748,7 +5748,7 @@ inline void BatchGetDocumentsResponse::set_missing(const char* value, size_t siz } result_.missing_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BatchGetDocumentsResponse.missing) } inline ::std::string* BatchGetDocumentsResponse::mutable_missing() { if (!has_missing()) { @@ -5756,11 +5756,11 @@ inline ::std::string* BatchGetDocumentsResponse::mutable_missing() { set_has_missing(); result_.missing_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsResponse.missing) return result_.missing_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BatchGetDocumentsResponse::release_missing() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsResponse.missing) if (has_missing()) { clear_has_result(); return result_.missing_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -5778,7 +5778,7 @@ inline void BatchGetDocumentsResponse::set_allocated_missing(::std::string* miss result_.missing_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), missing); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.missing) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.missing) } // bytes transaction = 3; @@ -5786,41 +5786,41 @@ inline void BatchGetDocumentsResponse::clear_transaction() { transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& BatchGetDocumentsResponse::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsResponse.transaction) return transaction_.GetNoArena(); } inline void BatchGetDocumentsResponse::set_transaction(const ::std::string& value) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.BatchGetDocumentsResponse.transaction) } #if LANG_CXX11 inline void BatchGetDocumentsResponse::set_transaction(::std::string&& value) { transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BatchGetDocumentsResponse.transaction) } #endif inline void BatchGetDocumentsResponse::set_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BatchGetDocumentsResponse.transaction) } inline void BatchGetDocumentsResponse::set_transaction(const void* value, size_t size) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BatchGetDocumentsResponse.transaction) } inline ::std::string* BatchGetDocumentsResponse::mutable_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsResponse.transaction) return transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BatchGetDocumentsResponse::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsResponse.transaction) return transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -5831,7 +5831,7 @@ inline void BatchGetDocumentsResponse::set_allocated_transaction(::std::string* } transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.transaction) } // .google.protobuf.Timestamp read_time = 4; @@ -5840,12 +5840,12 @@ inline bool BatchGetDocumentsResponse::has_read_time() const { } inline const ::google::protobuf::Timestamp& BatchGetDocumentsResponse::read_time() const { const ::google::protobuf::Timestamp* p = read_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BatchGetDocumentsResponse.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.BatchGetDocumentsResponse.read_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* BatchGetDocumentsResponse::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BatchGetDocumentsResponse.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.BatchGetDocumentsResponse.read_time) ::google::protobuf::Timestamp* temp = read_time_; read_time_ = NULL; @@ -5856,7 +5856,7 @@ inline ::google::protobuf::Timestamp* BatchGetDocumentsResponse::mutable_read_ti if (read_time_ == NULL) { read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BatchGetDocumentsResponse.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BatchGetDocumentsResponse.read_time) return read_time_; } inline void BatchGetDocumentsResponse::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -5876,7 +5876,7 @@ inline void BatchGetDocumentsResponse::set_allocated_read_time(::google::protobu } read_time_ = read_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BatchGetDocumentsResponse.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BatchGetDocumentsResponse.read_time) } inline bool BatchGetDocumentsResponse::has_result() const { @@ -5897,41 +5897,41 @@ inline void BeginTransactionRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& BeginTransactionRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.BeginTransactionRequest.database) return database_.GetNoArena(); } inline void BeginTransactionRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.BeginTransactionRequest.database) } #if LANG_CXX11 inline void BeginTransactionRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BeginTransactionRequest.database) } #endif inline void BeginTransactionRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BeginTransactionRequest.database) } inline void BeginTransactionRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BeginTransactionRequest.database) } inline ::std::string* BeginTransactionRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BeginTransactionRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BeginTransactionRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.BeginTransactionRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -5942,35 +5942,35 @@ inline void BeginTransactionRequest::set_allocated_database(::std::string* datab } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BeginTransactionRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BeginTransactionRequest.database) } -// .google.firestore.v1beta1.TransactionOptions options = 2; +// .google.firestore.v1.TransactionOptions options = 2; inline bool BeginTransactionRequest::has_options() const { return this != internal_default_instance() && options_ != NULL; } -inline const ::google::firestore::v1beta1::TransactionOptions& BeginTransactionRequest::options() const { - const ::google::firestore::v1beta1::TransactionOptions* p = options_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BeginTransactionRequest.options) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_TransactionOptions_default_instance_); +inline const ::google::firestore::v1::TransactionOptions& BeginTransactionRequest::options() const { + const ::google::firestore::v1::TransactionOptions* p = options_; + // @@protoc_insertion_point(field_get:google.firestore.v1.BeginTransactionRequest.options) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_TransactionOptions_default_instance_); } -inline ::google::firestore::v1beta1::TransactionOptions* BeginTransactionRequest::release_options() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BeginTransactionRequest.options) +inline ::google::firestore::v1::TransactionOptions* BeginTransactionRequest::release_options() { + // @@protoc_insertion_point(field_release:google.firestore.v1.BeginTransactionRequest.options) - ::google::firestore::v1beta1::TransactionOptions* temp = options_; + ::google::firestore::v1::TransactionOptions* temp = options_; options_ = NULL; return temp; } -inline ::google::firestore::v1beta1::TransactionOptions* BeginTransactionRequest::mutable_options() { +inline ::google::firestore::v1::TransactionOptions* BeginTransactionRequest::mutable_options() { if (options_ == NULL) { - options_ = new ::google::firestore::v1beta1::TransactionOptions; + options_ = new ::google::firestore::v1::TransactionOptions; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BeginTransactionRequest.options) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BeginTransactionRequest.options) return options_; } -inline void BeginTransactionRequest::set_allocated_options(::google::firestore::v1beta1::TransactionOptions* options) { +inline void BeginTransactionRequest::set_allocated_options(::google::firestore::v1::TransactionOptions* options) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(options_); @@ -5986,7 +5986,7 @@ inline void BeginTransactionRequest::set_allocated_options(::google::firestore:: } options_ = options; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BeginTransactionRequest.options) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BeginTransactionRequest.options) } // ------------------------------------------------------------------- @@ -5998,41 +5998,41 @@ inline void BeginTransactionResponse::clear_transaction() { transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& BeginTransactionResponse::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.BeginTransactionResponse.transaction) return transaction_.GetNoArena(); } inline void BeginTransactionResponse::set_transaction(const ::std::string& value) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.BeginTransactionResponse.transaction) } #if LANG_CXX11 inline void BeginTransactionResponse::set_transaction(::std::string&& value) { transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.BeginTransactionResponse.transaction) } #endif inline void BeginTransactionResponse::set_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.BeginTransactionResponse.transaction) } inline void BeginTransactionResponse::set_transaction(const void* value, size_t size) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.BeginTransactionResponse.transaction) } inline ::std::string* BeginTransactionResponse::mutable_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.BeginTransactionResponse.transaction) return transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* BeginTransactionResponse::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.BeginTransactionResponse.transaction) return transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6043,7 +6043,7 @@ inline void BeginTransactionResponse::set_allocated_transaction(::std::string* t } transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.BeginTransactionResponse.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.BeginTransactionResponse.transaction) } // ------------------------------------------------------------------- @@ -6055,41 +6055,41 @@ inline void CommitRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& CommitRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.CommitRequest.database) return database_.GetNoArena(); } inline void CommitRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.CommitRequest.database) } #if LANG_CXX11 inline void CommitRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.CommitRequest.database) } #endif inline void CommitRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.CommitRequest.database) } inline void CommitRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.CommitRequest.database) } inline ::std::string* CommitRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CommitRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CommitRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.CommitRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6100,33 +6100,33 @@ inline void CommitRequest::set_allocated_database(::std::string* database) { } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CommitRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CommitRequest.database) } -// repeated .google.firestore.v1beta1.Write writes = 2; +// repeated .google.firestore.v1.Write writes = 2; inline int CommitRequest::writes_size() const { return writes_.size(); } -inline const ::google::firestore::v1beta1::Write& CommitRequest::writes(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CommitRequest.writes) +inline const ::google::firestore::v1::Write& CommitRequest::writes(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.CommitRequest.writes) return writes_.Get(index); } -inline ::google::firestore::v1beta1::Write* CommitRequest::mutable_writes(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CommitRequest.writes) +inline ::google::firestore::v1::Write* CommitRequest::mutable_writes(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CommitRequest.writes) return writes_.Mutable(index); } -inline ::google::firestore::v1beta1::Write* CommitRequest::add_writes() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.CommitRequest.writes) +inline ::google::firestore::v1::Write* CommitRequest::add_writes() { + // @@protoc_insertion_point(field_add:google.firestore.v1.CommitRequest.writes) return writes_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* CommitRequest::mutable_writes() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.CommitRequest.writes) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.CommitRequest.writes) return &writes_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& CommitRequest::writes() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.CommitRequest.writes) + // @@protoc_insertion_point(field_list:google.firestore.v1.CommitRequest.writes) return writes_; } @@ -6135,41 +6135,41 @@ inline void CommitRequest::clear_transaction() { transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& CommitRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.CommitRequest.transaction) return transaction_.GetNoArena(); } inline void CommitRequest::set_transaction(const ::std::string& value) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.CommitRequest.transaction) } #if LANG_CXX11 inline void CommitRequest::set_transaction(::std::string&& value) { transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.CommitRequest.transaction) } #endif inline void CommitRequest::set_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.CommitRequest.transaction) } inline void CommitRequest::set_transaction(const void* value, size_t size) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.CommitRequest.transaction) } inline ::std::string* CommitRequest::mutable_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CommitRequest.transaction) return transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* CommitRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.CommitRequest.transaction) return transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6180,37 +6180,37 @@ inline void CommitRequest::set_allocated_transaction(::std::string* transaction) } transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CommitRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CommitRequest.transaction) } // ------------------------------------------------------------------- // CommitResponse -// repeated .google.firestore.v1beta1.WriteResult write_results = 1; +// repeated .google.firestore.v1.WriteResult write_results = 1; inline int CommitResponse::write_results_size() const { return write_results_.size(); } -inline const ::google::firestore::v1beta1::WriteResult& CommitResponse::write_results(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CommitResponse.write_results) +inline const ::google::firestore::v1::WriteResult& CommitResponse::write_results(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.CommitResponse.write_results) return write_results_.Get(index); } -inline ::google::firestore::v1beta1::WriteResult* CommitResponse::mutable_write_results(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CommitResponse.write_results) +inline ::google::firestore::v1::WriteResult* CommitResponse::mutable_write_results(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CommitResponse.write_results) return write_results_.Mutable(index); } -inline ::google::firestore::v1beta1::WriteResult* CommitResponse::add_write_results() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.CommitResponse.write_results) +inline ::google::firestore::v1::WriteResult* CommitResponse::add_write_results() { + // @@protoc_insertion_point(field_add:google.firestore.v1.CommitResponse.write_results) return write_results_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >* CommitResponse::mutable_write_results() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.CommitResponse.write_results) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.CommitResponse.write_results) return &write_results_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >& CommitResponse::write_results() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.CommitResponse.write_results) + // @@protoc_insertion_point(field_list:google.firestore.v1.CommitResponse.write_results) return write_results_; } @@ -6220,12 +6220,12 @@ inline bool CommitResponse::has_commit_time() const { } inline const ::google::protobuf::Timestamp& CommitResponse::commit_time() const { const ::google::protobuf::Timestamp* p = commit_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.CommitResponse.commit_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.CommitResponse.commit_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* CommitResponse::release_commit_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.CommitResponse.commit_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.CommitResponse.commit_time) ::google::protobuf::Timestamp* temp = commit_time_; commit_time_ = NULL; @@ -6236,7 +6236,7 @@ inline ::google::protobuf::Timestamp* CommitResponse::mutable_commit_time() { if (commit_time_ == NULL) { commit_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.CommitResponse.commit_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.CommitResponse.commit_time) return commit_time_; } inline void CommitResponse::set_allocated_commit_time(::google::protobuf::Timestamp* commit_time) { @@ -6256,7 +6256,7 @@ inline void CommitResponse::set_allocated_commit_time(::google::protobuf::Timest } commit_time_ = commit_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.CommitResponse.commit_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.CommitResponse.commit_time) } // ------------------------------------------------------------------- @@ -6268,41 +6268,41 @@ inline void RollbackRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& RollbackRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.RollbackRequest.database) return database_.GetNoArena(); } inline void RollbackRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.RollbackRequest.database) } #if LANG_CXX11 inline void RollbackRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.RollbackRequest.database) } #endif inline void RollbackRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.RollbackRequest.database) } inline void RollbackRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.RollbackRequest.database) } inline ::std::string* RollbackRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RollbackRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RollbackRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.RollbackRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6313,7 +6313,7 @@ inline void RollbackRequest::set_allocated_database(::std::string* database) { } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RollbackRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RollbackRequest.database) } // bytes transaction = 2; @@ -6321,41 +6321,41 @@ inline void RollbackRequest::clear_transaction() { transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& RollbackRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.RollbackRequest.transaction) return transaction_.GetNoArena(); } inline void RollbackRequest::set_transaction(const ::std::string& value) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.RollbackRequest.transaction) } #if LANG_CXX11 inline void RollbackRequest::set_transaction(::std::string&& value) { transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.RollbackRequest.transaction) } #endif inline void RollbackRequest::set_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.RollbackRequest.transaction) } inline void RollbackRequest::set_transaction(const void* value, size_t size) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.RollbackRequest.transaction) } inline ::std::string* RollbackRequest::mutable_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RollbackRequest.transaction) return transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RollbackRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.RollbackRequest.transaction) return transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6366,7 +6366,7 @@ inline void RollbackRequest::set_allocated_transaction(::std::string* transactio } transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RollbackRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RollbackRequest.transaction) } // ------------------------------------------------------------------- @@ -6378,41 +6378,41 @@ inline void RunQueryRequest::clear_parent() { parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& RunQueryRequest::parent() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryRequest.parent) return parent_.GetNoArena(); } inline void RunQueryRequest::set_parent(const ::std::string& value) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryRequest.parent) } #if LANG_CXX11 inline void RunQueryRequest::set_parent(::std::string&& value) { parent_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.RunQueryRequest.parent) } #endif inline void RunQueryRequest::set_parent(const char* value) { GOOGLE_DCHECK(value != NULL); parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.RunQueryRequest.parent) } inline void RunQueryRequest::set_parent(const char* value, size_t size) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.RunQueryRequest.parent) } inline ::std::string* RunQueryRequest::mutable_parent() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryRequest.parent) return parent_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RunQueryRequest::release_parent() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryRequest.parent) return parent_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6423,40 +6423,40 @@ inline void RunQueryRequest::set_allocated_parent(::std::string* parent) { } parent_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parent); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.parent) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.parent) } -// .google.firestore.v1beta1.StructuredQuery structured_query = 2; +// .google.firestore.v1.StructuredQuery structured_query = 2; inline bool RunQueryRequest::has_structured_query() const { return query_type_case() == kStructuredQuery; } inline void RunQueryRequest::set_has_structured_query() { _oneof_case_[0] = kStructuredQuery; } -inline ::google::firestore::v1beta1::StructuredQuery* RunQueryRequest::release_structured_query() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryRequest.structured_query) +inline ::google::firestore::v1::StructuredQuery* RunQueryRequest::release_structured_query() { + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryRequest.structured_query) if (has_structured_query()) { clear_has_query_type(); - ::google::firestore::v1beta1::StructuredQuery* temp = query_type_.structured_query_; + ::google::firestore::v1::StructuredQuery* temp = query_type_.structured_query_; query_type_.structured_query_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery& RunQueryRequest::structured_query() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryRequest.structured_query) +inline const ::google::firestore::v1::StructuredQuery& RunQueryRequest::structured_query() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryRequest.structured_query) return has_structured_query() ? *query_type_.structured_query_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery*>(&::google::firestore::v1beta1::_StructuredQuery_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery*>(&::google::firestore::v1::_StructuredQuery_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery* RunQueryRequest::mutable_structured_query() { +inline ::google::firestore::v1::StructuredQuery* RunQueryRequest::mutable_structured_query() { if (!has_structured_query()) { clear_query_type(); set_has_structured_query(); - query_type_.structured_query_ = new ::google::firestore::v1beta1::StructuredQuery; + query_type_.structured_query_ = new ::google::firestore::v1::StructuredQuery; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryRequest.structured_query) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryRequest.structured_query) return query_type_.structured_query_; } @@ -6474,25 +6474,25 @@ inline void RunQueryRequest::clear_transaction() { } } inline const ::std::string& RunQueryRequest::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryRequest.transaction) if (has_transaction()) { return consistency_selector_.transaction_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void RunQueryRequest::set_transaction(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryRequest.transaction) } #if LANG_CXX11 inline void RunQueryRequest::set_transaction(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryRequest.transaction) if (!has_transaction()) { clear_consistency_selector(); set_has_transaction(); @@ -6500,7 +6500,7 @@ inline void RunQueryRequest::set_transaction(::std::string&& value) { } consistency_selector_.transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.RunQueryRequest.transaction) } #endif inline void RunQueryRequest::set_transaction(const char* value) { @@ -6512,7 +6512,7 @@ inline void RunQueryRequest::set_transaction(const char* value) { } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.RunQueryRequest.transaction) } inline void RunQueryRequest::set_transaction(const void* value, size_t size) { if (!has_transaction()) { @@ -6522,7 +6522,7 @@ inline void RunQueryRequest::set_transaction(const void* value, size_t size) { } consistency_selector_.transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.RunQueryRequest.transaction) } inline ::std::string* RunQueryRequest::mutable_transaction() { if (!has_transaction()) { @@ -6530,11 +6530,11 @@ inline ::std::string* RunQueryRequest::mutable_transaction() { set_has_transaction(); consistency_selector_.transaction_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryRequest.transaction) return consistency_selector_.transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RunQueryRequest::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryRequest.transaction) if (has_transaction()) { clear_has_consistency_selector(); return consistency_selector_.transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -6552,40 +6552,40 @@ inline void RunQueryRequest::set_allocated_transaction(::std::string* transactio consistency_selector_.transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryRequest.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryRequest.transaction) } -// .google.firestore.v1beta1.TransactionOptions new_transaction = 6; +// .google.firestore.v1.TransactionOptions new_transaction = 6; inline bool RunQueryRequest::has_new_transaction() const { return consistency_selector_case() == kNewTransaction; } inline void RunQueryRequest::set_has_new_transaction() { _oneof_case_[1] = kNewTransaction; } -inline ::google::firestore::v1beta1::TransactionOptions* RunQueryRequest::release_new_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryRequest.new_transaction) +inline ::google::firestore::v1::TransactionOptions* RunQueryRequest::release_new_transaction() { + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryRequest.new_transaction) if (has_new_transaction()) { clear_has_consistency_selector(); - ::google::firestore::v1beta1::TransactionOptions* temp = consistency_selector_.new_transaction_; + ::google::firestore::v1::TransactionOptions* temp = consistency_selector_.new_transaction_; consistency_selector_.new_transaction_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::TransactionOptions& RunQueryRequest::new_transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryRequest.new_transaction) +inline const ::google::firestore::v1::TransactionOptions& RunQueryRequest::new_transaction() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryRequest.new_transaction) return has_new_transaction() ? *consistency_selector_.new_transaction_ - : *reinterpret_cast< ::google::firestore::v1beta1::TransactionOptions*>(&::google::firestore::v1beta1::_TransactionOptions_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::TransactionOptions*>(&::google::firestore::v1::_TransactionOptions_default_instance_); } -inline ::google::firestore::v1beta1::TransactionOptions* RunQueryRequest::mutable_new_transaction() { +inline ::google::firestore::v1::TransactionOptions* RunQueryRequest::mutable_new_transaction() { if (!has_new_transaction()) { clear_consistency_selector(); set_has_new_transaction(); - consistency_selector_.new_transaction_ = new ::google::firestore::v1beta1::TransactionOptions; + consistency_selector_.new_transaction_ = new ::google::firestore::v1::TransactionOptions; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryRequest.new_transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryRequest.new_transaction) return consistency_selector_.new_transaction_; } @@ -6597,7 +6597,7 @@ inline void RunQueryRequest::set_has_read_time() { _oneof_case_[1] = kReadTime; } inline ::google::protobuf::Timestamp* RunQueryRequest::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryRequest.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryRequest.read_time) if (has_read_time()) { clear_has_consistency_selector(); ::google::protobuf::Timestamp* temp = consistency_selector_.read_time_; @@ -6608,7 +6608,7 @@ inline ::google::protobuf::Timestamp* RunQueryRequest::release_read_time() { } } inline const ::google::protobuf::Timestamp& RunQueryRequest::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryRequest.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryRequest.read_time) return has_read_time() ? *consistency_selector_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -6619,7 +6619,7 @@ inline ::google::protobuf::Timestamp* RunQueryRequest::mutable_read_time() { set_has_read_time(); consistency_selector_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryRequest.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryRequest.read_time) return consistency_selector_.read_time_; } @@ -6650,41 +6650,41 @@ inline void RunQueryResponse::clear_transaction() { transaction_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& RunQueryResponse::transaction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryResponse.transaction) return transaction_.GetNoArena(); } inline void RunQueryResponse::set_transaction(const ::std::string& value) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryResponse.transaction) } #if LANG_CXX11 inline void RunQueryResponse::set_transaction(::std::string&& value) { transaction_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.RunQueryResponse.transaction) } #endif inline void RunQueryResponse::set_transaction(const char* value) { GOOGLE_DCHECK(value != NULL); transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.RunQueryResponse.transaction) } inline void RunQueryResponse::set_transaction(const void* value, size_t size) { transaction_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.RunQueryResponse.transaction) } inline ::std::string* RunQueryResponse::mutable_transaction() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryResponse.transaction) return transaction_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* RunQueryResponse::release_transaction() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryResponse.transaction) return transaction_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6695,35 +6695,35 @@ inline void RunQueryResponse::set_allocated_transaction(::std::string* transacti } transaction_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), transaction); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryResponse.transaction) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryResponse.transaction) } -// .google.firestore.v1beta1.Document document = 1; +// .google.firestore.v1.Document document = 1; inline bool RunQueryResponse::has_document() const { return this != internal_default_instance() && document_ != NULL; } -inline const ::google::firestore::v1beta1::Document& RunQueryResponse::document() const { - const ::google::firestore::v1beta1::Document* p = document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryResponse.document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Document_default_instance_); +inline const ::google::firestore::v1::Document& RunQueryResponse::document() const { + const ::google::firestore::v1::Document* p = document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryResponse.document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* RunQueryResponse::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryResponse.document) +inline ::google::firestore::v1::Document* RunQueryResponse::release_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryResponse.document) - ::google::firestore::v1beta1::Document* temp = document_; + ::google::firestore::v1::Document* temp = document_; document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Document* RunQueryResponse::mutable_document() { +inline ::google::firestore::v1::Document* RunQueryResponse::mutable_document() { if (document_ == NULL) { - document_ = new ::google::firestore::v1beta1::Document; + document_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryResponse.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryResponse.document) return document_; } -inline void RunQueryResponse::set_allocated_document(::google::firestore::v1beta1::Document* document) { +inline void RunQueryResponse::set_allocated_document(::google::firestore::v1::Document* document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(document_); @@ -6739,7 +6739,7 @@ inline void RunQueryResponse::set_allocated_document(::google::firestore::v1beta } document_ = document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryResponse.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryResponse.document) } // .google.protobuf.Timestamp read_time = 3; @@ -6748,12 +6748,12 @@ inline bool RunQueryResponse::has_read_time() const { } inline const ::google::protobuf::Timestamp& RunQueryResponse::read_time() const { const ::google::protobuf::Timestamp* p = read_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryResponse.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryResponse.read_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* RunQueryResponse::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.RunQueryResponse.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.RunQueryResponse.read_time) ::google::protobuf::Timestamp* temp = read_time_; read_time_ = NULL; @@ -6764,7 +6764,7 @@ inline ::google::protobuf::Timestamp* RunQueryResponse::mutable_read_time() { if (read_time_ == NULL) { read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.RunQueryResponse.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.RunQueryResponse.read_time) return read_time_; } inline void RunQueryResponse::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -6784,7 +6784,7 @@ inline void RunQueryResponse::set_allocated_read_time(::google::protobuf::Timest } read_time_ = read_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.RunQueryResponse.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.RunQueryResponse.read_time) } // int32 skipped_results = 4; @@ -6792,13 +6792,13 @@ inline void RunQueryResponse::clear_skipped_results() { skipped_results_ = 0; } inline ::google::protobuf::int32 RunQueryResponse::skipped_results() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.RunQueryResponse.skipped_results) + // @@protoc_insertion_point(field_get:google.firestore.v1.RunQueryResponse.skipped_results) return skipped_results_; } inline void RunQueryResponse::set_skipped_results(::google::protobuf::int32 value) { skipped_results_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.RunQueryResponse.skipped_results) + // @@protoc_insertion_point(field_set:google.firestore.v1.RunQueryResponse.skipped_results) } // ------------------------------------------------------------------- @@ -6812,41 +6812,41 @@ inline void WriteRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& WriteRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteRequest.database) return database_.GetNoArena(); } inline void WriteRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.WriteRequest.database) } #if LANG_CXX11 inline void WriteRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.WriteRequest.database) } #endif inline void WriteRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.WriteRequest.database) } inline void WriteRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.WriteRequest.database) } inline ::std::string* WriteRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* WriteRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6857,7 +6857,7 @@ inline void WriteRequest::set_allocated_database(::std::string* database) { } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteRequest.database) } // string stream_id = 2; @@ -6865,41 +6865,41 @@ inline void WriteRequest::clear_stream_id() { stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& WriteRequest::stream_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteRequest.stream_id) return stream_id_.GetNoArena(); } inline void WriteRequest::set_stream_id(const ::std::string& value) { stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.WriteRequest.stream_id) } #if LANG_CXX11 inline void WriteRequest::set_stream_id(::std::string&& value) { stream_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.WriteRequest.stream_id) } #endif inline void WriteRequest::set_stream_id(const char* value) { GOOGLE_DCHECK(value != NULL); stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.WriteRequest.stream_id) } inline void WriteRequest::set_stream_id(const char* value, size_t size) { stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.WriteRequest.stream_id) } inline ::std::string* WriteRequest::mutable_stream_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteRequest.stream_id) return stream_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* WriteRequest::release_stream_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteRequest.stream_id) return stream_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6910,33 +6910,33 @@ inline void WriteRequest::set_allocated_stream_id(::std::string* stream_id) { } stream_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), stream_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteRequest.stream_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteRequest.stream_id) } -// repeated .google.firestore.v1beta1.Write writes = 3; +// repeated .google.firestore.v1.Write writes = 3; inline int WriteRequest::writes_size() const { return writes_.size(); } -inline const ::google::firestore::v1beta1::Write& WriteRequest::writes(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteRequest.writes) +inline const ::google::firestore::v1::Write& WriteRequest::writes(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteRequest.writes) return writes_.Get(index); } -inline ::google::firestore::v1beta1::Write* WriteRequest::mutable_writes(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteRequest.writes) +inline ::google::firestore::v1::Write* WriteRequest::mutable_writes(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteRequest.writes) return writes_.Mutable(index); } -inline ::google::firestore::v1beta1::Write* WriteRequest::add_writes() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.WriteRequest.writes) +inline ::google::firestore::v1::Write* WriteRequest::add_writes() { + // @@protoc_insertion_point(field_add:google.firestore.v1.WriteRequest.writes) return writes_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >* WriteRequest::mutable_writes() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.WriteRequest.writes) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.WriteRequest.writes) return &writes_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Write >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Write >& WriteRequest::writes() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.WriteRequest.writes) + // @@protoc_insertion_point(field_list:google.firestore.v1.WriteRequest.writes) return writes_; } @@ -6945,41 +6945,41 @@ inline void WriteRequest::clear_stream_token() { stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& WriteRequest::stream_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteRequest.stream_token) return stream_token_.GetNoArena(); } inline void WriteRequest::set_stream_token(const ::std::string& value) { stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.WriteRequest.stream_token) } #if LANG_CXX11 inline void WriteRequest::set_stream_token(::std::string&& value) { stream_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.WriteRequest.stream_token) } #endif inline void WriteRequest::set_stream_token(const char* value) { GOOGLE_DCHECK(value != NULL); stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.WriteRequest.stream_token) } inline void WriteRequest::set_stream_token(const void* value, size_t size) { stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.WriteRequest.stream_token) } inline ::std::string* WriteRequest::mutable_stream_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteRequest.stream_token) return stream_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* WriteRequest::release_stream_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteRequest.stream_token) return stream_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -6990,7 +6990,7 @@ inline void WriteRequest::set_allocated_stream_token(::std::string* stream_token } stream_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), stream_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteRequest.stream_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteRequest.stream_token) } // map labels = 5; @@ -7002,12 +7002,12 @@ inline void WriteRequest::clear_labels() { } inline const ::google::protobuf::Map< ::std::string, ::std::string >& WriteRequest::labels() const { - // @@protoc_insertion_point(field_map:google.firestore.v1beta1.WriteRequest.labels) + // @@protoc_insertion_point(field_map:google.firestore.v1.WriteRequest.labels) return labels_.GetMap(); } inline ::google::protobuf::Map< ::std::string, ::std::string >* WriteRequest::mutable_labels() { - // @@protoc_insertion_point(field_mutable_map:google.firestore.v1beta1.WriteRequest.labels) + // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.WriteRequest.labels) return labels_.MutableMap(); } @@ -7020,41 +7020,41 @@ inline void WriteResponse::clear_stream_id() { stream_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& WriteResponse::stream_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResponse.stream_id) return stream_id_.GetNoArena(); } inline void WriteResponse::set_stream_id(const ::std::string& value) { stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.WriteResponse.stream_id) } #if LANG_CXX11 inline void WriteResponse::set_stream_id(::std::string&& value) { stream_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.WriteResponse.stream_id) } #endif inline void WriteResponse::set_stream_id(const char* value) { GOOGLE_DCHECK(value != NULL); stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.WriteResponse.stream_id) } inline void WriteResponse::set_stream_id(const char* value, size_t size) { stream_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.WriteResponse.stream_id) } inline ::std::string* WriteResponse::mutable_stream_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResponse.stream_id) return stream_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* WriteResponse::release_stream_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteResponse.stream_id) return stream_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -7065,7 +7065,7 @@ inline void WriteResponse::set_allocated_stream_id(::std::string* stream_id) { } stream_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), stream_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteResponse.stream_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteResponse.stream_id) } // bytes stream_token = 2; @@ -7073,41 +7073,41 @@ inline void WriteResponse::clear_stream_token() { stream_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& WriteResponse::stream_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResponse.stream_token) return stream_token_.GetNoArena(); } inline void WriteResponse::set_stream_token(const ::std::string& value) { stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.WriteResponse.stream_token) } #if LANG_CXX11 inline void WriteResponse::set_stream_token(::std::string&& value) { stream_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.WriteResponse.stream_token) } #endif inline void WriteResponse::set_stream_token(const char* value) { GOOGLE_DCHECK(value != NULL); stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.WriteResponse.stream_token) } inline void WriteResponse::set_stream_token(const void* value, size_t size) { stream_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.WriteResponse.stream_token) } inline ::std::string* WriteResponse::mutable_stream_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResponse.stream_token) return stream_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* WriteResponse::release_stream_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteResponse.stream_token) return stream_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -7118,33 +7118,33 @@ inline void WriteResponse::set_allocated_stream_token(::std::string* stream_toke } stream_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), stream_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteResponse.stream_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteResponse.stream_token) } -// repeated .google.firestore.v1beta1.WriteResult write_results = 3; +// repeated .google.firestore.v1.WriteResult write_results = 3; inline int WriteResponse::write_results_size() const { return write_results_.size(); } -inline const ::google::firestore::v1beta1::WriteResult& WriteResponse::write_results(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResponse.write_results) +inline const ::google::firestore::v1::WriteResult& WriteResponse::write_results(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResponse.write_results) return write_results_.Get(index); } -inline ::google::firestore::v1beta1::WriteResult* WriteResponse::mutable_write_results(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResponse.write_results) +inline ::google::firestore::v1::WriteResult* WriteResponse::mutable_write_results(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResponse.write_results) return write_results_.Mutable(index); } -inline ::google::firestore::v1beta1::WriteResult* WriteResponse::add_write_results() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.WriteResponse.write_results) +inline ::google::firestore::v1::WriteResult* WriteResponse::add_write_results() { + // @@protoc_insertion_point(field_add:google.firestore.v1.WriteResponse.write_results) return write_results_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >* WriteResponse::mutable_write_results() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.WriteResponse.write_results) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.WriteResponse.write_results) return &write_results_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::WriteResult >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::WriteResult >& WriteResponse::write_results() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.WriteResponse.write_results) + // @@protoc_insertion_point(field_list:google.firestore.v1.WriteResponse.write_results) return write_results_; } @@ -7154,12 +7154,12 @@ inline bool WriteResponse::has_commit_time() const { } inline const ::google::protobuf::Timestamp& WriteResponse::commit_time() const { const ::google::protobuf::Timestamp* p = commit_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResponse.commit_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResponse.commit_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* WriteResponse::release_commit_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteResponse.commit_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteResponse.commit_time) ::google::protobuf::Timestamp* temp = commit_time_; commit_time_ = NULL; @@ -7170,7 +7170,7 @@ inline ::google::protobuf::Timestamp* WriteResponse::mutable_commit_time() { if (commit_time_ == NULL) { commit_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResponse.commit_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResponse.commit_time) return commit_time_; } inline void WriteResponse::set_allocated_commit_time(::google::protobuf::Timestamp* commit_time) { @@ -7190,7 +7190,7 @@ inline void WriteResponse::set_allocated_commit_time(::google::protobuf::Timesta } commit_time_ = commit_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteResponse.commit_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteResponse.commit_time) } // ------------------------------------------------------------------- @@ -7204,41 +7204,41 @@ inline void ListenRequest::clear_database() { database_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListenRequest::database() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenRequest.database) return database_.GetNoArena(); } inline void ListenRequest::set_database(const ::std::string& value) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListenRequest.database) } #if LANG_CXX11 inline void ListenRequest::set_database(::std::string&& value) { database_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListenRequest.database) } #endif inline void ListenRequest::set_database(const char* value) { GOOGLE_DCHECK(value != NULL); database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListenRequest.database) } inline void ListenRequest::set_database(const char* value, size_t size) { database_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListenRequest.database) } inline ::std::string* ListenRequest::mutable_database() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenRequest.database) return database_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListenRequest::release_database() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenRequest.database) return database_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -7249,10 +7249,10 @@ inline void ListenRequest::set_allocated_database(::std::string* database) { } database_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), database); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListenRequest.database) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListenRequest.database) } -// .google.firestore.v1beta1.Target add_target = 2; +// .google.firestore.v1.Target add_target = 2; inline bool ListenRequest::has_add_target() const { return target_change_case() == kAddTarget; } @@ -7265,30 +7265,30 @@ inline void ListenRequest::clear_add_target() { clear_has_target_change(); } } -inline ::google::firestore::v1beta1::Target* ListenRequest::release_add_target() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenRequest.add_target) +inline ::google::firestore::v1::Target* ListenRequest::release_add_target() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenRequest.add_target) if (has_add_target()) { clear_has_target_change(); - ::google::firestore::v1beta1::Target* temp = target_change_.add_target_; + ::google::firestore::v1::Target* temp = target_change_.add_target_; target_change_.add_target_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Target& ListenRequest::add_target() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenRequest.add_target) +inline const ::google::firestore::v1::Target& ListenRequest::add_target() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenRequest.add_target) return has_add_target() ? *target_change_.add_target_ - : *reinterpret_cast< ::google::firestore::v1beta1::Target*>(&::google::firestore::v1beta1::_Target_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Target*>(&::google::firestore::v1::_Target_default_instance_); } -inline ::google::firestore::v1beta1::Target* ListenRequest::mutable_add_target() { +inline ::google::firestore::v1::Target* ListenRequest::mutable_add_target() { if (!has_add_target()) { clear_target_change(); set_has_add_target(); - target_change_.add_target_ = new ::google::firestore::v1beta1::Target; + target_change_.add_target_ = new ::google::firestore::v1::Target; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenRequest.add_target) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenRequest.add_target) return target_change_.add_target_; } @@ -7306,7 +7306,7 @@ inline void ListenRequest::clear_remove_target() { } } inline ::google::protobuf::int32 ListenRequest::remove_target() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenRequest.remove_target) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenRequest.remove_target) if (has_remove_target()) { return target_change_.remove_target_; } @@ -7318,7 +7318,7 @@ inline void ListenRequest::set_remove_target(::google::protobuf::int32 value) { set_has_remove_target(); } target_change_.remove_target_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListenRequest.remove_target) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListenRequest.remove_target) } // map labels = 4; @@ -7330,12 +7330,12 @@ inline void ListenRequest::clear_labels() { } inline const ::google::protobuf::Map< ::std::string, ::std::string >& ListenRequest::labels() const { - // @@protoc_insertion_point(field_map:google.firestore.v1beta1.ListenRequest.labels) + // @@protoc_insertion_point(field_map:google.firestore.v1.ListenRequest.labels) return labels_.GetMap(); } inline ::google::protobuf::Map< ::std::string, ::std::string >* ListenRequest::mutable_labels() { - // @@protoc_insertion_point(field_mutable_map:google.firestore.v1beta1.ListenRequest.labels) + // @@protoc_insertion_point(field_mutable_map:google.firestore.v1.ListenRequest.labels) return labels_.MutableMap(); } @@ -7352,7 +7352,7 @@ inline ListenRequest::TargetChangeCase ListenRequest::target_change_case() const // ListenResponse -// .google.firestore.v1beta1.TargetChange target_change = 2; +// .google.firestore.v1.TargetChange target_change = 2; inline bool ListenResponse::has_target_change() const { return response_type_case() == kTargetChange; } @@ -7365,166 +7365,166 @@ inline void ListenResponse::clear_target_change() { clear_has_response_type(); } } -inline ::google::firestore::v1beta1::TargetChange* ListenResponse::release_target_change() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenResponse.target_change) +inline ::google::firestore::v1::TargetChange* ListenResponse::release_target_change() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenResponse.target_change) if (has_target_change()) { clear_has_response_type(); - ::google::firestore::v1beta1::TargetChange* temp = response_type_.target_change_; + ::google::firestore::v1::TargetChange* temp = response_type_.target_change_; response_type_.target_change_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::TargetChange& ListenResponse::target_change() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenResponse.target_change) +inline const ::google::firestore::v1::TargetChange& ListenResponse::target_change() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenResponse.target_change) return has_target_change() ? *response_type_.target_change_ - : *reinterpret_cast< ::google::firestore::v1beta1::TargetChange*>(&::google::firestore::v1beta1::_TargetChange_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::TargetChange*>(&::google::firestore::v1::_TargetChange_default_instance_); } -inline ::google::firestore::v1beta1::TargetChange* ListenResponse::mutable_target_change() { +inline ::google::firestore::v1::TargetChange* ListenResponse::mutable_target_change() { if (!has_target_change()) { clear_response_type(); set_has_target_change(); - response_type_.target_change_ = new ::google::firestore::v1beta1::TargetChange; + response_type_.target_change_ = new ::google::firestore::v1::TargetChange; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenResponse.target_change) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenResponse.target_change) return response_type_.target_change_; } -// .google.firestore.v1beta1.DocumentChange document_change = 3; +// .google.firestore.v1.DocumentChange document_change = 3; inline bool ListenResponse::has_document_change() const { return response_type_case() == kDocumentChange; } inline void ListenResponse::set_has_document_change() { _oneof_case_[0] = kDocumentChange; } -inline ::google::firestore::v1beta1::DocumentChange* ListenResponse::release_document_change() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenResponse.document_change) +inline ::google::firestore::v1::DocumentChange* ListenResponse::release_document_change() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenResponse.document_change) if (has_document_change()) { clear_has_response_type(); - ::google::firestore::v1beta1::DocumentChange* temp = response_type_.document_change_; + ::google::firestore::v1::DocumentChange* temp = response_type_.document_change_; response_type_.document_change_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::DocumentChange& ListenResponse::document_change() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenResponse.document_change) +inline const ::google::firestore::v1::DocumentChange& ListenResponse::document_change() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenResponse.document_change) return has_document_change() ? *response_type_.document_change_ - : *reinterpret_cast< ::google::firestore::v1beta1::DocumentChange*>(&::google::firestore::v1beta1::_DocumentChange_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::DocumentChange*>(&::google::firestore::v1::_DocumentChange_default_instance_); } -inline ::google::firestore::v1beta1::DocumentChange* ListenResponse::mutable_document_change() { +inline ::google::firestore::v1::DocumentChange* ListenResponse::mutable_document_change() { if (!has_document_change()) { clear_response_type(); set_has_document_change(); - response_type_.document_change_ = new ::google::firestore::v1beta1::DocumentChange; + response_type_.document_change_ = new ::google::firestore::v1::DocumentChange; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenResponse.document_change) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenResponse.document_change) return response_type_.document_change_; } -// .google.firestore.v1beta1.DocumentDelete document_delete = 4; +// .google.firestore.v1.DocumentDelete document_delete = 4; inline bool ListenResponse::has_document_delete() const { return response_type_case() == kDocumentDelete; } inline void ListenResponse::set_has_document_delete() { _oneof_case_[0] = kDocumentDelete; } -inline ::google::firestore::v1beta1::DocumentDelete* ListenResponse::release_document_delete() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenResponse.document_delete) +inline ::google::firestore::v1::DocumentDelete* ListenResponse::release_document_delete() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenResponse.document_delete) if (has_document_delete()) { clear_has_response_type(); - ::google::firestore::v1beta1::DocumentDelete* temp = response_type_.document_delete_; + ::google::firestore::v1::DocumentDelete* temp = response_type_.document_delete_; response_type_.document_delete_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::DocumentDelete& ListenResponse::document_delete() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenResponse.document_delete) +inline const ::google::firestore::v1::DocumentDelete& ListenResponse::document_delete() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenResponse.document_delete) return has_document_delete() ? *response_type_.document_delete_ - : *reinterpret_cast< ::google::firestore::v1beta1::DocumentDelete*>(&::google::firestore::v1beta1::_DocumentDelete_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::DocumentDelete*>(&::google::firestore::v1::_DocumentDelete_default_instance_); } -inline ::google::firestore::v1beta1::DocumentDelete* ListenResponse::mutable_document_delete() { +inline ::google::firestore::v1::DocumentDelete* ListenResponse::mutable_document_delete() { if (!has_document_delete()) { clear_response_type(); set_has_document_delete(); - response_type_.document_delete_ = new ::google::firestore::v1beta1::DocumentDelete; + response_type_.document_delete_ = new ::google::firestore::v1::DocumentDelete; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenResponse.document_delete) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenResponse.document_delete) return response_type_.document_delete_; } -// .google.firestore.v1beta1.DocumentRemove document_remove = 6; +// .google.firestore.v1.DocumentRemove document_remove = 6; inline bool ListenResponse::has_document_remove() const { return response_type_case() == kDocumentRemove; } inline void ListenResponse::set_has_document_remove() { _oneof_case_[0] = kDocumentRemove; } -inline ::google::firestore::v1beta1::DocumentRemove* ListenResponse::release_document_remove() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenResponse.document_remove) +inline ::google::firestore::v1::DocumentRemove* ListenResponse::release_document_remove() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenResponse.document_remove) if (has_document_remove()) { clear_has_response_type(); - ::google::firestore::v1beta1::DocumentRemove* temp = response_type_.document_remove_; + ::google::firestore::v1::DocumentRemove* temp = response_type_.document_remove_; response_type_.document_remove_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::DocumentRemove& ListenResponse::document_remove() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenResponse.document_remove) +inline const ::google::firestore::v1::DocumentRemove& ListenResponse::document_remove() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenResponse.document_remove) return has_document_remove() ? *response_type_.document_remove_ - : *reinterpret_cast< ::google::firestore::v1beta1::DocumentRemove*>(&::google::firestore::v1beta1::_DocumentRemove_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::DocumentRemove*>(&::google::firestore::v1::_DocumentRemove_default_instance_); } -inline ::google::firestore::v1beta1::DocumentRemove* ListenResponse::mutable_document_remove() { +inline ::google::firestore::v1::DocumentRemove* ListenResponse::mutable_document_remove() { if (!has_document_remove()) { clear_response_type(); set_has_document_remove(); - response_type_.document_remove_ = new ::google::firestore::v1beta1::DocumentRemove; + response_type_.document_remove_ = new ::google::firestore::v1::DocumentRemove; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenResponse.document_remove) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenResponse.document_remove) return response_type_.document_remove_; } -// .google.firestore.v1beta1.ExistenceFilter filter = 5; +// .google.firestore.v1.ExistenceFilter filter = 5; inline bool ListenResponse::has_filter() const { return response_type_case() == kFilter; } inline void ListenResponse::set_has_filter() { _oneof_case_[0] = kFilter; } -inline ::google::firestore::v1beta1::ExistenceFilter* ListenResponse::release_filter() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListenResponse.filter) +inline ::google::firestore::v1::ExistenceFilter* ListenResponse::release_filter() { + // @@protoc_insertion_point(field_release:google.firestore.v1.ListenResponse.filter) if (has_filter()) { clear_has_response_type(); - ::google::firestore::v1beta1::ExistenceFilter* temp = response_type_.filter_; + ::google::firestore::v1::ExistenceFilter* temp = response_type_.filter_; response_type_.filter_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::ExistenceFilter& ListenResponse::filter() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListenResponse.filter) +inline const ::google::firestore::v1::ExistenceFilter& ListenResponse::filter() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.ListenResponse.filter) return has_filter() ? *response_type_.filter_ - : *reinterpret_cast< ::google::firestore::v1beta1::ExistenceFilter*>(&::google::firestore::v1beta1::_ExistenceFilter_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::ExistenceFilter*>(&::google::firestore::v1::_ExistenceFilter_default_instance_); } -inline ::google::firestore::v1beta1::ExistenceFilter* ListenResponse::mutable_filter() { +inline ::google::firestore::v1::ExistenceFilter* ListenResponse::mutable_filter() { if (!has_filter()) { clear_response_type(); set_has_filter(); - response_type_.filter_ = new ::google::firestore::v1beta1::ExistenceFilter; + response_type_.filter_ = new ::google::firestore::v1::ExistenceFilter; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListenResponse.filter) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListenResponse.filter) return response_type_.filter_; } @@ -7549,64 +7549,64 @@ inline void Target_DocumentsTarget::clear_documents() { documents_.Clear(); } inline const ::std::string& Target_DocumentsTarget::documents(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.DocumentsTarget.documents) return documents_.Get(index); } inline ::std::string* Target_DocumentsTarget::mutable_documents(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.DocumentsTarget.documents) return documents_.Mutable(index); } inline void Target_DocumentsTarget::set_documents(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.DocumentsTarget.documents) documents_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void Target_DocumentsTarget::set_documents(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.DocumentsTarget.documents) documents_.Mutable(index)->assign(std::move(value)); } #endif inline void Target_DocumentsTarget::set_documents(int index, const char* value) { GOOGLE_DCHECK(value != NULL); documents_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Target.DocumentsTarget.documents) } inline void Target_DocumentsTarget::set_documents(int index, const char* value, size_t size) { documents_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Target.DocumentsTarget.documents) } inline ::std::string* Target_DocumentsTarget::add_documents() { - // @@protoc_insertion_point(field_add_mutable:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.Target.DocumentsTarget.documents) return documents_.Add(); } inline void Target_DocumentsTarget::add_documents(const ::std::string& value) { documents_.Add()->assign(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_add:google.firestore.v1.Target.DocumentsTarget.documents) } #if LANG_CXX11 inline void Target_DocumentsTarget::add_documents(::std::string&& value) { documents_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_add:google.firestore.v1.Target.DocumentsTarget.documents) } #endif inline void Target_DocumentsTarget::add_documents(const char* value) { GOOGLE_DCHECK(value != NULL); documents_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_add_char:google.firestore.v1.Target.DocumentsTarget.documents) } inline void Target_DocumentsTarget::add_documents(const char* value, size_t size) { documents_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_add_pointer:google.firestore.v1.Target.DocumentsTarget.documents) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& Target_DocumentsTarget::documents() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_list:google.firestore.v1.Target.DocumentsTarget.documents) return documents_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* Target_DocumentsTarget::mutable_documents() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.Target.DocumentsTarget.documents) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.Target.DocumentsTarget.documents) return &documents_; } @@ -7619,41 +7619,41 @@ inline void Target_QueryTarget::clear_parent() { parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& Target_QueryTarget::parent() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.QueryTarget.parent) return parent_.GetNoArena(); } inline void Target_QueryTarget::set_parent(const ::std::string& value) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.QueryTarget.parent) } #if LANG_CXX11 inline void Target_QueryTarget::set_parent(::std::string&& value) { parent_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Target.QueryTarget.parent) } #endif inline void Target_QueryTarget::set_parent(const char* value) { GOOGLE_DCHECK(value != NULL); parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Target.QueryTarget.parent) } inline void Target_QueryTarget::set_parent(const char* value, size_t size) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Target.QueryTarget.parent) } inline ::std::string* Target_QueryTarget::mutable_parent() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.QueryTarget.parent) return parent_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Target_QueryTarget::release_parent() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.QueryTarget.parent) return parent_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -7664,40 +7664,40 @@ inline void Target_QueryTarget::set_allocated_parent(::std::string* parent) { } parent_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parent); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.QueryTarget.parent) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.QueryTarget.parent) } -// .google.firestore.v1beta1.StructuredQuery structured_query = 2; +// .google.firestore.v1.StructuredQuery structured_query = 2; inline bool Target_QueryTarget::has_structured_query() const { return query_type_case() == kStructuredQuery; } inline void Target_QueryTarget::set_has_structured_query() { _oneof_case_[0] = kStructuredQuery; } -inline ::google::firestore::v1beta1::StructuredQuery* Target_QueryTarget::release_structured_query() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.QueryTarget.structured_query) +inline ::google::firestore::v1::StructuredQuery* Target_QueryTarget::release_structured_query() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.QueryTarget.structured_query) if (has_structured_query()) { clear_has_query_type(); - ::google::firestore::v1beta1::StructuredQuery* temp = query_type_.structured_query_; + ::google::firestore::v1::StructuredQuery* temp = query_type_.structured_query_; query_type_.structured_query_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery& Target_QueryTarget::structured_query() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.QueryTarget.structured_query) +inline const ::google::firestore::v1::StructuredQuery& Target_QueryTarget::structured_query() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.QueryTarget.structured_query) return has_structured_query() ? *query_type_.structured_query_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery*>(&::google::firestore::v1beta1::_StructuredQuery_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery*>(&::google::firestore::v1::_StructuredQuery_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery* Target_QueryTarget::mutable_structured_query() { +inline ::google::firestore::v1::StructuredQuery* Target_QueryTarget::mutable_structured_query() { if (!has_structured_query()) { clear_query_type(); set_has_structured_query(); - query_type_.structured_query_ = new ::google::firestore::v1beta1::StructuredQuery; + query_type_.structured_query_ = new ::google::firestore::v1::StructuredQuery; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.QueryTarget.structured_query) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.QueryTarget.structured_query) return query_type_.structured_query_; } @@ -7714,7 +7714,7 @@ inline Target_QueryTarget::QueryTypeCase Target_QueryTarget::query_type_case() c // Target -// .google.firestore.v1beta1.Target.QueryTarget query = 2; +// .google.firestore.v1.Target.QueryTarget query = 2; inline bool Target::has_query() const { return target_type_case() == kQuery; } @@ -7727,34 +7727,34 @@ inline void Target::clear_query() { clear_has_target_type(); } } -inline ::google::firestore::v1beta1::Target_QueryTarget* Target::release_query() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.query) +inline ::google::firestore::v1::Target_QueryTarget* Target::release_query() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.query) if (has_query()) { clear_has_target_type(); - ::google::firestore::v1beta1::Target_QueryTarget* temp = target_type_.query_; + ::google::firestore::v1::Target_QueryTarget* temp = target_type_.query_; target_type_.query_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Target_QueryTarget& Target::query() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.query) +inline const ::google::firestore::v1::Target_QueryTarget& Target::query() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.query) return has_query() ? *target_type_.query_ - : *reinterpret_cast< ::google::firestore::v1beta1::Target_QueryTarget*>(&::google::firestore::v1beta1::_Target_QueryTarget_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Target_QueryTarget*>(&::google::firestore::v1::_Target_QueryTarget_default_instance_); } -inline ::google::firestore::v1beta1::Target_QueryTarget* Target::mutable_query() { +inline ::google::firestore::v1::Target_QueryTarget* Target::mutable_query() { if (!has_query()) { clear_target_type(); set_has_query(); - target_type_.query_ = new ::google::firestore::v1beta1::Target_QueryTarget; + target_type_.query_ = new ::google::firestore::v1::Target_QueryTarget; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.query) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.query) return target_type_.query_; } -// .google.firestore.v1beta1.Target.DocumentsTarget documents = 3; +// .google.firestore.v1.Target.DocumentsTarget documents = 3; inline bool Target::has_documents() const { return target_type_case() == kDocuments; } @@ -7767,30 +7767,30 @@ inline void Target::clear_documents() { clear_has_target_type(); } } -inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::release_documents() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.documents) +inline ::google::firestore::v1::Target_DocumentsTarget* Target::release_documents() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.documents) if (has_documents()) { clear_has_target_type(); - ::google::firestore::v1beta1::Target_DocumentsTarget* temp = target_type_.documents_; + ::google::firestore::v1::Target_DocumentsTarget* temp = target_type_.documents_; target_type_.documents_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Target_DocumentsTarget& Target::documents() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.documents) +inline const ::google::firestore::v1::Target_DocumentsTarget& Target::documents() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.documents) return has_documents() ? *target_type_.documents_ - : *reinterpret_cast< ::google::firestore::v1beta1::Target_DocumentsTarget*>(&::google::firestore::v1beta1::_Target_DocumentsTarget_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Target_DocumentsTarget*>(&::google::firestore::v1::_Target_DocumentsTarget_default_instance_); } -inline ::google::firestore::v1beta1::Target_DocumentsTarget* Target::mutable_documents() { +inline ::google::firestore::v1::Target_DocumentsTarget* Target::mutable_documents() { if (!has_documents()) { clear_target_type(); set_has_documents(); - target_type_.documents_ = new ::google::firestore::v1beta1::Target_DocumentsTarget; + target_type_.documents_ = new ::google::firestore::v1::Target_DocumentsTarget; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.documents) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.documents) return target_type_.documents_; } @@ -7808,25 +7808,25 @@ inline void Target::clear_resume_token() { } } inline const ::std::string& Target::resume_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.resume_token) if (has_resume_token()) { return resume_type_.resume_token_.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void Target::set_resume_token(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.resume_token) if (!has_resume_token()) { clear_resume_type(); set_has_resume_token(); resume_type_.resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } resume_type_.resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.resume_token) } #if LANG_CXX11 inline void Target::set_resume_token(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.resume_token) if (!has_resume_token()) { clear_resume_type(); set_has_resume_token(); @@ -7834,7 +7834,7 @@ inline void Target::set_resume_token(::std::string&& value) { } resume_type_.resume_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Target.resume_token) } #endif inline void Target::set_resume_token(const char* value) { @@ -7846,7 +7846,7 @@ inline void Target::set_resume_token(const char* value) { } resume_type_.resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Target.resume_token) } inline void Target::set_resume_token(const void* value, size_t size) { if (!has_resume_token()) { @@ -7856,7 +7856,7 @@ inline void Target::set_resume_token(const void* value, size_t size) { } resume_type_.resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Target.resume_token) } inline ::std::string* Target::mutable_resume_token() { if (!has_resume_token()) { @@ -7864,11 +7864,11 @@ inline ::std::string* Target::mutable_resume_token() { set_has_resume_token(); resume_type_.resume_token_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.resume_token) return resume_type_.resume_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Target::release_resume_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.resume_token) if (has_resume_token()) { clear_has_resume_type(); return resume_type_.resume_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -7886,7 +7886,7 @@ inline void Target::set_allocated_resume_token(::std::string* resume_token) { resume_type_.resume_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), resume_token); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Target.resume_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Target.resume_token) } // .google.protobuf.Timestamp read_time = 11; @@ -7897,7 +7897,7 @@ inline void Target::set_has_read_time() { _oneof_case_[1] = kReadTime; } inline ::google::protobuf::Timestamp* Target::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Target.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.Target.read_time) if (has_read_time()) { clear_has_resume_type(); ::google::protobuf::Timestamp* temp = resume_type_.read_time_; @@ -7908,7 +7908,7 @@ inline ::google::protobuf::Timestamp* Target::release_read_time() { } } inline const ::google::protobuf::Timestamp& Target::read_time() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.read_time) return has_read_time() ? *resume_type_.read_time_ : *reinterpret_cast< ::google::protobuf::Timestamp*>(&::google::protobuf::_Timestamp_default_instance_); @@ -7919,7 +7919,7 @@ inline ::google::protobuf::Timestamp* Target::mutable_read_time() { set_has_read_time(); resume_type_.read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Target.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Target.read_time) return resume_type_.read_time_; } @@ -7928,13 +7928,13 @@ inline void Target::clear_target_id() { target_id_ = 0; } inline ::google::protobuf::int32 Target::target_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.target_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.target_id) return target_id_; } inline void Target::set_target_id(::google::protobuf::int32 value) { target_id_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.target_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.target_id) } // bool once = 6; @@ -7942,13 +7942,13 @@ inline void Target::clear_once() { once_ = false; } inline bool Target::once() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Target.once) + // @@protoc_insertion_point(field_get:google.firestore.v1.Target.once) return once_; } inline void Target::set_once(bool value) { once_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Target.once) + // @@protoc_insertion_point(field_set:google.firestore.v1.Target.once) } inline bool Target::has_target_type() const { @@ -7973,18 +7973,18 @@ inline Target::ResumeTypeCase Target::resume_type_case() const { // TargetChange -// .google.firestore.v1beta1.TargetChange.TargetChangeType target_change_type = 1; +// .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; inline void TargetChange::clear_target_change_type() { target_change_type_ = 0; } -inline ::google::firestore::v1beta1::TargetChange_TargetChangeType TargetChange::target_change_type() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TargetChange.target_change_type) - return static_cast< ::google::firestore::v1beta1::TargetChange_TargetChangeType >(target_change_type_); +inline ::google::firestore::v1::TargetChange_TargetChangeType TargetChange::target_change_type() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.TargetChange.target_change_type) + return static_cast< ::google::firestore::v1::TargetChange_TargetChangeType >(target_change_type_); } -inline void TargetChange::set_target_change_type(::google::firestore::v1beta1::TargetChange_TargetChangeType value) { +inline void TargetChange::set_target_change_type(::google::firestore::v1::TargetChange_TargetChangeType value) { target_change_type_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.TargetChange.target_change_type) + // @@protoc_insertion_point(field_set:google.firestore.v1.TargetChange.target_change_type) } // repeated int32 target_ids = 2; @@ -7995,25 +7995,25 @@ inline void TargetChange::clear_target_ids() { target_ids_.Clear(); } inline ::google::protobuf::int32 TargetChange::target_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TargetChange.target_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.TargetChange.target_ids) return target_ids_.Get(index); } inline void TargetChange::set_target_ids(int index, ::google::protobuf::int32 value) { target_ids_.Set(index, value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.TargetChange.target_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.TargetChange.target_ids) } inline void TargetChange::add_target_ids(::google::protobuf::int32 value) { target_ids_.Add(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.TargetChange.target_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.TargetChange.target_ids) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& TargetChange::target_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.TargetChange.target_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.TargetChange.target_ids) return target_ids_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* TargetChange::mutable_target_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.TargetChange.target_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.TargetChange.target_ids) return &target_ids_; } @@ -8023,12 +8023,12 @@ inline bool TargetChange::has_cause() const { } inline const ::google::rpc::Status& TargetChange::cause() const { const ::google::rpc::Status* p = cause_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TargetChange.cause) + // @@protoc_insertion_point(field_get:google.firestore.v1.TargetChange.cause) return p != NULL ? *p : *reinterpret_cast( &::google::rpc::_Status_default_instance_); } inline ::google::rpc::Status* TargetChange::release_cause() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TargetChange.cause) + // @@protoc_insertion_point(field_release:google.firestore.v1.TargetChange.cause) ::google::rpc::Status* temp = cause_; cause_ = NULL; @@ -8039,7 +8039,7 @@ inline ::google::rpc::Status* TargetChange::mutable_cause() { if (cause_ == NULL) { cause_ = new ::google::rpc::Status; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TargetChange.cause) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TargetChange.cause) return cause_; } inline void TargetChange::set_allocated_cause(::google::rpc::Status* cause) { @@ -8058,7 +8058,7 @@ inline void TargetChange::set_allocated_cause(::google::rpc::Status* cause) { } cause_ = cause; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TargetChange.cause) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TargetChange.cause) } // bytes resume_token = 4; @@ -8066,41 +8066,41 @@ inline void TargetChange::clear_resume_token() { resume_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& TargetChange::resume_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.TargetChange.resume_token) return resume_token_.GetNoArena(); } inline void TargetChange::set_resume_token(const ::std::string& value) { resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.TargetChange.resume_token) } #if LANG_CXX11 inline void TargetChange::set_resume_token(::std::string&& value) { resume_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.TargetChange.resume_token) } #endif inline void TargetChange::set_resume_token(const char* value) { GOOGLE_DCHECK(value != NULL); resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.TargetChange.resume_token) } inline void TargetChange::set_resume_token(const void* value, size_t size) { resume_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.TargetChange.resume_token) } inline ::std::string* TargetChange::mutable_resume_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TargetChange.resume_token) return resume_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* TargetChange::release_resume_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.TargetChange.resume_token) return resume_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -8111,7 +8111,7 @@ inline void TargetChange::set_allocated_resume_token(::std::string* resume_token } resume_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), resume_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TargetChange.resume_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TargetChange.resume_token) } // .google.protobuf.Timestamp read_time = 6; @@ -8120,12 +8120,12 @@ inline bool TargetChange::has_read_time() const { } inline const ::google::protobuf::Timestamp& TargetChange::read_time() const { const ::google::protobuf::Timestamp* p = read_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.TargetChange.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.TargetChange.read_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* TargetChange::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.TargetChange.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.TargetChange.read_time) ::google::protobuf::Timestamp* temp = read_time_; read_time_ = NULL; @@ -8136,7 +8136,7 @@ inline ::google::protobuf::Timestamp* TargetChange::mutable_read_time() { if (read_time_ == NULL) { read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.TargetChange.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.TargetChange.read_time) return read_time_; } inline void TargetChange::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -8156,7 +8156,7 @@ inline void TargetChange::set_allocated_read_time(::google::protobuf::Timestamp* } read_time_ = read_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.TargetChange.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.TargetChange.read_time) } // ------------------------------------------------------------------- @@ -8168,41 +8168,41 @@ inline void ListCollectionIdsRequest::clear_parent() { parent_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListCollectionIdsRequest::parent() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListCollectionIdsRequest.parent) return parent_.GetNoArena(); } inline void ListCollectionIdsRequest::set_parent(const ::std::string& value) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsRequest.parent) } #if LANG_CXX11 inline void ListCollectionIdsRequest::set_parent(::std::string&& value) { parent_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListCollectionIdsRequest.parent) } #endif inline void ListCollectionIdsRequest::set_parent(const char* value) { GOOGLE_DCHECK(value != NULL); parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListCollectionIdsRequest.parent) } inline void ListCollectionIdsRequest::set_parent(const char* value, size_t size) { parent_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListCollectionIdsRequest.parent) } inline ::std::string* ListCollectionIdsRequest::mutable_parent() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListCollectionIdsRequest.parent) return parent_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListCollectionIdsRequest::release_parent() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListCollectionIdsRequest.parent) return parent_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -8213,7 +8213,7 @@ inline void ListCollectionIdsRequest::set_allocated_parent(::std::string* parent } parent_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), parent); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListCollectionIdsRequest.parent) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListCollectionIdsRequest.parent) } // int32 page_size = 2; @@ -8221,13 +8221,13 @@ inline void ListCollectionIdsRequest::clear_page_size() { page_size_ = 0; } inline ::google::protobuf::int32 ListCollectionIdsRequest::page_size() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListCollectionIdsRequest.page_size) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListCollectionIdsRequest.page_size) return page_size_; } inline void ListCollectionIdsRequest::set_page_size(::google::protobuf::int32 value) { page_size_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsRequest.page_size) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsRequest.page_size) } // string page_token = 3; @@ -8235,41 +8235,41 @@ inline void ListCollectionIdsRequest::clear_page_token() { page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListCollectionIdsRequest::page_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListCollectionIdsRequest.page_token) return page_token_.GetNoArena(); } inline void ListCollectionIdsRequest::set_page_token(const ::std::string& value) { page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsRequest.page_token) } #if LANG_CXX11 inline void ListCollectionIdsRequest::set_page_token(::std::string&& value) { page_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListCollectionIdsRequest.page_token) } #endif inline void ListCollectionIdsRequest::set_page_token(const char* value) { GOOGLE_DCHECK(value != NULL); page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListCollectionIdsRequest.page_token) } inline void ListCollectionIdsRequest::set_page_token(const char* value, size_t size) { page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListCollectionIdsRequest.page_token) } inline ::std::string* ListCollectionIdsRequest::mutable_page_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListCollectionIdsRequest.page_token) return page_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListCollectionIdsRequest::release_page_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListCollectionIdsRequest.page_token) return page_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -8280,7 +8280,7 @@ inline void ListCollectionIdsRequest::set_allocated_page_token(::std::string* pa } page_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), page_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListCollectionIdsRequest.page_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListCollectionIdsRequest.page_token) } // ------------------------------------------------------------------- @@ -8295,64 +8295,64 @@ inline void ListCollectionIdsResponse::clear_collection_ids() { collection_ids_.Clear(); } inline const ::std::string& ListCollectionIdsResponse::collection_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListCollectionIdsResponse.collection_ids) return collection_ids_.Get(index); } inline ::std::string* ListCollectionIdsResponse::mutable_collection_ids(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListCollectionIdsResponse.collection_ids) return collection_ids_.Mutable(index); } inline void ListCollectionIdsResponse::set_collection_ids(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsResponse.collection_ids) collection_ids_.Mutable(index)->assign(value); } #if LANG_CXX11 inline void ListCollectionIdsResponse::set_collection_ids(int index, ::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsResponse.collection_ids) collection_ids_.Mutable(index)->assign(std::move(value)); } #endif inline void ListCollectionIdsResponse::set_collection_ids(int index, const char* value) { GOOGLE_DCHECK(value != NULL); collection_ids_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } inline void ListCollectionIdsResponse::set_collection_ids(int index, const char* value, size_t size) { collection_ids_.Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } inline ::std::string* ListCollectionIdsResponse::add_collection_ids() { - // @@protoc_insertion_point(field_add_mutable:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_add_mutable:google.firestore.v1.ListCollectionIdsResponse.collection_ids) return collection_ids_.Add(); } inline void ListCollectionIdsResponse::add_collection_ids(const ::std::string& value) { collection_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } #if LANG_CXX11 inline void ListCollectionIdsResponse::add_collection_ids(::std::string&& value) { collection_ids_.Add(std::move(value)); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } #endif inline void ListCollectionIdsResponse::add_collection_ids(const char* value) { GOOGLE_DCHECK(value != NULL); collection_ids_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_add_char:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } inline void ListCollectionIdsResponse::add_collection_ids(const char* value, size_t size) { collection_ids_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_add_pointer:google.firestore.v1.ListCollectionIdsResponse.collection_ids) } inline const ::google::protobuf::RepeatedPtrField< ::std::string>& ListCollectionIdsResponse::collection_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.ListCollectionIdsResponse.collection_ids) return collection_ids_; } inline ::google::protobuf::RepeatedPtrField< ::std::string>* ListCollectionIdsResponse::mutable_collection_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.ListCollectionIdsResponse.collection_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.ListCollectionIdsResponse.collection_ids) return &collection_ids_; } @@ -8361,41 +8361,41 @@ inline void ListCollectionIdsResponse::clear_next_page_token() { next_page_token_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ListCollectionIdsResponse::next_page_token() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_get:google.firestore.v1.ListCollectionIdsResponse.next_page_token) return next_page_token_.GetNoArena(); } inline void ListCollectionIdsResponse::set_next_page_token(const ::std::string& value) { next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_set:google.firestore.v1.ListCollectionIdsResponse.next_page_token) } #if LANG_CXX11 inline void ListCollectionIdsResponse::set_next_page_token(::std::string&& value) { next_page_token_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.ListCollectionIdsResponse.next_page_token) } #endif inline void ListCollectionIdsResponse::set_next_page_token(const char* value) { GOOGLE_DCHECK(value != NULL); next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.ListCollectionIdsResponse.next_page_token) } inline void ListCollectionIdsResponse::set_next_page_token(const char* value, size_t size) { next_page_token_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.ListCollectionIdsResponse.next_page_token) } inline ::std::string* ListCollectionIdsResponse::mutable_next_page_token() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.ListCollectionIdsResponse.next_page_token) return next_page_token_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ListCollectionIdsResponse::release_next_page_token() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_release:google.firestore.v1.ListCollectionIdsResponse.next_page_token) return next_page_token_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -8406,7 +8406,7 @@ inline void ListCollectionIdsResponse::set_allocated_next_page_token(::std::stri } next_page_token_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), next_page_token); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.ListCollectionIdsResponse.next_page_token) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.ListCollectionIdsResponse.next_page_token) } #ifdef __GNUC__ @@ -8467,17 +8467,17 @@ inline void ListCollectionIdsResponse::set_allocated_next_page_token(::std::stri // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace protobuf { -template <> struct is_proto_enum< ::google::firestore::v1beta1::TargetChange_TargetChangeType> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::TargetChange_TargetChangeType> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::TargetChange_TargetChangeType>() { - return ::google::firestore::v1beta1::TargetChange_TargetChangeType_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::TargetChange_TargetChangeType>() { + return ::google::firestore::v1::TargetChange_TargetChangeType_descriptor(); } } // namespace protobuf @@ -8485,4 +8485,4 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::Ta // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2ffirestore_2fv1beta1_2ffirestore_2eproto__INCLUDED +#endif // PROTOBUF_google_2ffirestore_2fv1_2ffirestore_2eproto__INCLUDED diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.cc b/Firestore/Protos/cpp/google/firestore/v1/query.pb.cc similarity index 74% rename from Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.cc rename to Firestore/Protos/cpp/google/firestore/v1/query.pb.cc index 0a2db3be4f9..2dae6038af9 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.cc +++ b/Firestore/Protos/cpp/google/firestore/v1/query.pb.cc @@ -15,9 +15,9 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/query.proto +// source: google/firestore/v1/query.proto -#include "google/firestore/v1beta1/query.pb.h" +#include "google/firestore/v1/query.pb.h" #include @@ -37,7 +37,7 @@ // @@protoc_insertion_point(includes) namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class StructuredQuery_CollectionSelectorDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed @@ -47,9 +47,9 @@ class StructuredQuery_FilterDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* composite_filter_; - const ::google::firestore::v1beta1::StructuredQuery_FieldFilter* field_filter_; - const ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* unary_filter_; + const ::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter_; + const ::google::firestore::v1::StructuredQuery_FieldFilter* field_filter_; + const ::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter_; } _StructuredQuery_Filter_default_instance_; class StructuredQuery_CompositeFilterDefaultTypeInternal { public: @@ -65,7 +65,7 @@ class StructuredQuery_UnaryFilterDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::StructuredQuery_FieldReference* field_; + const ::google::firestore::v1::StructuredQuery_FieldReference* field_; } _StructuredQuery_UnaryFilter_default_instance_; class StructuredQuery_OrderDefaultTypeInternal { public: @@ -92,10 +92,10 @@ class CursorDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _Cursor_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google -namespace protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fquery_2eproto { void InitDefaultsStructuredQuery_CollectionSelectorImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -105,11 +105,11 @@ void InitDefaultsStructuredQuery_CollectionSelectorImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_CollectionSelector_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_CollectionSelector(); + void* ptr = &::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_CollectionSelector(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_CollectionSelector::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_CollectionSelector::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_CollectionSelector() { @@ -125,20 +125,20 @@ void InitDefaultsStructuredQuery_CompositeFilterImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_Filter(); + void* ptr = &::google::firestore::v1::_StructuredQuery_Filter_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_Filter(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_CompositeFilter_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_CompositeFilter(); + void* ptr = &::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_CompositeFilter(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_Filter::InitAsDefaultInstance(); - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_Filter::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_CompositeFilter::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_CompositeFilter() { @@ -154,14 +154,14 @@ void InitDefaultsStructuredQuery_FieldFilterImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_FieldFilter_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_FieldFilter(); + void* ptr = &::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_FieldFilter(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_FieldFilter::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_FieldFilter::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_FieldFilter() { @@ -177,13 +177,13 @@ void InitDefaultsStructuredQuery_UnaryFilterImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_UnaryFilter_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_UnaryFilter(); + void* ptr = &::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_UnaryFilter(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_UnaryFilter::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_UnaryFilter() { @@ -199,13 +199,13 @@ void InitDefaultsStructuredQuery_OrderImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_Order_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_Order(); + void* ptr = &::google::firestore::v1::_StructuredQuery_Order_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_Order(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_Order::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_Order::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_Order() { @@ -222,11 +222,11 @@ void InitDefaultsStructuredQuery_FieldReferenceImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_FieldReference_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_FieldReference(); + void* ptr = &::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_FieldReference(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_FieldReference::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_FieldReference::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_FieldReference() { @@ -242,13 +242,13 @@ void InitDefaultsStructuredQuery_ProjectionImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_Projection_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery_Projection(); + void* ptr = &::google::firestore::v1::_StructuredQuery_Projection_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery_Projection(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery_Projection::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery_Projection::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery_Projection() { @@ -264,18 +264,18 @@ void InitDefaultsStructuredQueryImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsCursor(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor(); protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32Value(); { - void* ptr = &::google::firestore::v1beta1::_StructuredQuery_default_instance_; - new (ptr) ::google::firestore::v1beta1::StructuredQuery(); + void* ptr = &::google::firestore::v1::_StructuredQuery_default_instance_; + new (ptr) ::google::firestore::v1::StructuredQuery(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::StructuredQuery::InitAsDefaultInstance(); + ::google::firestore::v1::StructuredQuery::InitAsDefaultInstance(); } void InitDefaultsStructuredQuery() { @@ -291,13 +291,13 @@ void InitDefaultsCursorImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); { - void* ptr = &::google::firestore::v1beta1::_Cursor_default_instance_; - new (ptr) ::google::firestore::v1beta1::Cursor(); + void* ptr = &::google::firestore::v1::_Cursor_default_instance_; + new (ptr) ::google::firestore::v1::Cursor(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Cursor::InitAsDefaultInstance(); + ::google::firestore::v1::Cursor::InitAsDefaultInstance(); } void InitDefaultsCursor() { @@ -310,115 +310,115 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[4]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CollectionSelector, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CollectionSelector, collection_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CollectionSelector, all_descendants_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, collection_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CollectionSelector, all_descendants_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Filter, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Filter, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::StructuredQuery_FilterDefaultTypeInternal, composite_filter_), - offsetof(::google::firestore::v1beta1::StructuredQuery_FilterDefaultTypeInternal, field_filter_), - offsetof(::google::firestore::v1beta1::StructuredQuery_FilterDefaultTypeInternal, unary_filter_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Filter, filter_type_), + offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, composite_filter_), + offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, field_filter_), + offsetof(::google::firestore::v1::StructuredQuery_FilterDefaultTypeInternal, unary_filter_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Filter, filter_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CompositeFilter, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CompositeFilter, op_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_CompositeFilter, filters_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_CompositeFilter, filters_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldFilter, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldFilter, field_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldFilter, op_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldFilter, value_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, field_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, op_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldFilter, value_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_UnaryFilter, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_UnaryFilter, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_UnaryFilter, op_), - offsetof(::google::firestore::v1beta1::StructuredQuery_UnaryFilterDefaultTypeInternal, field_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_UnaryFilter, operand_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, op_), + offsetof(::google::firestore::v1::StructuredQuery_UnaryFilterDefaultTypeInternal, field_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_UnaryFilter, operand_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Order, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Order, field_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Order, direction_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, field_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Order, direction_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldReference, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_FieldReference, field_path_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_FieldReference, field_path_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Projection, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery_Projection, fields_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery_Projection, fields_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, select_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, from_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, where_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, order_by_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, start_at_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, end_at_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, offset_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::StructuredQuery, limit_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, select_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, from_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, where_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, order_by_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, start_at_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, end_at_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, offset_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::StructuredQuery, limit_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Cursor, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Cursor, values_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Cursor, before_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, values_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Cursor, before_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_CollectionSelector)}, - { 7, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_Filter)}, - { 16, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_CompositeFilter)}, - { 23, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_FieldFilter)}, - { 31, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_UnaryFilter)}, - { 39, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_Order)}, - { 46, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_FieldReference)}, - { 52, -1, sizeof(::google::firestore::v1beta1::StructuredQuery_Projection)}, - { 58, -1, sizeof(::google::firestore::v1beta1::StructuredQuery)}, - { 71, -1, sizeof(::google::firestore::v1beta1::Cursor)}, + { 0, -1, sizeof(::google::firestore::v1::StructuredQuery_CollectionSelector)}, + { 7, -1, sizeof(::google::firestore::v1::StructuredQuery_Filter)}, + { 16, -1, sizeof(::google::firestore::v1::StructuredQuery_CompositeFilter)}, + { 23, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldFilter)}, + { 31, -1, sizeof(::google::firestore::v1::StructuredQuery_UnaryFilter)}, + { 39, -1, sizeof(::google::firestore::v1::StructuredQuery_Order)}, + { 46, -1, sizeof(::google::firestore::v1::StructuredQuery_FieldReference)}, + { 52, -1, sizeof(::google::firestore::v1::StructuredQuery_Projection)}, + { 58, -1, sizeof(::google::firestore::v1::StructuredQuery)}, + { 71, -1, sizeof(::google::firestore::v1::Cursor)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_CollectionSelector_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_CompositeFilter_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_FieldFilter_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_UnaryFilter_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_Order_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_FieldReference_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_Projection_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_StructuredQuery_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_Cursor_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_CollectionSelector_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_Filter_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_Order_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_Projection_default_instance_), + reinterpret_cast(&::google::firestore::v1::_StructuredQuery_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Cursor_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/firestore/v1beta1/query.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/firestore/v1/query.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, file_level_enum_descriptors, NULL); } @@ -436,74 +436,71 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n$google/firestore/v1beta1/query.proto\022\030" - "google.firestore.v1beta1\032\034google/api/ann" - "otations.proto\032\'google/firestore/v1beta1" - "/document.proto\032\036google/protobuf/wrapper" - "s.proto\"\271\017\n\017StructuredQuery\022D\n\006select\030\001 " - "\001(\01324.google.firestore.v1beta1.Structure" - "dQuery.Projection\022J\n\004from\030\002 \003(\0132<.google" - ".firestore.v1beta1.StructuredQuery.Colle" - "ctionSelector\022\?\n\005where\030\003 \001(\01320.google.fi" - "restore.v1beta1.StructuredQuery.Filter\022A" - "\n\010order_by\030\004 \003(\0132/.google.firestore.v1be" - "ta1.StructuredQuery.Order\0222\n\010start_at\030\007 " - "\001(\0132 .google.firestore.v1beta1.Cursor\0220\n" - "\006end_at\030\010 \001(\0132 .google.firestore.v1beta1" - ".Cursor\022\016\n\006offset\030\006 \001(\005\022*\n\005limit\030\005 \001(\0132\033" - ".google.protobuf.Int32Value\032D\n\022Collectio" - "nSelector\022\025\n\rcollection_id\030\002 \001(\t\022\027\n\017all_" - "descendants\030\003 \001(\010\032\214\002\n\006Filter\022U\n\020composit" - "e_filter\030\001 \001(\01329.google.firestore.v1beta" - "1.StructuredQuery.CompositeFilterH\000\022M\n\014f" - "ield_filter\030\002 \001(\01325.google.firestore.v1b" - "eta1.StructuredQuery.FieldFilterH\000\022M\n\014un" - "ary_filter\030\003 \001(\01325.google.firestore.v1be" - "ta1.StructuredQuery.UnaryFilterH\000B\r\n\013fil" - "ter_type\032\323\001\n\017CompositeFilter\022N\n\002op\030\001 \001(\016" - "2B.google.firestore.v1beta1.StructuredQu" - "ery.CompositeFilter.Operator\022A\n\007filters\030" - "\002 \003(\01320.google.firestore.v1beta1.Structu" - "redQuery.Filter\"-\n\010Operator\022\030\n\024OPERATOR_" - "UNSPECIFIED\020\000\022\007\n\003AND\020\001\032\354\002\n\013FieldFilter\022G" - "\n\005field\030\001 \001(\01328.google.firestore.v1beta1" - ".StructuredQuery.FieldReference\022J\n\002op\030\002 " - "\001(\0162>.google.firestore.v1beta1.Structure" - "dQuery.FieldFilter.Operator\022.\n\005value\030\003 \001" - "(\0132\037.google.firestore.v1beta1.Value\"\227\001\n\010" - "Operator\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\r\n\tLE" - "SS_THAN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GRE" - "ATER_THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t" - "\n\005EQUAL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\032\363\001\n\013UnaryF" - "ilter\022J\n\002op\030\001 \001(\0162>.google.firestore.v1b" - "eta1.StructuredQuery.UnaryFilter.Operato" - "r\022I\n\005field\030\002 \001(\01328.google.firestore.v1be" - "ta1.StructuredQuery.FieldReferenceH\000\"=\n\010" - "Operator\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\n\n\006IS" - "_NAN\020\002\022\013\n\007IS_NULL\020\003B\016\n\014operand_type\032\230\001\n\005" - "Order\022G\n\005field\030\001 \001(\01328.google.firestore." - "v1beta1.StructuredQuery.FieldReference\022F" - "\n\tdirection\030\002 \001(\01623.google.firestore.v1b" - "eta1.StructuredQuery.Direction\032$\n\016FieldR" - "eference\022\022\n\nfield_path\030\002 \001(\t\032V\n\nProjecti" - "on\022H\n\006fields\030\002 \003(\01328.google.firestore.v1" - "beta1.StructuredQuery.FieldReference\"E\n\t" - "Direction\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\r\n\t" - "ASCENDING\020\001\022\016\n\nDESCENDING\020\002\"I\n\006Cursor\022/\n" - "\006values\030\001 \003(\0132\037.google.firestore.v1beta1" - ".Value\022\016\n\006before\030\002 \001(\010B\270\001\n\034com.google.fi" - "restore.v1beta1B\nQueryProtoP\001ZAgoogle.go" + "\n\037google/firestore/v1/query.proto\022\023googl" + "e.firestore.v1\032\034google/api/annotations.p" + "roto\032\"google/firestore/v1/document.proto" + "\032\036google/protobuf/wrappers.proto\"\332\016\n\017Str" + "ucturedQuery\022\?\n\006select\030\001 \001(\0132/.google.fi" + "restore.v1.StructuredQuery.Projection\022E\n" + "\004from\030\002 \003(\01327.google.firestore.v1.Struct" + "uredQuery.CollectionSelector\022:\n\005where\030\003 " + "\001(\0132+.google.firestore.v1.StructuredQuer" + "y.Filter\022<\n\010order_by\030\004 \003(\0132*.google.fire" + "store.v1.StructuredQuery.Order\022-\n\010start_" + "at\030\007 \001(\0132\033.google.firestore.v1.Cursor\022+\n" + "\006end_at\030\010 \001(\0132\033.google.firestore.v1.Curs" + "or\022\016\n\006offset\030\006 \001(\005\022*\n\005limit\030\005 \001(\0132\033.goog" + "le.protobuf.Int32Value\032D\n\022CollectionSele" + "ctor\022\025\n\rcollection_id\030\002 \001(\t\022\027\n\017all_desce" + "ndants\030\003 \001(\010\032\375\001\n\006Filter\022P\n\020composite_fil" + "ter\030\001 \001(\01324.google.firestore.v1.Structur" + "edQuery.CompositeFilterH\000\022H\n\014field_filte" + "r\030\002 \001(\01320.google.firestore.v1.Structured" + "Query.FieldFilterH\000\022H\n\014unary_filter\030\003 \001(" + "\01320.google.firestore.v1.StructuredQuery." + "UnaryFilterH\000B\r\n\013filter_type\032\311\001\n\017Composi" + "teFilter\022I\n\002op\030\001 \001(\0162=.google.firestore." + "v1.StructuredQuery.CompositeFilter.Opera" + "tor\022<\n\007filters\030\002 \003(\0132+.google.firestore." + "v1.StructuredQuery.Filter\"-\n\010Operator\022\030\n" + "\024OPERATOR_UNSPECIFIED\020\000\022\007\n\003AND\020\001\032\335\002\n\013Fie" + "ldFilter\022B\n\005field\030\001 \001(\01323.google.firesto" + "re.v1.StructuredQuery.FieldReference\022E\n\002" + "op\030\002 \001(\01629.google.firestore.v1.Structure" + "dQuery.FieldFilter.Operator\022)\n\005value\030\003 \001" + "(\0132\032.google.firestore.v1.Value\"\227\001\n\010Opera" + "tor\022\030\n\024OPERATOR_UNSPECIFIED\020\000\022\r\n\tLESS_TH" + "AN\020\001\022\026\n\022LESS_THAN_OR_EQUAL\020\002\022\020\n\014GREATER_" + "THAN\020\003\022\031\n\025GREATER_THAN_OR_EQUAL\020\004\022\t\n\005EQU" + "AL\020\005\022\022\n\016ARRAY_CONTAINS\020\007\032\351\001\n\013UnaryFilter" + "\022E\n\002op\030\001 \001(\01629.google.firestore.v1.Struc" + "turedQuery.UnaryFilter.Operator\022D\n\005field" + "\030\002 \001(\01323.google.firestore.v1.StructuredQ" + "uery.FieldReferenceH\000\"=\n\010Operator\022\030\n\024OPE" + "RATOR_UNSPECIFIED\020\000\022\n\n\006IS_NAN\020\002\022\013\n\007IS_NU" + "LL\020\003B\016\n\014operand_type\032\216\001\n\005Order\022B\n\005field\030" + "\001 \001(\01323.google.firestore.v1.StructuredQu" + "ery.FieldReference\022A\n\tdirection\030\002 \001(\0162.." + "google.firestore.v1.StructuredQuery.Dire" + "ction\032$\n\016FieldReference\022\022\n\nfield_path\030\002 " + "\001(\t\032Q\n\nProjection\022C\n\006fields\030\002 \003(\01323.goog" + "le.firestore.v1.StructuredQuery.FieldRef" + "erence\"E\n\tDirection\022\031\n\025DIRECTION_UNSPECI" + "FIED\020\000\022\r\n\tASCENDING\020\001\022\016\n\nDESCENDING\020\002\"D\n" + "\006Cursor\022*\n\006values\030\001 \003(\0132\032.google.firesto" + "re.v1.Value\022\016\n\006before\030\002 \001(\010B\256\001\n\027com.goog" + "le.firestore.v1B\nQueryProtoP\001Z= 1900 const ::google::protobuf::EnumDescriptor* StructuredQuery_FieldFilter_Operator_descriptor() { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_enum_descriptors[1]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[1]; } bool StructuredQuery_FieldFilter_Operator_IsValid(int value) { switch (value) { @@ -574,8 +571,8 @@ const StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::Operator const int StructuredQuery_FieldFilter::Operator_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* StructuredQuery_UnaryFilter_Operator_descriptor() { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_enum_descriptors[2]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[2]; } bool StructuredQuery_UnaryFilter_Operator_IsValid(int value) { switch (value) { @@ -597,8 +594,8 @@ const StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::Operator const int StructuredQuery_UnaryFilter::Operator_ARRAYSIZE; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 const ::google::protobuf::EnumDescriptor* StructuredQuery_Direction_descriptor() { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_enum_descriptors[3]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_enum_descriptors[3]; } bool StructuredQuery_Direction_IsValid(int value) { switch (value) { @@ -632,10 +629,10 @@ const int StructuredQuery_CollectionSelector::kAllDescendantsFieldNumber; StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CollectionSelector) } StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector(const StructuredQuery_CollectionSelector& from) : ::google::protobuf::Message(), @@ -647,7 +644,7 @@ StructuredQuery_CollectionSelector::StructuredQuery_CollectionSelector(const Str collection_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.collection_id_); } all_descendants_ = from.all_descendants_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CollectionSelector) } void StructuredQuery_CollectionSelector::SharedCtor() { @@ -657,7 +654,7 @@ void StructuredQuery_CollectionSelector::SharedCtor() { } StructuredQuery_CollectionSelector::~StructuredQuery_CollectionSelector() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CollectionSelector) SharedDtor(); } @@ -671,12 +668,12 @@ void StructuredQuery_CollectionSelector::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_CollectionSelector::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_CollectionSelector& StructuredQuery_CollectionSelector::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelector(); return *internal_default_instance(); } @@ -689,7 +686,7 @@ StructuredQuery_CollectionSelector* StructuredQuery_CollectionSelector::New(::go } void StructuredQuery_CollectionSelector::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CollectionSelector) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -703,7 +700,7 @@ bool StructuredQuery_CollectionSelector::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.CollectionSelector) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -718,7 +715,7 @@ bool StructuredQuery_CollectionSelector::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id")); + "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id")); } else { goto handle_unusual; } @@ -751,17 +748,17 @@ bool StructuredQuery_CollectionSelector::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.CollectionSelector) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.CollectionSelector) return false; #undef DO_ } void StructuredQuery_CollectionSelector::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.CollectionSelector) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -770,7 +767,7 @@ void StructuredQuery_CollectionSelector::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id"); + "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->collection_id(), output); } @@ -784,13 +781,13 @@ void StructuredQuery_CollectionSelector::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.CollectionSelector) } ::google::protobuf::uint8* StructuredQuery_CollectionSelector::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CollectionSelector) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -799,7 +796,7 @@ ::google::protobuf::uint8* StructuredQuery_CollectionSelector::InternalSerialize ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->collection_id().data(), static_cast(this->collection_id().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id"); + "google.firestore.v1.StructuredQuery.CollectionSelector.collection_id"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->collection_id(), target); @@ -814,12 +811,12 @@ ::google::protobuf::uint8* StructuredQuery_CollectionSelector::InternalSerialize target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CollectionSelector) return target; } size_t StructuredQuery_CollectionSelector::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CollectionSelector) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -847,22 +844,22 @@ size_t StructuredQuery_CollectionSelector::ByteSizeLong() const { } void StructuredQuery_CollectionSelector::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_CollectionSelector* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CollectionSelector) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CollectionSelector) MergeFrom(*source); } } void StructuredQuery_CollectionSelector::MergeFrom(const StructuredQuery_CollectionSelector& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CollectionSelector) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -878,14 +875,14 @@ void StructuredQuery_CollectionSelector::MergeFrom(const StructuredQuery_Collect } void StructuredQuery_CollectionSelector::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_CollectionSelector::CopyFrom(const StructuredQuery_CollectionSelector& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.CollectionSelector) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CollectionSelector) if (&from == this) return; Clear(); MergeFrom(from); @@ -908,22 +905,22 @@ void StructuredQuery_CollectionSelector::InternalSwap(StructuredQuery_Collection } ::google::protobuf::Metadata StructuredQuery_CollectionSelector::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StructuredQuery_Filter::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_.composite_filter_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter*>( - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_.field_filter_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_FieldFilter*>( - ::google::firestore::v1beta1::StructuredQuery_FieldFilter::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_.unary_filter_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter*>( - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter::internal_default_instance()); -} -void StructuredQuery_Filter::set_allocated_composite_filter(::google::firestore::v1beta1::StructuredQuery_CompositeFilter* composite_filter) { + ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.composite_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter*>( + ::google::firestore::v1::StructuredQuery_CompositeFilter::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.field_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldFilter*>( + ::google::firestore::v1::StructuredQuery_FieldFilter::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_Filter_default_instance_.unary_filter_ = const_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter*>( + ::google::firestore::v1::StructuredQuery_UnaryFilter::internal_default_instance()); +} +void StructuredQuery_Filter::set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_filter_type(); if (composite_filter) { @@ -935,9 +932,9 @@ void StructuredQuery_Filter::set_allocated_composite_filter(::google::firestore: set_has_composite_filter(); filter_type_.composite_filter_ = composite_filter; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.Filter.composite_filter) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.composite_filter) } -void StructuredQuery_Filter::set_allocated_field_filter(::google::firestore::v1beta1::StructuredQuery_FieldFilter* field_filter) { +void StructuredQuery_Filter::set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* field_filter) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_filter_type(); if (field_filter) { @@ -949,9 +946,9 @@ void StructuredQuery_Filter::set_allocated_field_filter(::google::firestore::v1b set_has_field_filter(); filter_type_.field_filter_ = field_filter; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.Filter.field_filter) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.field_filter) } -void StructuredQuery_Filter::set_allocated_unary_filter(::google::firestore::v1beta1::StructuredQuery_UnaryFilter* unary_filter) { +void StructuredQuery_Filter::set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_filter_type(); if (unary_filter) { @@ -963,7 +960,7 @@ void StructuredQuery_Filter::set_allocated_unary_filter(::google::firestore::v1b set_has_unary_filter(); filter_type_.unary_filter_ = unary_filter; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.Filter.unary_filter) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Filter.unary_filter) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int StructuredQuery_Filter::kCompositeFilterFieldNumber; @@ -974,10 +971,10 @@ const int StructuredQuery_Filter::kUnaryFilterFieldNumber; StructuredQuery_Filter::StructuredQuery_Filter() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Filter) } StructuredQuery_Filter::StructuredQuery_Filter(const StructuredQuery_Filter& from) : ::google::protobuf::Message(), @@ -987,22 +984,22 @@ StructuredQuery_Filter::StructuredQuery_Filter(const StructuredQuery_Filter& fro clear_has_filter_type(); switch (from.filter_type_case()) { case kCompositeFilter: { - mutable_composite_filter()->::google::firestore::v1beta1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter()); + mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter()); break; } case kFieldFilter: { - mutable_field_filter()->::google::firestore::v1beta1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter()); + mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter()); break; } case kUnaryFilter: { - mutable_unary_filter()->::google::firestore::v1beta1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter()); + mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter()); break; } case FILTER_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Filter) } void StructuredQuery_Filter::SharedCtor() { @@ -1011,7 +1008,7 @@ void StructuredQuery_Filter::SharedCtor() { } StructuredQuery_Filter::~StructuredQuery_Filter() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Filter) SharedDtor(); } @@ -1027,12 +1024,12 @@ void StructuredQuery_Filter::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_Filter::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_Filter& StructuredQuery_Filter::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); return *internal_default_instance(); } @@ -1045,7 +1042,7 @@ StructuredQuery_Filter* StructuredQuery_Filter::New(::google::protobuf::Arena* a } void StructuredQuery_Filter::clear_filter_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.Filter) switch (filter_type_case()) { case kCompositeFilter: { delete filter_type_.composite_filter_; @@ -1068,7 +1065,7 @@ void StructuredQuery_Filter::clear_filter_type() { void StructuredQuery_Filter::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Filter) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1081,13 +1078,13 @@ bool StructuredQuery_Filter::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Filter) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -1099,7 +1096,7 @@ bool StructuredQuery_Filter::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1111,7 +1108,7 @@ bool StructuredQuery_Filter::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; + // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -1135,33 +1132,33 @@ bool StructuredQuery_Filter::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Filter) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Filter) return false; #undef DO_ } void StructuredQuery_Filter::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Filter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; if (has_composite_filter()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *filter_type_.composite_filter_, output); } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; if (has_field_filter()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *filter_type_.field_filter_, output); } - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; + // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; if (has_unary_filter()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *filter_type_.unary_filter_, output); @@ -1171,31 +1168,31 @@ void StructuredQuery_Filter::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Filter) } ::google::protobuf::uint8* StructuredQuery_Filter::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Filter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; if (has_composite_filter()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *filter_type_.composite_filter_, deterministic, target); } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; if (has_field_filter()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 2, *filter_type_.field_filter_, deterministic, target); } - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; + // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; if (has_unary_filter()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1206,12 +1203,12 @@ ::google::protobuf::uint8* StructuredQuery_Filter::InternalSerializeWithCachedSi target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Filter) return target; } size_t StructuredQuery_Filter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Filter) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1220,21 +1217,21 @@ size_t StructuredQuery_Filter::ByteSizeLong() const { (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } switch (filter_type_case()) { - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; case kCompositeFilter: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *filter_type_.composite_filter_); break; } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; case kFieldFilter: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *filter_type_.field_filter_); break; } - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; + // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; case kUnaryFilter: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1253,22 +1250,22 @@ size_t StructuredQuery_Filter::ByteSizeLong() const { } void StructuredQuery_Filter::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Filter) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_Filter* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Filter) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Filter) MergeFrom(*source); } } void StructuredQuery_Filter::MergeFrom(const StructuredQuery_Filter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Filter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1276,15 +1273,15 @@ void StructuredQuery_Filter::MergeFrom(const StructuredQuery_Filter& from) { switch (from.filter_type_case()) { case kCompositeFilter: { - mutable_composite_filter()->::google::firestore::v1beta1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter()); + mutable_composite_filter()->::google::firestore::v1::StructuredQuery_CompositeFilter::MergeFrom(from.composite_filter()); break; } case kFieldFilter: { - mutable_field_filter()->::google::firestore::v1beta1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter()); + mutable_field_filter()->::google::firestore::v1::StructuredQuery_FieldFilter::MergeFrom(from.field_filter()); break; } case kUnaryFilter: { - mutable_unary_filter()->::google::firestore::v1beta1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter()); + mutable_unary_filter()->::google::firestore::v1::StructuredQuery_UnaryFilter::MergeFrom(from.unary_filter()); break; } case FILTER_TYPE_NOT_SET: { @@ -1294,14 +1291,14 @@ void StructuredQuery_Filter::MergeFrom(const StructuredQuery_Filter& from) { } void StructuredQuery_Filter::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Filter) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_Filter::CopyFrom(const StructuredQuery_Filter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.Filter) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Filter) if (&from == this) return; Clear(); MergeFrom(from); @@ -1324,8 +1321,8 @@ void StructuredQuery_Filter::InternalSwap(StructuredQuery_Filter* other) { } ::google::protobuf::Metadata StructuredQuery_Filter::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1341,10 +1338,10 @@ const int StructuredQuery_CompositeFilter::kFiltersFieldNumber; StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.CompositeFilter) } StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter(const StructuredQuery_CompositeFilter& from) : ::google::protobuf::Message(), @@ -1353,7 +1350,7 @@ StructuredQuery_CompositeFilter::StructuredQuery_CompositeFilter(const Structure _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); op_ = from.op_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.CompositeFilter) } void StructuredQuery_CompositeFilter::SharedCtor() { @@ -1362,7 +1359,7 @@ void StructuredQuery_CompositeFilter::SharedCtor() { } StructuredQuery_CompositeFilter::~StructuredQuery_CompositeFilter() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.CompositeFilter) SharedDtor(); } @@ -1375,12 +1372,12 @@ void StructuredQuery_CompositeFilter::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_CompositeFilter::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_CompositeFilter& StructuredQuery_CompositeFilter::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilter(); return *internal_default_instance(); } @@ -1393,7 +1390,7 @@ StructuredQuery_CompositeFilter* StructuredQuery_CompositeFilter::New(::google:: } void StructuredQuery_CompositeFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.CompositeFilter) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1407,13 +1404,13 @@ bool StructuredQuery_CompositeFilter::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.CompositeFilter) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { @@ -1421,14 +1418,14 @@ bool StructuredQuery_CompositeFilter::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_op(static_cast< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator >(value)); + set_op(static_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator >(value)); } else { goto handle_unusual; } break; } - // repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; + // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1451,27 +1448,27 @@ bool StructuredQuery_CompositeFilter::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.CompositeFilter) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.CompositeFilter) return false; #undef DO_ } void StructuredQuery_CompositeFilter::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.CompositeFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; if (this->op() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->op(), output); } - // repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; + // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; for (unsigned int i = 0, n = static_cast(this->filters_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -1482,23 +1479,23 @@ void StructuredQuery_CompositeFilter::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.CompositeFilter) } ::google::protobuf::uint8* StructuredQuery_CompositeFilter::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.CompositeFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; if (this->op() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->op(), target); } - // repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; + // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; for (unsigned int i = 0, n = static_cast(this->filters_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1510,12 +1507,12 @@ ::google::protobuf::uint8* StructuredQuery_CompositeFilter::InternalSerializeWit target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.CompositeFilter) return target; } size_t StructuredQuery_CompositeFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.CompositeFilter) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1523,7 +1520,7 @@ size_t StructuredQuery_CompositeFilter::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; + // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; { unsigned int count = static_cast(this->filters_size()); total_size += 1UL * count; @@ -1534,7 +1531,7 @@ size_t StructuredQuery_CompositeFilter::ByteSizeLong() const { } } - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; if (this->op() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->op()); @@ -1548,22 +1545,22 @@ size_t StructuredQuery_CompositeFilter::ByteSizeLong() const { } void StructuredQuery_CompositeFilter::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_CompositeFilter* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.CompositeFilter) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.CompositeFilter) MergeFrom(*source); } } void StructuredQuery_CompositeFilter::MergeFrom(const StructuredQuery_CompositeFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.CompositeFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1576,14 +1573,14 @@ void StructuredQuery_CompositeFilter::MergeFrom(const StructuredQuery_CompositeF } void StructuredQuery_CompositeFilter::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_CompositeFilter::CopyFrom(const StructuredQuery_CompositeFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.CompositeFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.CompositeFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -1606,18 +1603,18 @@ void StructuredQuery_CompositeFilter::InternalSwap(StructuredQuery_CompositeFilt } ::google::protobuf::Metadata StructuredQuery_CompositeFilter::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StructuredQuery_FieldFilter::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_FieldReference*>( - ::google::firestore::v1beta1::StructuredQuery_FieldReference::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::firestore::v1beta1::Value*>( - ::google::firestore::v1beta1::Value::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>( + ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_._instance.get_mutable()->value_ = const_cast< ::google::firestore::v1::Value*>( + ::google::firestore::v1::Value::internal_default_instance()); } void StructuredQuery_FieldFilter::clear_value() { if (GetArenaNoVirtual() == NULL && value_ != NULL) { @@ -1634,10 +1631,10 @@ const int StructuredQuery_FieldFilter::kValueFieldNumber; StructuredQuery_FieldFilter::StructuredQuery_FieldFilter() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldFilter) } StructuredQuery_FieldFilter::StructuredQuery_FieldFilter(const StructuredQuery_FieldFilter& from) : ::google::protobuf::Message(), @@ -1645,17 +1642,17 @@ StructuredQuery_FieldFilter::StructuredQuery_FieldFilter(const StructuredQuery_F _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_field()) { - field_ = new ::google::firestore::v1beta1::StructuredQuery_FieldReference(*from.field_); + field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_); } else { field_ = NULL; } if (from.has_value()) { - value_ = new ::google::firestore::v1beta1::Value(*from.value_); + value_ = new ::google::firestore::v1::Value(*from.value_); } else { value_ = NULL; } op_ = from.op_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldFilter) } void StructuredQuery_FieldFilter::SharedCtor() { @@ -1666,7 +1663,7 @@ void StructuredQuery_FieldFilter::SharedCtor() { } StructuredQuery_FieldFilter::~StructuredQuery_FieldFilter() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldFilter) SharedDtor(); } @@ -1681,12 +1678,12 @@ void StructuredQuery_FieldFilter::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_FieldFilter::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_FieldFilter& StructuredQuery_FieldFilter::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilter(); return *internal_default_instance(); } @@ -1699,7 +1696,7 @@ StructuredQuery_FieldFilter* StructuredQuery_FieldFilter::New(::google::protobuf } void StructuredQuery_FieldFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldFilter) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1720,13 +1717,13 @@ bool StructuredQuery_FieldFilter::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.FieldFilter) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -1738,7 +1735,7 @@ bool StructuredQuery_FieldFilter::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { @@ -1746,14 +1743,14 @@ bool StructuredQuery_FieldFilter::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_op(static_cast< ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator >(value)); + set_op(static_cast< ::google::firestore::v1::StructuredQuery_FieldFilter_Operator >(value)); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.Value value = 3; + // .google.firestore.v1.Value value = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -1777,33 +1774,33 @@ bool StructuredQuery_FieldFilter::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.FieldFilter) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.FieldFilter) return false; #undef DO_ } void StructuredQuery_FieldFilter::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.FieldFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->field_, output); } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; if (this->op() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 2, this->op(), output); } - // .google.firestore.v1beta1.Value value = 3; + // .google.firestore.v1.Value value = 3; if (this->has_value()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->value_, output); @@ -1813,30 +1810,30 @@ void StructuredQuery_FieldFilter::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.FieldFilter) } ::google::protobuf::uint8* StructuredQuery_FieldFilter::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *this->field_, deterministic, target); } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; if (this->op() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 2, this->op(), target); } - // .google.firestore.v1beta1.Value value = 3; + // .google.firestore.v1.Value value = 3; if (this->has_value()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1847,12 +1844,12 @@ ::google::protobuf::uint8* StructuredQuery_FieldFilter::InternalSerializeWithCac target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldFilter) return target; } size_t StructuredQuery_FieldFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldFilter) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1860,21 +1857,21 @@ size_t StructuredQuery_FieldFilter::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->field_); } - // .google.firestore.v1beta1.Value value = 3; + // .google.firestore.v1.Value value = 3; if (this->has_value()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->value_); } - // .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; if (this->op() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->op()); @@ -1888,32 +1885,32 @@ size_t StructuredQuery_FieldFilter::ByteSizeLong() const { } void StructuredQuery_FieldFilter::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_FieldFilter* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldFilter) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldFilter) MergeFrom(*source); } } void StructuredQuery_FieldFilter::MergeFrom(const StructuredQuery_FieldFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_field()) { - mutable_field()->::google::firestore::v1beta1::StructuredQuery_FieldReference::MergeFrom(from.field()); + mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field()); } if (from.has_value()) { - mutable_value()->::google::firestore::v1beta1::Value::MergeFrom(from.value()); + mutable_value()->::google::firestore::v1::Value::MergeFrom(from.value()); } if (from.op() != 0) { set_op(from.op()); @@ -1921,14 +1918,14 @@ void StructuredQuery_FieldFilter::MergeFrom(const StructuredQuery_FieldFilter& f } void StructuredQuery_FieldFilter::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_FieldFilter::CopyFrom(const StructuredQuery_FieldFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.FieldFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -1952,18 +1949,18 @@ void StructuredQuery_FieldFilter::InternalSwap(StructuredQuery_FieldFilter* othe } ::google::protobuf::Metadata StructuredQuery_FieldFilter::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StructuredQuery_UnaryFilter::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_StructuredQuery_UnaryFilter_default_instance_.field_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_FieldReference*>( - ::google::firestore::v1beta1::StructuredQuery_FieldReference::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_.field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>( + ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance()); } -void StructuredQuery_UnaryFilter::set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field) { +void StructuredQuery_UnaryFilter::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_operand_type(); if (field) { @@ -1975,7 +1972,7 @@ void StructuredQuery_UnaryFilter::set_allocated_field(::google::firestore::v1bet set_has_field(); operand_type_.field_ = field; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.UnaryFilter.field) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.UnaryFilter.field) } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int StructuredQuery_UnaryFilter::kOpFieldNumber; @@ -1985,10 +1982,10 @@ const int StructuredQuery_UnaryFilter::kFieldFieldNumber; StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.UnaryFilter) } StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter(const StructuredQuery_UnaryFilter& from) : ::google::protobuf::Message(), @@ -1999,14 +1996,14 @@ StructuredQuery_UnaryFilter::StructuredQuery_UnaryFilter(const StructuredQuery_U clear_has_operand_type(); switch (from.operand_type_case()) { case kField: { - mutable_field()->::google::firestore::v1beta1::StructuredQuery_FieldReference::MergeFrom(from.field()); + mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field()); break; } case OPERAND_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.UnaryFilter) } void StructuredQuery_UnaryFilter::SharedCtor() { @@ -2016,7 +2013,7 @@ void StructuredQuery_UnaryFilter::SharedCtor() { } StructuredQuery_UnaryFilter::~StructuredQuery_UnaryFilter() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.UnaryFilter) SharedDtor(); } @@ -2032,12 +2029,12 @@ void StructuredQuery_UnaryFilter::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_UnaryFilter::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_UnaryFilter& StructuredQuery_UnaryFilter::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilter(); return *internal_default_instance(); } @@ -2050,7 +2047,7 @@ StructuredQuery_UnaryFilter* StructuredQuery_UnaryFilter::New(::google::protobuf } void StructuredQuery_UnaryFilter::clear_operand_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter) switch (operand_type_case()) { case kField: { delete operand_type_.field_; @@ -2065,7 +2062,7 @@ void StructuredQuery_UnaryFilter::clear_operand_type() { void StructuredQuery_UnaryFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.UnaryFilter) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2079,13 +2076,13 @@ bool StructuredQuery_UnaryFilter::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.UnaryFilter) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) { @@ -2093,14 +2090,14 @@ bool StructuredQuery_UnaryFilter::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_op(static_cast< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator >(value)); + set_op(static_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator >(value)); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + // .google.firestore.v1.StructuredQuery.FieldReference field = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -2124,27 +2121,27 @@ bool StructuredQuery_UnaryFilter::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.UnaryFilter) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.UnaryFilter) return false; #undef DO_ } void StructuredQuery_UnaryFilter::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.UnaryFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; if (this->op() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 1, this->op(), output); } - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + // .google.firestore.v1.StructuredQuery.FieldReference field = 2; if (has_field()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, *operand_type_.field_, output); @@ -2154,23 +2151,23 @@ void StructuredQuery_UnaryFilter::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.UnaryFilter) } ::google::protobuf::uint8* StructuredQuery_UnaryFilter::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.UnaryFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; if (this->op() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 1, this->op(), target); } - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + // .google.firestore.v1.StructuredQuery.FieldReference field = 2; if (has_field()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -2181,12 +2178,12 @@ ::google::protobuf::uint8* StructuredQuery_UnaryFilter::InternalSerializeWithCac target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.UnaryFilter) return target; } size_t StructuredQuery_UnaryFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.UnaryFilter) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2194,14 +2191,14 @@ size_t StructuredQuery_UnaryFilter::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; if (this->op() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->op()); } switch (operand_type_case()) { - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + // .google.firestore.v1.StructuredQuery.FieldReference field = 2; case kField: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -2220,22 +2217,22 @@ size_t StructuredQuery_UnaryFilter::ByteSizeLong() const { } void StructuredQuery_UnaryFilter::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_UnaryFilter* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.UnaryFilter) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.UnaryFilter) MergeFrom(*source); } } void StructuredQuery_UnaryFilter::MergeFrom(const StructuredQuery_UnaryFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.UnaryFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2246,7 +2243,7 @@ void StructuredQuery_UnaryFilter::MergeFrom(const StructuredQuery_UnaryFilter& f } switch (from.operand_type_case()) { case kField: { - mutable_field()->::google::firestore::v1beta1::StructuredQuery_FieldReference::MergeFrom(from.field()); + mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field()); break; } case OPERAND_TYPE_NOT_SET: { @@ -2256,14 +2253,14 @@ void StructuredQuery_UnaryFilter::MergeFrom(const StructuredQuery_UnaryFilter& f } void StructuredQuery_UnaryFilter::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_UnaryFilter::CopyFrom(const StructuredQuery_UnaryFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.UnaryFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.UnaryFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -2287,16 +2284,16 @@ void StructuredQuery_UnaryFilter::InternalSwap(StructuredQuery_UnaryFilter* othe } ::google::protobuf::Metadata StructuredQuery_UnaryFilter::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StructuredQuery_Order::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_StructuredQuery_Order_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_FieldReference*>( - ::google::firestore::v1beta1::StructuredQuery_FieldReference::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_Order_default_instance_._instance.get_mutable()->field_ = const_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>( + ::google::firestore::v1::StructuredQuery_FieldReference::internal_default_instance()); } #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int StructuredQuery_Order::kFieldFieldNumber; @@ -2306,10 +2303,10 @@ const int StructuredQuery_Order::kDirectionFieldNumber; StructuredQuery_Order::StructuredQuery_Order() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Order) } StructuredQuery_Order::StructuredQuery_Order(const StructuredQuery_Order& from) : ::google::protobuf::Message(), @@ -2317,12 +2314,12 @@ StructuredQuery_Order::StructuredQuery_Order(const StructuredQuery_Order& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_field()) { - field_ = new ::google::firestore::v1beta1::StructuredQuery_FieldReference(*from.field_); + field_ = new ::google::firestore::v1::StructuredQuery_FieldReference(*from.field_); } else { field_ = NULL; } direction_ = from.direction_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Order) } void StructuredQuery_Order::SharedCtor() { @@ -2333,7 +2330,7 @@ void StructuredQuery_Order::SharedCtor() { } StructuredQuery_Order::~StructuredQuery_Order() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Order) SharedDtor(); } @@ -2347,12 +2344,12 @@ void StructuredQuery_Order::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_Order::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_Order& StructuredQuery_Order::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Order(); return *internal_default_instance(); } @@ -2365,7 +2362,7 @@ StructuredQuery_Order* StructuredQuery_Order::New(::google::protobuf::Arena* are } void StructuredQuery_Order::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Order) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2382,13 +2379,13 @@ bool StructuredQuery_Order::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Order) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -2400,7 +2397,7 @@ bool StructuredQuery_Order::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + // .google.firestore.v1.StructuredQuery.Direction direction = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { @@ -2408,7 +2405,7 @@ bool StructuredQuery_Order::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_direction(static_cast< ::google::firestore::v1beta1::StructuredQuery_Direction >(value)); + set_direction(static_cast< ::google::firestore::v1::StructuredQuery_Direction >(value)); } else { goto handle_unusual; } @@ -2427,27 +2424,27 @@ bool StructuredQuery_Order::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Order) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Order) return false; #undef DO_ } void StructuredQuery_Order::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Order) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->field_, output); } - // .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + // .google.firestore.v1.StructuredQuery.Direction direction = 2; if (this->direction() != 0) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 2, this->direction(), output); @@ -2457,24 +2454,24 @@ void StructuredQuery_Order::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Order) } ::google::protobuf::uint8* StructuredQuery_Order::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Order) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *this->field_, deterministic, target); } - // .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + // .google.firestore.v1.StructuredQuery.Direction direction = 2; if (this->direction() != 0) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 2, this->direction(), target); @@ -2484,12 +2481,12 @@ ::google::protobuf::uint8* StructuredQuery_Order::InternalSerializeWithCachedSiz target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Order) return target; } size_t StructuredQuery_Order::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Order) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2497,14 +2494,14 @@ size_t StructuredQuery_Order::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; if (this->has_field()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->field_); } - // .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + // .google.firestore.v1.StructuredQuery.Direction direction = 2; if (this->direction() != 0) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->direction()); @@ -2518,29 +2515,29 @@ size_t StructuredQuery_Order::ByteSizeLong() const { } void StructuredQuery_Order::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Order) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_Order* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Order) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Order) MergeFrom(*source); } } void StructuredQuery_Order::MergeFrom(const StructuredQuery_Order& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Order) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_field()) { - mutable_field()->::google::firestore::v1beta1::StructuredQuery_FieldReference::MergeFrom(from.field()); + mutable_field()->::google::firestore::v1::StructuredQuery_FieldReference::MergeFrom(from.field()); } if (from.direction() != 0) { set_direction(from.direction()); @@ -2548,14 +2545,14 @@ void StructuredQuery_Order::MergeFrom(const StructuredQuery_Order& from) { } void StructuredQuery_Order::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Order) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_Order::CopyFrom(const StructuredQuery_Order& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.Order) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Order) if (&from == this) return; Clear(); MergeFrom(from); @@ -2578,8 +2575,8 @@ void StructuredQuery_Order::InternalSwap(StructuredQuery_Order* other) { } ::google::protobuf::Metadata StructuredQuery_Order::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -2594,10 +2591,10 @@ const int StructuredQuery_FieldReference::kFieldPathFieldNumber; StructuredQuery_FieldReference::StructuredQuery_FieldReference() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.FieldReference) } StructuredQuery_FieldReference::StructuredQuery_FieldReference(const StructuredQuery_FieldReference& from) : ::google::protobuf::Message(), @@ -2608,7 +2605,7 @@ StructuredQuery_FieldReference::StructuredQuery_FieldReference(const StructuredQ if (from.field_path().size() > 0) { field_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.field_path_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.FieldReference) } void StructuredQuery_FieldReference::SharedCtor() { @@ -2617,7 +2614,7 @@ void StructuredQuery_FieldReference::SharedCtor() { } StructuredQuery_FieldReference::~StructuredQuery_FieldReference() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.FieldReference) SharedDtor(); } @@ -2631,12 +2628,12 @@ void StructuredQuery_FieldReference::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_FieldReference::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_FieldReference& StructuredQuery_FieldReference::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReference(); return *internal_default_instance(); } @@ -2649,7 +2646,7 @@ StructuredQuery_FieldReference* StructuredQuery_FieldReference::New(::google::pr } void StructuredQuery_FieldReference::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.FieldReference) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2662,7 +2659,7 @@ bool StructuredQuery_FieldReference::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.FieldReference) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -2677,7 +2674,7 @@ bool StructuredQuery_FieldReference::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.StructuredQuery.FieldReference.field_path")); + "google.firestore.v1.StructuredQuery.FieldReference.field_path")); } else { goto handle_unusual; } @@ -2696,17 +2693,17 @@ bool StructuredQuery_FieldReference::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.FieldReference) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.FieldReference) return false; #undef DO_ } void StructuredQuery_FieldReference::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.FieldReference) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2715,7 +2712,7 @@ void StructuredQuery_FieldReference::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.StructuredQuery.FieldReference.field_path"); + "google.firestore.v1.StructuredQuery.FieldReference.field_path"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->field_path(), output); } @@ -2724,13 +2721,13 @@ void StructuredQuery_FieldReference::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.FieldReference) } ::google::protobuf::uint8* StructuredQuery_FieldReference::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.FieldReference) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2739,7 +2736,7 @@ ::google::protobuf::uint8* StructuredQuery_FieldReference::InternalSerializeWith ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.StructuredQuery.FieldReference.field_path"); + "google.firestore.v1.StructuredQuery.FieldReference.field_path"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->field_path(), target); @@ -2749,12 +2746,12 @@ ::google::protobuf::uint8* StructuredQuery_FieldReference::InternalSerializeWith target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.FieldReference) return target; } size_t StructuredQuery_FieldReference::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.FieldReference) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2777,22 +2774,22 @@ size_t StructuredQuery_FieldReference::ByteSizeLong() const { } void StructuredQuery_FieldReference::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_FieldReference* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.FieldReference) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.FieldReference) MergeFrom(*source); } } void StructuredQuery_FieldReference::MergeFrom(const StructuredQuery_FieldReference& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.FieldReference) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2805,14 +2802,14 @@ void StructuredQuery_FieldReference::MergeFrom(const StructuredQuery_FieldRefere } void StructuredQuery_FieldReference::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_FieldReference::CopyFrom(const StructuredQuery_FieldReference& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.FieldReference) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.FieldReference) if (&from == this) return; Clear(); MergeFrom(from); @@ -2834,8 +2831,8 @@ void StructuredQuery_FieldReference::InternalSwap(StructuredQuery_FieldReference } ::google::protobuf::Metadata StructuredQuery_FieldReference::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -2850,10 +2847,10 @@ const int StructuredQuery_Projection::kFieldsFieldNumber; StructuredQuery_Projection::StructuredQuery_Projection() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery.Projection) } StructuredQuery_Projection::StructuredQuery_Projection(const StructuredQuery_Projection& from) : ::google::protobuf::Message(), @@ -2861,7 +2858,7 @@ StructuredQuery_Projection::StructuredQuery_Projection(const StructuredQuery_Pro fields_(from.fields_), _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery.Projection) } void StructuredQuery_Projection::SharedCtor() { @@ -2869,7 +2866,7 @@ void StructuredQuery_Projection::SharedCtor() { } StructuredQuery_Projection::~StructuredQuery_Projection() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery.Projection) SharedDtor(); } @@ -2882,12 +2879,12 @@ void StructuredQuery_Projection::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery_Projection::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery_Projection& StructuredQuery_Projection::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_Projection(); return *internal_default_instance(); } @@ -2900,7 +2897,7 @@ StructuredQuery_Projection* StructuredQuery_Projection::New(::google::protobuf:: } void StructuredQuery_Projection::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery.Projection) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2913,13 +2910,13 @@ bool StructuredQuery_Projection::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery.Projection) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -2942,21 +2939,21 @@ bool StructuredQuery_Projection::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery.Projection) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery.Projection) return false; #undef DO_ } void StructuredQuery_Projection::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery.Projection) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; for (unsigned int i = 0, n = static_cast(this->fields_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2967,17 +2964,17 @@ void StructuredQuery_Projection::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery.Projection) } ::google::protobuf::uint8* StructuredQuery_Projection::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery.Projection) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; for (unsigned int i = 0, n = static_cast(this->fields_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2989,12 +2986,12 @@ ::google::protobuf::uint8* StructuredQuery_Projection::InternalSerializeWithCach target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery.Projection) return target; } size_t StructuredQuery_Projection::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery.Projection) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3002,7 +2999,7 @@ size_t StructuredQuery_Projection::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; { unsigned int count = static_cast(this->fields_size()); total_size += 1UL * count; @@ -3021,22 +3018,22 @@ size_t StructuredQuery_Projection::ByteSizeLong() const { } void StructuredQuery_Projection::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery.Projection) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery_Projection* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery.Projection) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery.Projection) MergeFrom(*source); } } void StructuredQuery_Projection::MergeFrom(const StructuredQuery_Projection& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery.Projection) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3046,14 +3043,14 @@ void StructuredQuery_Projection::MergeFrom(const StructuredQuery_Projection& fro } void StructuredQuery_Projection::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery.Projection) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery_Projection::CopyFrom(const StructuredQuery_Projection& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery.Projection) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery.Projection) if (&from == this) return; Clear(); MergeFrom(from); @@ -3075,23 +3072,23 @@ void StructuredQuery_Projection::InternalSwap(StructuredQuery_Projection* other) } ::google::protobuf::Metadata StructuredQuery_Projection::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void StructuredQuery::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_StructuredQuery_default_instance_._instance.get_mutable()->select_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_Projection*>( - ::google::firestore::v1beta1::StructuredQuery_Projection::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_default_instance_._instance.get_mutable()->where_ = const_cast< ::google::firestore::v1beta1::StructuredQuery_Filter*>( - ::google::firestore::v1beta1::StructuredQuery_Filter::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_default_instance_._instance.get_mutable()->start_at_ = const_cast< ::google::firestore::v1beta1::Cursor*>( - ::google::firestore::v1beta1::Cursor::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_default_instance_._instance.get_mutable()->end_at_ = const_cast< ::google::firestore::v1beta1::Cursor*>( - ::google::firestore::v1beta1::Cursor::internal_default_instance()); - ::google::firestore::v1beta1::_StructuredQuery_default_instance_._instance.get_mutable()->limit_ = const_cast< ::google::protobuf::Int32Value*>( + ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->select_ = const_cast< ::google::firestore::v1::StructuredQuery_Projection*>( + ::google::firestore::v1::StructuredQuery_Projection::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->where_ = const_cast< ::google::firestore::v1::StructuredQuery_Filter*>( + ::google::firestore::v1::StructuredQuery_Filter::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->start_at_ = const_cast< ::google::firestore::v1::Cursor*>( + ::google::firestore::v1::Cursor::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->end_at_ = const_cast< ::google::firestore::v1::Cursor*>( + ::google::firestore::v1::Cursor::internal_default_instance()); + ::google::firestore::v1::_StructuredQuery_default_instance_._instance.get_mutable()->limit_ = const_cast< ::google::protobuf::Int32Value*>( ::google::protobuf::Int32Value::internal_default_instance()); } void StructuredQuery::clear_limit() { @@ -3114,10 +3111,10 @@ const int StructuredQuery::kLimitFieldNumber; StructuredQuery::StructuredQuery() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(constructor:google.firestore.v1.StructuredQuery) } StructuredQuery::StructuredQuery(const StructuredQuery& from) : ::google::protobuf::Message(), @@ -3127,12 +3124,12 @@ StructuredQuery::StructuredQuery(const StructuredQuery& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_select()) { - select_ = new ::google::firestore::v1beta1::StructuredQuery_Projection(*from.select_); + select_ = new ::google::firestore::v1::StructuredQuery_Projection(*from.select_); } else { select_ = NULL; } if (from.has_where()) { - where_ = new ::google::firestore::v1beta1::StructuredQuery_Filter(*from.where_); + where_ = new ::google::firestore::v1::StructuredQuery_Filter(*from.where_); } else { where_ = NULL; } @@ -3142,17 +3139,17 @@ StructuredQuery::StructuredQuery(const StructuredQuery& from) limit_ = NULL; } if (from.has_start_at()) { - start_at_ = new ::google::firestore::v1beta1::Cursor(*from.start_at_); + start_at_ = new ::google::firestore::v1::Cursor(*from.start_at_); } else { start_at_ = NULL; } if (from.has_end_at()) { - end_at_ = new ::google::firestore::v1beta1::Cursor(*from.end_at_); + end_at_ = new ::google::firestore::v1::Cursor(*from.end_at_); } else { end_at_ = NULL; } offset_ = from.offset_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.StructuredQuery) } void StructuredQuery::SharedCtor() { @@ -3163,7 +3160,7 @@ void StructuredQuery::SharedCtor() { } StructuredQuery::~StructuredQuery() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(destructor:google.firestore.v1.StructuredQuery) SharedDtor(); } @@ -3181,12 +3178,12 @@ void StructuredQuery::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* StructuredQuery::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const StructuredQuery& StructuredQuery::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery(); return *internal_default_instance(); } @@ -3199,7 +3196,7 @@ StructuredQuery* StructuredQuery::New(::google::protobuf::Arena* arena) const { } void StructuredQuery::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.StructuredQuery) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3234,13 +3231,13 @@ bool StructuredQuery::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(parse_start:google.firestore.v1.StructuredQuery) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.StructuredQuery.Projection select = 1; + // .google.firestore.v1.StructuredQuery.Projection select = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -3252,7 +3249,7 @@ bool StructuredQuery::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; + // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -3263,7 +3260,7 @@ bool StructuredQuery::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.StructuredQuery.Filter where = 3; + // .google.firestore.v1.StructuredQuery.Filter where = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -3275,7 +3272,7 @@ bool StructuredQuery::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; + // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -3312,7 +3309,7 @@ bool StructuredQuery::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Cursor start_at = 7; + // .google.firestore.v1.Cursor start_at = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -3324,7 +3321,7 @@ bool StructuredQuery::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Cursor end_at = 8; + // .google.firestore.v1.Cursor end_at = 8; case 8: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(66u /* 66 & 0xFF */)) { @@ -3348,40 +3345,40 @@ bool StructuredQuery::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(parse_success:google.firestore.v1.StructuredQuery) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.StructuredQuery) return false; #undef DO_ } void StructuredQuery::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.StructuredQuery) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.Projection select = 1; + // .google.firestore.v1.StructuredQuery.Projection select = 1; if (this->has_select()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->select_, output); } - // repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; + // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; for (unsigned int i = 0, n = static_cast(this->from_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 2, this->from(static_cast(i)), output); } - // .google.firestore.v1beta1.StructuredQuery.Filter where = 3; + // .google.firestore.v1.StructuredQuery.Filter where = 3; if (this->has_where()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->where_, output); } - // repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; + // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; for (unsigned int i = 0, n = static_cast(this->order_by_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -3399,13 +3396,13 @@ void StructuredQuery::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->offset(), output); } - // .google.firestore.v1beta1.Cursor start_at = 7; + // .google.firestore.v1.Cursor start_at = 7; if (this->has_start_at()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, *this->start_at_, output); } - // .google.firestore.v1beta1.Cursor end_at = 8; + // .google.firestore.v1.Cursor end_at = 8; if (this->has_end_at()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 8, *this->end_at_, output); @@ -3415,24 +3412,24 @@ void StructuredQuery::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.StructuredQuery) } ::google::protobuf::uint8* StructuredQuery::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.StructuredQuery) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.StructuredQuery.Projection select = 1; + // .google.firestore.v1.StructuredQuery.Projection select = 1; if (this->has_select()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 1, *this->select_, deterministic, target); } - // repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; + // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; for (unsigned int i = 0, n = static_cast(this->from_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -3440,14 +3437,14 @@ ::google::protobuf::uint8* StructuredQuery::InternalSerializeWithCachedSizesToAr 2, this->from(static_cast(i)), deterministic, target); } - // .google.firestore.v1beta1.StructuredQuery.Filter where = 3; + // .google.firestore.v1.StructuredQuery.Filter where = 3; if (this->has_where()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, *this->where_, deterministic, target); } - // repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; + // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; for (unsigned int i = 0, n = static_cast(this->order_by_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -3467,14 +3464,14 @@ ::google::protobuf::uint8* StructuredQuery::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->offset(), target); } - // .google.firestore.v1beta1.Cursor start_at = 7; + // .google.firestore.v1.Cursor start_at = 7; if (this->has_start_at()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 7, *this->start_at_, deterministic, target); } - // .google.firestore.v1beta1.Cursor end_at = 8; + // .google.firestore.v1.Cursor end_at = 8; if (this->has_end_at()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -3485,12 +3482,12 @@ ::google::protobuf::uint8* StructuredQuery::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.StructuredQuery) return target; } size_t StructuredQuery::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.StructuredQuery) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3498,7 +3495,7 @@ size_t StructuredQuery::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; + // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; { unsigned int count = static_cast(this->from_size()); total_size += 1UL * count; @@ -3509,7 +3506,7 @@ size_t StructuredQuery::ByteSizeLong() const { } } - // repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; + // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; { unsigned int count = static_cast(this->order_by_size()); total_size += 1UL * count; @@ -3520,14 +3517,14 @@ size_t StructuredQuery::ByteSizeLong() const { } } - // .google.firestore.v1beta1.StructuredQuery.Projection select = 1; + // .google.firestore.v1.StructuredQuery.Projection select = 1; if (this->has_select()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->select_); } - // .google.firestore.v1beta1.StructuredQuery.Filter where = 3; + // .google.firestore.v1.StructuredQuery.Filter where = 3; if (this->has_where()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -3541,14 +3538,14 @@ size_t StructuredQuery::ByteSizeLong() const { *this->limit_); } - // .google.firestore.v1beta1.Cursor start_at = 7; + // .google.firestore.v1.Cursor start_at = 7; if (this->has_start_at()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->start_at_); } - // .google.firestore.v1beta1.Cursor end_at = 8; + // .google.firestore.v1.Cursor end_at = 8; if (this->has_end_at()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -3570,22 +3567,22 @@ size_t StructuredQuery::ByteSizeLong() const { } void StructuredQuery::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.StructuredQuery) GOOGLE_DCHECK_NE(&from, this); const StructuredQuery* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.StructuredQuery) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.StructuredQuery) MergeFrom(*source); } } void StructuredQuery::MergeFrom(const StructuredQuery& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.StructuredQuery) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3594,19 +3591,19 @@ void StructuredQuery::MergeFrom(const StructuredQuery& from) { from_.MergeFrom(from.from_); order_by_.MergeFrom(from.order_by_); if (from.has_select()) { - mutable_select()->::google::firestore::v1beta1::StructuredQuery_Projection::MergeFrom(from.select()); + mutable_select()->::google::firestore::v1::StructuredQuery_Projection::MergeFrom(from.select()); } if (from.has_where()) { - mutable_where()->::google::firestore::v1beta1::StructuredQuery_Filter::MergeFrom(from.where()); + mutable_where()->::google::firestore::v1::StructuredQuery_Filter::MergeFrom(from.where()); } if (from.has_limit()) { mutable_limit()->::google::protobuf::Int32Value::MergeFrom(from.limit()); } if (from.has_start_at()) { - mutable_start_at()->::google::firestore::v1beta1::Cursor::MergeFrom(from.start_at()); + mutable_start_at()->::google::firestore::v1::Cursor::MergeFrom(from.start_at()); } if (from.has_end_at()) { - mutable_end_at()->::google::firestore::v1beta1::Cursor::MergeFrom(from.end_at()); + mutable_end_at()->::google::firestore::v1::Cursor::MergeFrom(from.end_at()); } if (from.offset() != 0) { set_offset(from.offset()); @@ -3614,14 +3611,14 @@ void StructuredQuery::MergeFrom(const StructuredQuery& from) { } void StructuredQuery::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.StructuredQuery) if (&from == this) return; Clear(); MergeFrom(from); } void StructuredQuery::CopyFrom(const StructuredQuery& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.StructuredQuery) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.StructuredQuery) if (&from == this) return; Clear(); MergeFrom(from); @@ -3650,8 +3647,8 @@ void StructuredQuery::InternalSwap(StructuredQuery* other) { } ::google::protobuf::Metadata StructuredQuery::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -3670,10 +3667,10 @@ const int Cursor::kBeforeFieldNumber; Cursor::Cursor() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsCursor(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(constructor:google.firestore.v1.Cursor) } Cursor::Cursor(const Cursor& from) : ::google::protobuf::Message(), @@ -3682,7 +3679,7 @@ Cursor::Cursor(const Cursor& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); before_ = from.before_; - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Cursor) } void Cursor::SharedCtor() { @@ -3691,7 +3688,7 @@ void Cursor::SharedCtor() { } Cursor::~Cursor() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(destructor:google.firestore.v1.Cursor) SharedDtor(); } @@ -3704,12 +3701,12 @@ void Cursor::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Cursor::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Cursor& Cursor::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsCursor(); + ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursor(); return *internal_default_instance(); } @@ -3722,7 +3719,7 @@ Cursor* Cursor::New(::google::protobuf::Arena* arena) const { } void Cursor::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Cursor) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3736,13 +3733,13 @@ bool Cursor::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Cursor) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -3779,21 +3776,21 @@ bool Cursor::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Cursor) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Cursor) return false; #undef DO_ } void Cursor::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Cursor) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -3809,17 +3806,17 @@ void Cursor::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Cursor) } ::google::protobuf::uint8* Cursor::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Cursor) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; for (unsigned int i = 0, n = static_cast(this->values_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -3836,12 +3833,12 @@ ::google::protobuf::uint8* Cursor::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Cursor) return target; } size_t Cursor::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Cursor) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3849,7 +3846,7 @@ size_t Cursor::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; { unsigned int count = static_cast(this->values_size()); total_size += 1UL * count; @@ -3873,22 +3870,22 @@ size_t Cursor::ByteSizeLong() const { } void Cursor::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Cursor) GOOGLE_DCHECK_NE(&from, this); const Cursor* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Cursor) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Cursor) MergeFrom(*source); } } void Cursor::MergeFrom(const Cursor& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Cursor) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3901,14 +3898,14 @@ void Cursor::MergeFrom(const Cursor& from) { } void Cursor::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Cursor) if (&from == this) return; Clear(); MergeFrom(from); } void Cursor::CopyFrom(const Cursor& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Cursor) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Cursor) if (&from == this) return; Clear(); MergeFrom(from); @@ -3931,13 +3928,13 @@ void Cursor::InternalSwap(Cursor* other) { } ::google::protobuf::Metadata Cursor::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fquery_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.h b/Firestore/Protos/cpp/google/firestore/v1/query.pb.h similarity index 69% rename from Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.h rename to Firestore/Protos/cpp/google/firestore/v1/query.pb.h index a4101a33bf8..47abc2e27a4 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/query.pb.h +++ b/Firestore/Protos/cpp/google/firestore/v1/query.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/query.proto +// source: google/firestore/v1/query.proto -#ifndef PROTOBUF_google_2ffirestore_2fv1beta1_2fquery_2eproto__INCLUDED -#define PROTOBUF_google_2ffirestore_2fv1beta1_2fquery_2eproto__INCLUDED +#ifndef PROTOBUF_google_2ffirestore_2fv1_2fquery_2eproto__INCLUDED +#define PROTOBUF_google_2ffirestore_2fv1_2fquery_2eproto__INCLUDED #include @@ -47,11 +47,11 @@ #include #include #include "google/api/annotations.pb.h" -#include "google/firestore/v1beta1/document.pb.h" +#include "google/firestore/v1/document.pb.h" #include // @@protoc_insertion_point(includes) -namespace protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fquery_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -91,10 +91,10 @@ inline void InitDefaults() { InitDefaultsStructuredQuery(); InitDefaultsCursor(); } -} // namespace protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2fquery_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class Cursor; class CursorDefaultTypeInternal; extern CursorDefaultTypeInternal _Cursor_default_instance_; @@ -125,12 +125,12 @@ extern StructuredQuery_ProjectionDefaultTypeInternal _StructuredQuery_Projection class StructuredQuery_UnaryFilter; class StructuredQuery_UnaryFilterDefaultTypeInternal; extern StructuredQuery_UnaryFilterDefaultTypeInternal _StructuredQuery_UnaryFilter_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { enum StructuredQuery_CompositeFilter_Operator { StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0, @@ -225,7 +225,7 @@ inline bool StructuredQuery_Direction_Parse( } // =================================================================== -class StructuredQuery_CollectionSelector : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.CollectionSelector) */ { +class StructuredQuery_CollectionSelector : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.CollectionSelector) */ { public: StructuredQuery_CollectionSelector(); virtual ~StructuredQuery_CollectionSelector(); @@ -327,19 +327,19 @@ class StructuredQuery_CollectionSelector : public ::google::protobuf::Message /* bool all_descendants() const; void set_all_descendants(bool value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.CollectionSelector) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.CollectionSelector) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr collection_id_; bool all_descendants_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelectorImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CollectionSelectorImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_Filter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.Filter) */ { +class StructuredQuery_Filter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.Filter) */ { public: StructuredQuery_Filter(); virtual ~StructuredQuery_Filter(); @@ -428,35 +428,35 @@ class StructuredQuery_Filter : public ::google::protobuf::Message /* @@protoc_in // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; bool has_composite_filter() const; void clear_composite_filter(); static const int kCompositeFilterFieldNumber = 1; - const ::google::firestore::v1beta1::StructuredQuery_CompositeFilter& composite_filter() const; - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* release_composite_filter(); - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* mutable_composite_filter(); - void set_allocated_composite_filter(::google::firestore::v1beta1::StructuredQuery_CompositeFilter* composite_filter); + const ::google::firestore::v1::StructuredQuery_CompositeFilter& composite_filter() const; + ::google::firestore::v1::StructuredQuery_CompositeFilter* release_composite_filter(); + ::google::firestore::v1::StructuredQuery_CompositeFilter* mutable_composite_filter(); + void set_allocated_composite_filter(::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter); - // .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; bool has_field_filter() const; void clear_field_filter(); static const int kFieldFilterFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery_FieldFilter& field_filter() const; - ::google::firestore::v1beta1::StructuredQuery_FieldFilter* release_field_filter(); - ::google::firestore::v1beta1::StructuredQuery_FieldFilter* mutable_field_filter(); - void set_allocated_field_filter(::google::firestore::v1beta1::StructuredQuery_FieldFilter* field_filter); + const ::google::firestore::v1::StructuredQuery_FieldFilter& field_filter() const; + ::google::firestore::v1::StructuredQuery_FieldFilter* release_field_filter(); + ::google::firestore::v1::StructuredQuery_FieldFilter* mutable_field_filter(); + void set_allocated_field_filter(::google::firestore::v1::StructuredQuery_FieldFilter* field_filter); - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; + // .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; bool has_unary_filter() const; void clear_unary_filter(); static const int kUnaryFilterFieldNumber = 3; - const ::google::firestore::v1beta1::StructuredQuery_UnaryFilter& unary_filter() const; - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* release_unary_filter(); - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* mutable_unary_filter(); - void set_allocated_unary_filter(::google::firestore::v1beta1::StructuredQuery_UnaryFilter* unary_filter); + const ::google::firestore::v1::StructuredQuery_UnaryFilter& unary_filter() const; + ::google::firestore::v1::StructuredQuery_UnaryFilter* release_unary_filter(); + ::google::firestore::v1::StructuredQuery_UnaryFilter* mutable_unary_filter(); + void set_allocated_unary_filter(::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter); FilterTypeCase filter_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Filter) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Filter) private: void set_has_composite_filter(); void set_has_field_filter(); @@ -469,19 +469,19 @@ class StructuredQuery_Filter : public ::google::protobuf::Message /* @@protoc_in ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; union FilterTypeUnion { FilterTypeUnion() {} - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* composite_filter_; - ::google::firestore::v1beta1::StructuredQuery_FieldFilter* field_filter_; - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* unary_filter_; + ::google::firestore::v1::StructuredQuery_CompositeFilter* composite_filter_; + ::google::firestore::v1::StructuredQuery_FieldFilter* field_filter_; + ::google::firestore::v1::StructuredQuery_UnaryFilter* unary_filter_; } filter_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilterImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilterImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_CompositeFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.CompositeFilter) */ { +class StructuredQuery_CompositeFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.CompositeFilter) */ { public: StructuredQuery_CompositeFilter(); virtual ~StructuredQuery_CompositeFilter(); @@ -589,37 +589,37 @@ class StructuredQuery_CompositeFilter : public ::google::protobuf::Message /* @@ // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; + // repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; int filters_size() const; void clear_filters(); static const int kFiltersFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery_Filter& filters(int index) const; - ::google::firestore::v1beta1::StructuredQuery_Filter* mutable_filters(int index); - ::google::firestore::v1beta1::StructuredQuery_Filter* add_filters(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Filter >* + const ::google::firestore::v1::StructuredQuery_Filter& filters(int index) const; + ::google::firestore::v1::StructuredQuery_Filter* mutable_filters(int index); + ::google::firestore::v1::StructuredQuery_Filter* add_filters(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >* mutable_filters(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Filter >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >& filters() const; - // .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; void clear_op(); static const int kOpFieldNumber = 1; - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator op() const; - void set_op(::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator value); + ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator op() const; + void set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.CompositeFilter) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.CompositeFilter) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Filter > filters_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter > filters_; int op_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilterImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_CompositeFilterImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_FieldFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.FieldFilter) */ { +class StructuredQuery_FieldFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.FieldFilter) */ { public: StructuredQuery_FieldFilter(); virtual ~StructuredQuery_FieldFilter(); @@ -737,44 +737,44 @@ class StructuredQuery_FieldFilter : public ::google::protobuf::Message /* @@prot // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; bool has_field() const; void clear_field(); static const int kFieldFieldNumber = 1; - const ::google::firestore::v1beta1::StructuredQuery_FieldReference& field() const; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* release_field(); - ::google::firestore::v1beta1::StructuredQuery_FieldReference* mutable_field(); - void set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field); + const ::google::firestore::v1::StructuredQuery_FieldReference& field() const; + ::google::firestore::v1::StructuredQuery_FieldReference* release_field(); + ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field(); + void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field); - // .google.firestore.v1beta1.Value value = 3; + // .google.firestore.v1.Value value = 3; bool has_value() const; void clear_value(); static const int kValueFieldNumber = 3; - const ::google::firestore::v1beta1::Value& value() const; - ::google::firestore::v1beta1::Value* release_value(); - ::google::firestore::v1beta1::Value* mutable_value(); - void set_allocated_value(::google::firestore::v1beta1::Value* value); + const ::google::firestore::v1::Value& value() const; + ::google::firestore::v1::Value* release_value(); + ::google::firestore::v1::Value* mutable_value(); + void set_allocated_value(::google::firestore::v1::Value* value); - // .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; + // .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; void clear_op(); static const int kOpFieldNumber = 2; - ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator op() const; - void set_op(::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator value); + ::google::firestore::v1::StructuredQuery_FieldFilter_Operator op() const; + void set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.FieldFilter) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldFilter) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* field_; - ::google::firestore::v1beta1::Value* value_; + ::google::firestore::v1::StructuredQuery_FieldReference* field_; + ::google::firestore::v1::Value* value_; int op_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilterImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldFilterImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_UnaryFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.UnaryFilter) */ { +class StructuredQuery_UnaryFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.UnaryFilter) */ { public: StructuredQuery_UnaryFilter(); virtual ~StructuredQuery_UnaryFilter(); @@ -889,23 +889,23 @@ class StructuredQuery_UnaryFilter : public ::google::protobuf::Message /* @@prot // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; + // .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; void clear_op(); static const int kOpFieldNumber = 1; - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator op() const; - void set_op(::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator value); + ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator op() const; + void set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value); - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; + // .google.firestore.v1.StructuredQuery.FieldReference field = 2; bool has_field() const; void clear_field(); static const int kFieldFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery_FieldReference& field() const; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* release_field(); - ::google::firestore::v1beta1::StructuredQuery_FieldReference* mutable_field(); - void set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field); + const ::google::firestore::v1::StructuredQuery_FieldReference& field() const; + ::google::firestore::v1::StructuredQuery_FieldReference* release_field(); + ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field(); + void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field); OperandTypeCase operand_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.UnaryFilter) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.UnaryFilter) private: void set_has_field(); @@ -917,17 +917,17 @@ class StructuredQuery_UnaryFilter : public ::google::protobuf::Message /* @@prot int op_; union OperandTypeUnion { OperandTypeUnion() {} - ::google::firestore::v1beta1::StructuredQuery_FieldReference* field_; + ::google::firestore::v1::StructuredQuery_FieldReference* field_; } operand_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilterImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_UnaryFilterImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_Order : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.Order) */ { +class StructuredQuery_Order : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.Order) */ { public: StructuredQuery_Order(); virtual ~StructuredQuery_Order(); @@ -1009,34 +1009,34 @@ class StructuredQuery_Order : public ::google::protobuf::Message /* @@protoc_ins // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; + // .google.firestore.v1.StructuredQuery.FieldReference field = 1; bool has_field() const; void clear_field(); static const int kFieldFieldNumber = 1; - const ::google::firestore::v1beta1::StructuredQuery_FieldReference& field() const; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* release_field(); - ::google::firestore::v1beta1::StructuredQuery_FieldReference* mutable_field(); - void set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field); + const ::google::firestore::v1::StructuredQuery_FieldReference& field() const; + ::google::firestore::v1::StructuredQuery_FieldReference* release_field(); + ::google::firestore::v1::StructuredQuery_FieldReference* mutable_field(); + void set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field); - // .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; + // .google.firestore.v1.StructuredQuery.Direction direction = 2; void clear_direction(); static const int kDirectionFieldNumber = 2; - ::google::firestore::v1beta1::StructuredQuery_Direction direction() const; - void set_direction(::google::firestore::v1beta1::StructuredQuery_Direction value); + ::google::firestore::v1::StructuredQuery_Direction direction() const; + void set_direction(::google::firestore::v1::StructuredQuery_Direction value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Order) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Order) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* field_; + ::google::firestore::v1::StructuredQuery_FieldReference* field_; int direction_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_OrderImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_OrderImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_FieldReference : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.FieldReference) */ { +class StructuredQuery_FieldReference : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.FieldReference) */ { public: StructuredQuery_FieldReference(); virtual ~StructuredQuery_FieldReference(); @@ -1132,18 +1132,18 @@ class StructuredQuery_FieldReference : public ::google::protobuf::Message /* @@p ::std::string* release_field_path(); void set_allocated_field_path(::std::string* field_path); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.FieldReference) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.FieldReference) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr field_path_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReferenceImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_FieldReferenceImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery_Projection : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery.Projection) */ { +class StructuredQuery_Projection : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery.Projection) */ { public: StructuredQuery_Projection(); virtual ~StructuredQuery_Projection(); @@ -1225,30 +1225,30 @@ class StructuredQuery_Projection : public ::google::protobuf::Message /* @@proto // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; + // repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; int fields_size() const; void clear_fields(); static const int kFieldsFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery_FieldReference& fields(int index) const; - ::google::firestore::v1beta1::StructuredQuery_FieldReference* mutable_fields(int index); - ::google::firestore::v1beta1::StructuredQuery_FieldReference* add_fields(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_FieldReference >* + const ::google::firestore::v1::StructuredQuery_FieldReference& fields(int index) const; + ::google::firestore::v1::StructuredQuery_FieldReference* mutable_fields(int index); + ::google::firestore::v1::StructuredQuery_FieldReference* add_fields(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >* mutable_fields(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_FieldReference >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >& fields() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery.Projection) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery.Projection) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_FieldReference > fields_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference > fields_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQuery_ProjectionImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQuery_ProjectionImpl(); }; // ------------------------------------------------------------------- -class StructuredQuery : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.StructuredQuery) */ { +class StructuredQuery : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.StructuredQuery) */ { public: StructuredQuery(); virtual ~StructuredQuery(); @@ -1367,47 +1367,47 @@ class StructuredQuery : public ::google::protobuf::Message /* @@protoc_insertion // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; + // repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; int from_size() const; void clear_from(); static const int kFromFieldNumber = 2; - const ::google::firestore::v1beta1::StructuredQuery_CollectionSelector& from(int index) const; - ::google::firestore::v1beta1::StructuredQuery_CollectionSelector* mutable_from(int index); - ::google::firestore::v1beta1::StructuredQuery_CollectionSelector* add_from(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_CollectionSelector >* + const ::google::firestore::v1::StructuredQuery_CollectionSelector& from(int index) const; + ::google::firestore::v1::StructuredQuery_CollectionSelector* mutable_from(int index); + ::google::firestore::v1::StructuredQuery_CollectionSelector* add_from(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >* mutable_from(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_CollectionSelector >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >& from() const; - // repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; + // repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; int order_by_size() const; void clear_order_by(); static const int kOrderByFieldNumber = 4; - const ::google::firestore::v1beta1::StructuredQuery_Order& order_by(int index) const; - ::google::firestore::v1beta1::StructuredQuery_Order* mutable_order_by(int index); - ::google::firestore::v1beta1::StructuredQuery_Order* add_order_by(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Order >* + const ::google::firestore::v1::StructuredQuery_Order& order_by(int index) const; + ::google::firestore::v1::StructuredQuery_Order* mutable_order_by(int index); + ::google::firestore::v1::StructuredQuery_Order* add_order_by(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >* mutable_order_by(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Order >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >& order_by() const; - // .google.firestore.v1beta1.StructuredQuery.Projection select = 1; + // .google.firestore.v1.StructuredQuery.Projection select = 1; bool has_select() const; void clear_select(); static const int kSelectFieldNumber = 1; - const ::google::firestore::v1beta1::StructuredQuery_Projection& select() const; - ::google::firestore::v1beta1::StructuredQuery_Projection* release_select(); - ::google::firestore::v1beta1::StructuredQuery_Projection* mutable_select(); - void set_allocated_select(::google::firestore::v1beta1::StructuredQuery_Projection* select); + const ::google::firestore::v1::StructuredQuery_Projection& select() const; + ::google::firestore::v1::StructuredQuery_Projection* release_select(); + ::google::firestore::v1::StructuredQuery_Projection* mutable_select(); + void set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* select); - // .google.firestore.v1beta1.StructuredQuery.Filter where = 3; + // .google.firestore.v1.StructuredQuery.Filter where = 3; bool has_where() const; void clear_where(); static const int kWhereFieldNumber = 3; - const ::google::firestore::v1beta1::StructuredQuery_Filter& where() const; - ::google::firestore::v1beta1::StructuredQuery_Filter* release_where(); - ::google::firestore::v1beta1::StructuredQuery_Filter* mutable_where(); - void set_allocated_where(::google::firestore::v1beta1::StructuredQuery_Filter* where); + const ::google::firestore::v1::StructuredQuery_Filter& where() const; + ::google::firestore::v1::StructuredQuery_Filter* release_where(); + ::google::firestore::v1::StructuredQuery_Filter* mutable_where(); + void set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* where); // .google.protobuf.Int32Value limit = 5; bool has_limit() const; @@ -1418,23 +1418,23 @@ class StructuredQuery : public ::google::protobuf::Message /* @@protoc_insertion ::google::protobuf::Int32Value* mutable_limit(); void set_allocated_limit(::google::protobuf::Int32Value* limit); - // .google.firestore.v1beta1.Cursor start_at = 7; + // .google.firestore.v1.Cursor start_at = 7; bool has_start_at() const; void clear_start_at(); static const int kStartAtFieldNumber = 7; - const ::google::firestore::v1beta1::Cursor& start_at() const; - ::google::firestore::v1beta1::Cursor* release_start_at(); - ::google::firestore::v1beta1::Cursor* mutable_start_at(); - void set_allocated_start_at(::google::firestore::v1beta1::Cursor* start_at); + const ::google::firestore::v1::Cursor& start_at() const; + ::google::firestore::v1::Cursor* release_start_at(); + ::google::firestore::v1::Cursor* mutable_start_at(); + void set_allocated_start_at(::google::firestore::v1::Cursor* start_at); - // .google.firestore.v1beta1.Cursor end_at = 8; + // .google.firestore.v1.Cursor end_at = 8; bool has_end_at() const; void clear_end_at(); static const int kEndAtFieldNumber = 8; - const ::google::firestore::v1beta1::Cursor& end_at() const; - ::google::firestore::v1beta1::Cursor* release_end_at(); - ::google::firestore::v1beta1::Cursor* mutable_end_at(); - void set_allocated_end_at(::google::firestore::v1beta1::Cursor* end_at); + const ::google::firestore::v1::Cursor& end_at() const; + ::google::firestore::v1::Cursor* release_end_at(); + ::google::firestore::v1::Cursor* mutable_end_at(); + void set_allocated_end_at(::google::firestore::v1::Cursor* end_at); // int32 offset = 6; void clear_offset(); @@ -1442,25 +1442,25 @@ class StructuredQuery : public ::google::protobuf::Message /* @@protoc_insertion ::google::protobuf::int32 offset() const; void set_offset(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.StructuredQuery) + // @@protoc_insertion_point(class_scope:google.firestore.v1.StructuredQuery) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_CollectionSelector > from_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Order > order_by_; - ::google::firestore::v1beta1::StructuredQuery_Projection* select_; - ::google::firestore::v1beta1::StructuredQuery_Filter* where_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector > from_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order > order_by_; + ::google::firestore::v1::StructuredQuery_Projection* select_; + ::google::firestore::v1::StructuredQuery_Filter* where_; ::google::protobuf::Int32Value* limit_; - ::google::firestore::v1beta1::Cursor* start_at_; - ::google::firestore::v1beta1::Cursor* end_at_; + ::google::firestore::v1::Cursor* start_at_; + ::google::firestore::v1::Cursor* end_at_; ::google::protobuf::int32 offset_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsStructuredQueryImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsStructuredQueryImpl(); }; // ------------------------------------------------------------------- -class Cursor : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Cursor) */ { +class Cursor : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Cursor) */ { public: Cursor(); virtual ~Cursor(); @@ -1542,16 +1542,16 @@ class Cursor : public ::google::protobuf::Message /* @@protoc_insertion_point(cl // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Value values = 1; + // repeated .google.firestore.v1.Value values = 1; int values_size() const; void clear_values(); static const int kValuesFieldNumber = 1; - const ::google::firestore::v1beta1::Value& values(int index) const; - ::google::firestore::v1beta1::Value* mutable_values(int index); - ::google::firestore::v1beta1::Value* add_values(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* + const ::google::firestore::v1::Value& values(int index) const; + ::google::firestore::v1::Value* mutable_values(int index); + ::google::firestore::v1::Value* add_values(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* mutable_values(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& values() const; // bool before = 2; @@ -1560,15 +1560,15 @@ class Cursor : public ::google::protobuf::Message /* @@protoc_insertion_point(cl bool before() const; void set_before(bool value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Cursor) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Cursor) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value > values_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value > values_; bool before_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fquery_2eproto::InitDefaultsCursorImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fquery_2eproto::InitDefaultsCursorImpl(); }; // =================================================================== @@ -1586,41 +1586,41 @@ inline void StructuredQuery_CollectionSelector::clear_collection_id() { collection_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& StructuredQuery_CollectionSelector::collection_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) return collection_id_.GetNoArena(); } inline void StructuredQuery_CollectionSelector::set_collection_id(const ::std::string& value) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) } #if LANG_CXX11 inline void StructuredQuery_CollectionSelector::set_collection_id(::std::string&& value) { collection_id_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) } #endif inline void StructuredQuery_CollectionSelector::set_collection_id(const char* value) { GOOGLE_DCHECK(value != NULL); collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) } inline void StructuredQuery_CollectionSelector::set_collection_id(const char* value, size_t size) { collection_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) } inline ::std::string* StructuredQuery_CollectionSelector::mutable_collection_id() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) return collection_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* StructuredQuery_CollectionSelector::release_collection_id() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) return collection_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1631,7 +1631,7 @@ inline void StructuredQuery_CollectionSelector::set_allocated_collection_id(::st } collection_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), collection_id); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.CollectionSelector.collection_id) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.CollectionSelector.collection_id) } // bool all_descendants = 3; @@ -1639,20 +1639,20 @@ inline void StructuredQuery_CollectionSelector::clear_all_descendants() { all_descendants_ = false; } inline bool StructuredQuery_CollectionSelector::all_descendants() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.CollectionSelector.all_descendants) + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CollectionSelector.all_descendants) return all_descendants_; } inline void StructuredQuery_CollectionSelector::set_all_descendants(bool value) { all_descendants_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.CollectionSelector.all_descendants) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CollectionSelector.all_descendants) } // ------------------------------------------------------------------- // StructuredQuery_Filter -// .google.firestore.v1beta1.StructuredQuery.CompositeFilter composite_filter = 1; +// .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; inline bool StructuredQuery_Filter::has_composite_filter() const { return filter_type_case() == kCompositeFilter; } @@ -1665,34 +1665,34 @@ inline void StructuredQuery_Filter::clear_composite_filter() { clear_has_filter_type(); } } -inline ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::release_composite_filter() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.Filter.composite_filter) +inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::release_composite_filter() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.composite_filter) if (has_composite_filter()) { clear_has_filter_type(); - ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* temp = filter_type_.composite_filter_; + ::google::firestore::v1::StructuredQuery_CompositeFilter* temp = filter_type_.composite_filter_; filter_type_.composite_filter_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery_CompositeFilter& StructuredQuery_Filter::composite_filter() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Filter.composite_filter) +inline const ::google::firestore::v1::StructuredQuery_CompositeFilter& StructuredQuery_Filter::composite_filter() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.composite_filter) return has_composite_filter() ? *filter_type_.composite_filter_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter*>(&::google::firestore::v1beta1::_StructuredQuery_CompositeFilter_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter*>(&::google::firestore::v1::_StructuredQuery_CompositeFilter_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::mutable_composite_filter() { +inline ::google::firestore::v1::StructuredQuery_CompositeFilter* StructuredQuery_Filter::mutable_composite_filter() { if (!has_composite_filter()) { clear_filter_type(); set_has_composite_filter(); - filter_type_.composite_filter_ = new ::google::firestore::v1beta1::StructuredQuery_CompositeFilter; + filter_type_.composite_filter_ = new ::google::firestore::v1::StructuredQuery_CompositeFilter; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.Filter.composite_filter) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.composite_filter) return filter_type_.composite_filter_; } -// .google.firestore.v1beta1.StructuredQuery.FieldFilter field_filter = 2; +// .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; inline bool StructuredQuery_Filter::has_field_filter() const { return filter_type_case() == kFieldFilter; } @@ -1705,34 +1705,34 @@ inline void StructuredQuery_Filter::clear_field_filter() { clear_has_filter_type(); } } -inline ::google::firestore::v1beta1::StructuredQuery_FieldFilter* StructuredQuery_Filter::release_field_filter() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.Filter.field_filter) +inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::release_field_filter() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.field_filter) if (has_field_filter()) { clear_has_filter_type(); - ::google::firestore::v1beta1::StructuredQuery_FieldFilter* temp = filter_type_.field_filter_; + ::google::firestore::v1::StructuredQuery_FieldFilter* temp = filter_type_.field_filter_; filter_type_.field_filter_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery_FieldFilter& StructuredQuery_Filter::field_filter() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Filter.field_filter) +inline const ::google::firestore::v1::StructuredQuery_FieldFilter& StructuredQuery_Filter::field_filter() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.field_filter) return has_field_filter() ? *filter_type_.field_filter_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery_FieldFilter*>(&::google::firestore::v1beta1::_StructuredQuery_FieldFilter_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery_FieldFilter*>(&::google::firestore::v1::_StructuredQuery_FieldFilter_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldFilter* StructuredQuery_Filter::mutable_field_filter() { +inline ::google::firestore::v1::StructuredQuery_FieldFilter* StructuredQuery_Filter::mutable_field_filter() { if (!has_field_filter()) { clear_filter_type(); set_has_field_filter(); - filter_type_.field_filter_ = new ::google::firestore::v1beta1::StructuredQuery_FieldFilter; + filter_type_.field_filter_ = new ::google::firestore::v1::StructuredQuery_FieldFilter; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.Filter.field_filter) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.field_filter) return filter_type_.field_filter_; } -// .google.firestore.v1beta1.StructuredQuery.UnaryFilter unary_filter = 3; +// .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; inline bool StructuredQuery_Filter::has_unary_filter() const { return filter_type_case() == kUnaryFilter; } @@ -1745,30 +1745,30 @@ inline void StructuredQuery_Filter::clear_unary_filter() { clear_has_filter_type(); } } -inline ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::release_unary_filter() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.Filter.unary_filter) +inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::release_unary_filter() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Filter.unary_filter) if (has_unary_filter()) { clear_has_filter_type(); - ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* temp = filter_type_.unary_filter_; + ::google::firestore::v1::StructuredQuery_UnaryFilter* temp = filter_type_.unary_filter_; filter_type_.unary_filter_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery_UnaryFilter& StructuredQuery_Filter::unary_filter() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Filter.unary_filter) +inline const ::google::firestore::v1::StructuredQuery_UnaryFilter& StructuredQuery_Filter::unary_filter() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Filter.unary_filter) return has_unary_filter() ? *filter_type_.unary_filter_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter*>(&::google::firestore::v1beta1::_StructuredQuery_UnaryFilter_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter*>(&::google::firestore::v1::_StructuredQuery_UnaryFilter_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::mutable_unary_filter() { +inline ::google::firestore::v1::StructuredQuery_UnaryFilter* StructuredQuery_Filter::mutable_unary_filter() { if (!has_unary_filter()) { clear_filter_type(); set_has_unary_filter(); - filter_type_.unary_filter_ = new ::google::firestore::v1beta1::StructuredQuery_UnaryFilter; + filter_type_.unary_filter_ = new ::google::firestore::v1::StructuredQuery_UnaryFilter; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.Filter.unary_filter) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Filter.unary_filter) return filter_type_.unary_filter_; } @@ -1785,47 +1785,47 @@ inline StructuredQuery_Filter::FilterTypeCase StructuredQuery_Filter::filter_typ // StructuredQuery_CompositeFilter -// .google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator op = 1; +// .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; inline void StructuredQuery_CompositeFilter::clear_op() { op_ = 0; } -inline ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::op() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.CompositeFilter.op) - return static_cast< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator >(op_); +inline ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator StructuredQuery_CompositeFilter::op() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CompositeFilter.op) + return static_cast< ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator >(op_); } -inline void StructuredQuery_CompositeFilter::set_op(::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator value) { +inline void StructuredQuery_CompositeFilter::set_op(::google::firestore::v1::StructuredQuery_CompositeFilter_Operator value) { op_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.CompositeFilter.op) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.CompositeFilter.op) } -// repeated .google.firestore.v1beta1.StructuredQuery.Filter filters = 2; +// repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; inline int StructuredQuery_CompositeFilter::filters_size() const { return filters_.size(); } inline void StructuredQuery_CompositeFilter::clear_filters() { filters_.Clear(); } -inline const ::google::firestore::v1beta1::StructuredQuery_Filter& StructuredQuery_CompositeFilter::filters(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters) +inline const ::google::firestore::v1::StructuredQuery_Filter& StructuredQuery_CompositeFilter::filters(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.CompositeFilter.filters) return filters_.Get(index); } -inline ::google::firestore::v1beta1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::mutable_filters(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters) +inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::mutable_filters(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.CompositeFilter.filters) return filters_.Mutable(index); } -inline ::google::firestore::v1beta1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::add_filters() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters) +inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery_CompositeFilter::add_filters() { + // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.CompositeFilter.filters) return filters_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Filter >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >* StructuredQuery_CompositeFilter::mutable_filters() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.CompositeFilter.filters) return &filters_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Filter >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Filter >& StructuredQuery_CompositeFilter::filters() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters) + // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.CompositeFilter.filters) return filters_; } @@ -1833,7 +1833,7 @@ StructuredQuery_CompositeFilter::filters() const { // StructuredQuery_FieldFilter -// .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; +// .google.firestore.v1.StructuredQuery.FieldReference field = 1; inline bool StructuredQuery_FieldFilter::has_field() const { return this != internal_default_instance() && field_ != NULL; } @@ -1843,28 +1843,28 @@ inline void StructuredQuery_FieldFilter::clear_field() { } field_ = NULL; } -inline const ::google::firestore::v1beta1::StructuredQuery_FieldReference& StructuredQuery_FieldFilter::field() const { - const ::google::firestore::v1beta1::StructuredQuery_FieldReference* p = field_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.FieldFilter.field) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_StructuredQuery_FieldReference_default_instance_); +inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_FieldFilter::field() const { + const ::google::firestore::v1::StructuredQuery_FieldReference* p = field_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.field) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::release_field() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.FieldFilter.field) +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::release_field() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldFilter.field) - ::google::firestore::v1beta1::StructuredQuery_FieldReference* temp = field_; + ::google::firestore::v1::StructuredQuery_FieldReference* temp = field_; field_ = NULL; return temp; } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::mutable_field() { +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_FieldFilter::mutable_field() { if (field_ == NULL) { - field_ = new ::google::firestore::v1beta1::StructuredQuery_FieldReference; + field_ = new ::google::firestore::v1::StructuredQuery_FieldReference; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.FieldFilter.field) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldFilter.field) return field_; } -inline void StructuredQuery_FieldFilter::set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field) { +inline void StructuredQuery_FieldFilter::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete field_; @@ -1880,49 +1880,49 @@ inline void StructuredQuery_FieldFilter::set_allocated_field(::google::firestore } field_ = field; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.FieldFilter.field) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.field) } -// .google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator op = 2; +// .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; inline void StructuredQuery_FieldFilter::clear_op() { op_ = 0; } -inline ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::op() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.FieldFilter.op) - return static_cast< ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator >(op_); +inline ::google::firestore::v1::StructuredQuery_FieldFilter_Operator StructuredQuery_FieldFilter::op() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.op) + return static_cast< ::google::firestore::v1::StructuredQuery_FieldFilter_Operator >(op_); } -inline void StructuredQuery_FieldFilter::set_op(::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator value) { +inline void StructuredQuery_FieldFilter::set_op(::google::firestore::v1::StructuredQuery_FieldFilter_Operator value) { op_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.FieldFilter.op) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.FieldFilter.op) } -// .google.firestore.v1beta1.Value value = 3; +// .google.firestore.v1.Value value = 3; inline bool StructuredQuery_FieldFilter::has_value() const { return this != internal_default_instance() && value_ != NULL; } -inline const ::google::firestore::v1beta1::Value& StructuredQuery_FieldFilter::value() const { - const ::google::firestore::v1beta1::Value* p = value_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.FieldFilter.value) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Value_default_instance_); +inline const ::google::firestore::v1::Value& StructuredQuery_FieldFilter::value() const { + const ::google::firestore::v1::Value* p = value_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldFilter.value) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Value_default_instance_); } -inline ::google::firestore::v1beta1::Value* StructuredQuery_FieldFilter::release_value() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.FieldFilter.value) +inline ::google::firestore::v1::Value* StructuredQuery_FieldFilter::release_value() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldFilter.value) - ::google::firestore::v1beta1::Value* temp = value_; + ::google::firestore::v1::Value* temp = value_; value_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Value* StructuredQuery_FieldFilter::mutable_value() { +inline ::google::firestore::v1::Value* StructuredQuery_FieldFilter::mutable_value() { if (value_ == NULL) { - value_ = new ::google::firestore::v1beta1::Value; + value_ = new ::google::firestore::v1::Value; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.FieldFilter.value) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldFilter.value) return value_; } -inline void StructuredQuery_FieldFilter::set_allocated_value(::google::firestore::v1beta1::Value* value) { +inline void StructuredQuery_FieldFilter::set_allocated_value(::google::firestore::v1::Value* value) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(value_); @@ -1938,28 +1938,28 @@ inline void StructuredQuery_FieldFilter::set_allocated_value(::google::firestore } value_ = value; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.FieldFilter.value) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldFilter.value) } // ------------------------------------------------------------------- // StructuredQuery_UnaryFilter -// .google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator op = 1; +// .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; inline void StructuredQuery_UnaryFilter::clear_op() { op_ = 0; } -inline ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::op() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.UnaryFilter.op) - return static_cast< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator >(op_); +inline ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator StructuredQuery_UnaryFilter::op() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.UnaryFilter.op) + return static_cast< ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator >(op_); } -inline void StructuredQuery_UnaryFilter::set_op(::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator value) { +inline void StructuredQuery_UnaryFilter::set_op(::google::firestore::v1::StructuredQuery_UnaryFilter_Operator value) { op_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.UnaryFilter.op) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.UnaryFilter.op) } -// .google.firestore.v1beta1.StructuredQuery.FieldReference field = 2; +// .google.firestore.v1.StructuredQuery.FieldReference field = 2; inline bool StructuredQuery_UnaryFilter::has_field() const { return operand_type_case() == kField; } @@ -1972,30 +1972,30 @@ inline void StructuredQuery_UnaryFilter::clear_field() { clear_has_operand_type(); } } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::release_field() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.UnaryFilter.field) +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::release_field() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.UnaryFilter.field) if (has_field()) { clear_has_operand_type(); - ::google::firestore::v1beta1::StructuredQuery_FieldReference* temp = operand_type_.field_; + ::google::firestore::v1::StructuredQuery_FieldReference* temp = operand_type_.field_; operand_type_.field_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::StructuredQuery_FieldReference& StructuredQuery_UnaryFilter::field() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.UnaryFilter.field) +inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_UnaryFilter::field() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.UnaryFilter.field) return has_field() ? *operand_type_.field_ - : *reinterpret_cast< ::google::firestore::v1beta1::StructuredQuery_FieldReference*>(&::google::firestore::v1beta1::_StructuredQuery_FieldReference_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::StructuredQuery_FieldReference*>(&::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::mutable_field() { +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_UnaryFilter::mutable_field() { if (!has_field()) { clear_operand_type(); set_has_field(); - operand_type_.field_ = new ::google::firestore::v1beta1::StructuredQuery_FieldReference; + operand_type_.field_ = new ::google::firestore::v1::StructuredQuery_FieldReference; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.UnaryFilter.field) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.UnaryFilter.field) return operand_type_.field_; } @@ -2012,7 +2012,7 @@ inline StructuredQuery_UnaryFilter::OperandTypeCase StructuredQuery_UnaryFilter: // StructuredQuery_Order -// .google.firestore.v1beta1.StructuredQuery.FieldReference field = 1; +// .google.firestore.v1.StructuredQuery.FieldReference field = 1; inline bool StructuredQuery_Order::has_field() const { return this != internal_default_instance() && field_ != NULL; } @@ -2022,28 +2022,28 @@ inline void StructuredQuery_Order::clear_field() { } field_ = NULL; } -inline const ::google::firestore::v1beta1::StructuredQuery_FieldReference& StructuredQuery_Order::field() const { - const ::google::firestore::v1beta1::StructuredQuery_FieldReference* p = field_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Order.field) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_StructuredQuery_FieldReference_default_instance_); +inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_Order::field() const { + const ::google::firestore::v1::StructuredQuery_FieldReference* p = field_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Order.field) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_StructuredQuery_FieldReference_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_Order::release_field() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.Order.field) +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::release_field() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.Order.field) - ::google::firestore::v1beta1::StructuredQuery_FieldReference* temp = field_; + ::google::firestore::v1::StructuredQuery_FieldReference* temp = field_; field_ = NULL; return temp; } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_Order::mutable_field() { +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Order::mutable_field() { if (field_ == NULL) { - field_ = new ::google::firestore::v1beta1::StructuredQuery_FieldReference; + field_ = new ::google::firestore::v1::StructuredQuery_FieldReference; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.Order.field) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Order.field) return field_; } -inline void StructuredQuery_Order::set_allocated_field(::google::firestore::v1beta1::StructuredQuery_FieldReference* field) { +inline void StructuredQuery_Order::set_allocated_field(::google::firestore::v1::StructuredQuery_FieldReference* field) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete field_; @@ -2059,21 +2059,21 @@ inline void StructuredQuery_Order::set_allocated_field(::google::firestore::v1be } field_ = field; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.Order.field) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.Order.field) } -// .google.firestore.v1beta1.StructuredQuery.Direction direction = 2; +// .google.firestore.v1.StructuredQuery.Direction direction = 2; inline void StructuredQuery_Order::clear_direction() { direction_ = 0; } -inline ::google::firestore::v1beta1::StructuredQuery_Direction StructuredQuery_Order::direction() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Order.direction) - return static_cast< ::google::firestore::v1beta1::StructuredQuery_Direction >(direction_); +inline ::google::firestore::v1::StructuredQuery_Direction StructuredQuery_Order::direction() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Order.direction) + return static_cast< ::google::firestore::v1::StructuredQuery_Direction >(direction_); } -inline void StructuredQuery_Order::set_direction(::google::firestore::v1beta1::StructuredQuery_Direction value) { +inline void StructuredQuery_Order::set_direction(::google::firestore::v1::StructuredQuery_Direction value) { direction_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.Order.direction) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.Order.direction) } // ------------------------------------------------------------------- @@ -2085,41 +2085,41 @@ inline void StructuredQuery_FieldReference::clear_field_path() { field_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& StructuredQuery_FieldReference::field_path() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.FieldReference.field_path) return field_path_.GetNoArena(); } inline void StructuredQuery_FieldReference::set_field_path(const ::std::string& value) { field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.FieldReference.field_path) } #if LANG_CXX11 inline void StructuredQuery_FieldReference::set_field_path(::std::string&& value) { field_path_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.StructuredQuery.FieldReference.field_path) } #endif inline void StructuredQuery_FieldReference::set_field_path(const char* value) { GOOGLE_DCHECK(value != NULL); field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.StructuredQuery.FieldReference.field_path) } inline void StructuredQuery_FieldReference::set_field_path(const char* value, size_t size) { field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.StructuredQuery.FieldReference.field_path) } inline ::std::string* StructuredQuery_FieldReference::mutable_field_path() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.FieldReference.field_path) return field_path_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* StructuredQuery_FieldReference::release_field_path() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.FieldReference.field_path) return field_path_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -2130,40 +2130,40 @@ inline void StructuredQuery_FieldReference::set_allocated_field_path(::std::stri } field_path_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field_path); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.FieldReference.field_path) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.FieldReference.field_path) } // ------------------------------------------------------------------- // StructuredQuery_Projection -// repeated .google.firestore.v1beta1.StructuredQuery.FieldReference fields = 2; +// repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; inline int StructuredQuery_Projection::fields_size() const { return fields_.size(); } inline void StructuredQuery_Projection::clear_fields() { fields_.Clear(); } -inline const ::google::firestore::v1beta1::StructuredQuery_FieldReference& StructuredQuery_Projection::fields(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.Projection.fields) +inline const ::google::firestore::v1::StructuredQuery_FieldReference& StructuredQuery_Projection::fields(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.Projection.fields) return fields_.Get(index); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_Projection::mutable_fields(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.Projection.fields) +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Projection::mutable_fields(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.Projection.fields) return fields_.Mutable(index); } -inline ::google::firestore::v1beta1::StructuredQuery_FieldReference* StructuredQuery_Projection::add_fields() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.StructuredQuery.Projection.fields) +inline ::google::firestore::v1::StructuredQuery_FieldReference* StructuredQuery_Projection::add_fields() { + // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.Projection.fields) return fields_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_FieldReference >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >* StructuredQuery_Projection::mutable_fields() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.StructuredQuery.Projection.fields) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.Projection.fields) return &fields_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_FieldReference >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_FieldReference >& StructuredQuery_Projection::fields() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.StructuredQuery.Projection.fields) + // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.Projection.fields) return fields_; } @@ -2171,7 +2171,7 @@ StructuredQuery_Projection::fields() const { // StructuredQuery -// .google.firestore.v1beta1.StructuredQuery.Projection select = 1; +// .google.firestore.v1.StructuredQuery.Projection select = 1; inline bool StructuredQuery::has_select() const { return this != internal_default_instance() && select_ != NULL; } @@ -2181,28 +2181,28 @@ inline void StructuredQuery::clear_select() { } select_ = NULL; } -inline const ::google::firestore::v1beta1::StructuredQuery_Projection& StructuredQuery::select() const { - const ::google::firestore::v1beta1::StructuredQuery_Projection* p = select_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.select) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_StructuredQuery_Projection_default_instance_); +inline const ::google::firestore::v1::StructuredQuery_Projection& StructuredQuery::select() const { + const ::google::firestore::v1::StructuredQuery_Projection* p = select_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.select) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_StructuredQuery_Projection_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_Projection* StructuredQuery::release_select() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.select) +inline ::google::firestore::v1::StructuredQuery_Projection* StructuredQuery::release_select() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.select) - ::google::firestore::v1beta1::StructuredQuery_Projection* temp = select_; + ::google::firestore::v1::StructuredQuery_Projection* temp = select_; select_ = NULL; return temp; } -inline ::google::firestore::v1beta1::StructuredQuery_Projection* StructuredQuery::mutable_select() { +inline ::google::firestore::v1::StructuredQuery_Projection* StructuredQuery::mutable_select() { if (select_ == NULL) { - select_ = new ::google::firestore::v1beta1::StructuredQuery_Projection; + select_ = new ::google::firestore::v1::StructuredQuery_Projection; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.select) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.select) return select_; } -inline void StructuredQuery::set_allocated_select(::google::firestore::v1beta1::StructuredQuery_Projection* select) { +inline void StructuredQuery::set_allocated_select(::google::firestore::v1::StructuredQuery_Projection* select) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete select_; @@ -2218,40 +2218,40 @@ inline void StructuredQuery::set_allocated_select(::google::firestore::v1beta1:: } select_ = select; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.select) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.select) } -// repeated .google.firestore.v1beta1.StructuredQuery.CollectionSelector from = 2; +// repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; inline int StructuredQuery::from_size() const { return from_.size(); } inline void StructuredQuery::clear_from() { from_.Clear(); } -inline const ::google::firestore::v1beta1::StructuredQuery_CollectionSelector& StructuredQuery::from(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.from) +inline const ::google::firestore::v1::StructuredQuery_CollectionSelector& StructuredQuery::from(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.from) return from_.Get(index); } -inline ::google::firestore::v1beta1::StructuredQuery_CollectionSelector* StructuredQuery::mutable_from(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.from) +inline ::google::firestore::v1::StructuredQuery_CollectionSelector* StructuredQuery::mutable_from(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.from) return from_.Mutable(index); } -inline ::google::firestore::v1beta1::StructuredQuery_CollectionSelector* StructuredQuery::add_from() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.StructuredQuery.from) +inline ::google::firestore::v1::StructuredQuery_CollectionSelector* StructuredQuery::add_from() { + // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.from) return from_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_CollectionSelector >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >* StructuredQuery::mutable_from() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.StructuredQuery.from) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.from) return &from_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_CollectionSelector >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_CollectionSelector >& StructuredQuery::from() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.StructuredQuery.from) + // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.from) return from_; } -// .google.firestore.v1beta1.StructuredQuery.Filter where = 3; +// .google.firestore.v1.StructuredQuery.Filter where = 3; inline bool StructuredQuery::has_where() const { return this != internal_default_instance() && where_ != NULL; } @@ -2261,28 +2261,28 @@ inline void StructuredQuery::clear_where() { } where_ = NULL; } -inline const ::google::firestore::v1beta1::StructuredQuery_Filter& StructuredQuery::where() const { - const ::google::firestore::v1beta1::StructuredQuery_Filter* p = where_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.where) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_StructuredQuery_Filter_default_instance_); +inline const ::google::firestore::v1::StructuredQuery_Filter& StructuredQuery::where() const { + const ::google::firestore::v1::StructuredQuery_Filter* p = where_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.where) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_StructuredQuery_Filter_default_instance_); } -inline ::google::firestore::v1beta1::StructuredQuery_Filter* StructuredQuery::release_where() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.where) +inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery::release_where() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.where) - ::google::firestore::v1beta1::StructuredQuery_Filter* temp = where_; + ::google::firestore::v1::StructuredQuery_Filter* temp = where_; where_ = NULL; return temp; } -inline ::google::firestore::v1beta1::StructuredQuery_Filter* StructuredQuery::mutable_where() { +inline ::google::firestore::v1::StructuredQuery_Filter* StructuredQuery::mutable_where() { if (where_ == NULL) { - where_ = new ::google::firestore::v1beta1::StructuredQuery_Filter; + where_ = new ::google::firestore::v1::StructuredQuery_Filter; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.where) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.where) return where_; } -inline void StructuredQuery::set_allocated_where(::google::firestore::v1beta1::StructuredQuery_Filter* where) { +inline void StructuredQuery::set_allocated_where(::google::firestore::v1::StructuredQuery_Filter* where) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete where_; @@ -2298,40 +2298,40 @@ inline void StructuredQuery::set_allocated_where(::google::firestore::v1beta1::S } where_ = where; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.where) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.where) } -// repeated .google.firestore.v1beta1.StructuredQuery.Order order_by = 4; +// repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; inline int StructuredQuery::order_by_size() const { return order_by_.size(); } inline void StructuredQuery::clear_order_by() { order_by_.Clear(); } -inline const ::google::firestore::v1beta1::StructuredQuery_Order& StructuredQuery::order_by(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.order_by) +inline const ::google::firestore::v1::StructuredQuery_Order& StructuredQuery::order_by(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.order_by) return order_by_.Get(index); } -inline ::google::firestore::v1beta1::StructuredQuery_Order* StructuredQuery::mutable_order_by(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.order_by) +inline ::google::firestore::v1::StructuredQuery_Order* StructuredQuery::mutable_order_by(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.order_by) return order_by_.Mutable(index); } -inline ::google::firestore::v1beta1::StructuredQuery_Order* StructuredQuery::add_order_by() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.StructuredQuery.order_by) +inline ::google::firestore::v1::StructuredQuery_Order* StructuredQuery::add_order_by() { + // @@protoc_insertion_point(field_add:google.firestore.v1.StructuredQuery.order_by) return order_by_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Order >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >* StructuredQuery::mutable_order_by() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.StructuredQuery.order_by) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.StructuredQuery.order_by) return &order_by_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::StructuredQuery_Order >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::StructuredQuery_Order >& StructuredQuery::order_by() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.StructuredQuery.order_by) + // @@protoc_insertion_point(field_list:google.firestore.v1.StructuredQuery.order_by) return order_by_; } -// .google.firestore.v1beta1.Cursor start_at = 7; +// .google.firestore.v1.Cursor start_at = 7; inline bool StructuredQuery::has_start_at() const { return this != internal_default_instance() && start_at_ != NULL; } @@ -2341,28 +2341,28 @@ inline void StructuredQuery::clear_start_at() { } start_at_ = NULL; } -inline const ::google::firestore::v1beta1::Cursor& StructuredQuery::start_at() const { - const ::google::firestore::v1beta1::Cursor* p = start_at_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.start_at) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Cursor_default_instance_); +inline const ::google::firestore::v1::Cursor& StructuredQuery::start_at() const { + const ::google::firestore::v1::Cursor* p = start_at_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.start_at) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Cursor_default_instance_); } -inline ::google::firestore::v1beta1::Cursor* StructuredQuery::release_start_at() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.start_at) +inline ::google::firestore::v1::Cursor* StructuredQuery::release_start_at() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.start_at) - ::google::firestore::v1beta1::Cursor* temp = start_at_; + ::google::firestore::v1::Cursor* temp = start_at_; start_at_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Cursor* StructuredQuery::mutable_start_at() { +inline ::google::firestore::v1::Cursor* StructuredQuery::mutable_start_at() { if (start_at_ == NULL) { - start_at_ = new ::google::firestore::v1beta1::Cursor; + start_at_ = new ::google::firestore::v1::Cursor; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.start_at) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.start_at) return start_at_; } -inline void StructuredQuery::set_allocated_start_at(::google::firestore::v1beta1::Cursor* start_at) { +inline void StructuredQuery::set_allocated_start_at(::google::firestore::v1::Cursor* start_at) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete start_at_; @@ -2378,10 +2378,10 @@ inline void StructuredQuery::set_allocated_start_at(::google::firestore::v1beta1 } start_at_ = start_at; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.start_at) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.start_at) } -// .google.firestore.v1beta1.Cursor end_at = 8; +// .google.firestore.v1.Cursor end_at = 8; inline bool StructuredQuery::has_end_at() const { return this != internal_default_instance() && end_at_ != NULL; } @@ -2391,28 +2391,28 @@ inline void StructuredQuery::clear_end_at() { } end_at_ = NULL; } -inline const ::google::firestore::v1beta1::Cursor& StructuredQuery::end_at() const { - const ::google::firestore::v1beta1::Cursor* p = end_at_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.end_at) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Cursor_default_instance_); +inline const ::google::firestore::v1::Cursor& StructuredQuery::end_at() const { + const ::google::firestore::v1::Cursor* p = end_at_; + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.end_at) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Cursor_default_instance_); } -inline ::google::firestore::v1beta1::Cursor* StructuredQuery::release_end_at() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.end_at) +inline ::google::firestore::v1::Cursor* StructuredQuery::release_end_at() { + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.end_at) - ::google::firestore::v1beta1::Cursor* temp = end_at_; + ::google::firestore::v1::Cursor* temp = end_at_; end_at_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Cursor* StructuredQuery::mutable_end_at() { +inline ::google::firestore::v1::Cursor* StructuredQuery::mutable_end_at() { if (end_at_ == NULL) { - end_at_ = new ::google::firestore::v1beta1::Cursor; + end_at_ = new ::google::firestore::v1::Cursor; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.end_at) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.end_at) return end_at_; } -inline void StructuredQuery::set_allocated_end_at(::google::firestore::v1beta1::Cursor* end_at) { +inline void StructuredQuery::set_allocated_end_at(::google::firestore::v1::Cursor* end_at) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete end_at_; @@ -2428,7 +2428,7 @@ inline void StructuredQuery::set_allocated_end_at(::google::firestore::v1beta1:: } end_at_ = end_at; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.end_at) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.end_at) } // int32 offset = 6; @@ -2436,13 +2436,13 @@ inline void StructuredQuery::clear_offset() { offset_ = 0; } inline ::google::protobuf::int32 StructuredQuery::offset() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.offset) + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.offset) return offset_; } inline void StructuredQuery::set_offset(::google::protobuf::int32 value) { offset_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.StructuredQuery.offset) + // @@protoc_insertion_point(field_set:google.firestore.v1.StructuredQuery.offset) } // .google.protobuf.Int32Value limit = 5; @@ -2451,12 +2451,12 @@ inline bool StructuredQuery::has_limit() const { } inline const ::google::protobuf::Int32Value& StructuredQuery::limit() const { const ::google::protobuf::Int32Value* p = limit_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.StructuredQuery.limit) + // @@protoc_insertion_point(field_get:google.firestore.v1.StructuredQuery.limit) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Int32Value_default_instance_); } inline ::google::protobuf::Int32Value* StructuredQuery::release_limit() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.StructuredQuery.limit) + // @@protoc_insertion_point(field_release:google.firestore.v1.StructuredQuery.limit) ::google::protobuf::Int32Value* temp = limit_; limit_ = NULL; @@ -2467,7 +2467,7 @@ inline ::google::protobuf::Int32Value* StructuredQuery::mutable_limit() { if (limit_ == NULL) { limit_ = new ::google::protobuf::Int32Value; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.StructuredQuery.limit) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.StructuredQuery.limit) return limit_; } inline void StructuredQuery::set_allocated_limit(::google::protobuf::Int32Value* limit) { @@ -2487,37 +2487,37 @@ inline void StructuredQuery::set_allocated_limit(::google::protobuf::Int32Value* } limit_ = limit; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.StructuredQuery.limit) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.StructuredQuery.limit) } // ------------------------------------------------------------------- // Cursor -// repeated .google.firestore.v1beta1.Value values = 1; +// repeated .google.firestore.v1.Value values = 1; inline int Cursor::values_size() const { return values_.size(); } -inline const ::google::firestore::v1beta1::Value& Cursor::values(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Cursor.values) +inline const ::google::firestore::v1::Value& Cursor::values(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Cursor.values) return values_.Get(index); } -inline ::google::firestore::v1beta1::Value* Cursor::mutable_values(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Cursor.values) +inline ::google::firestore::v1::Value* Cursor::mutable_values(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Cursor.values) return values_.Mutable(index); } -inline ::google::firestore::v1beta1::Value* Cursor::add_values() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.Cursor.values) +inline ::google::firestore::v1::Value* Cursor::add_values() { + // @@protoc_insertion_point(field_add:google.firestore.v1.Cursor.values) return values_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* Cursor::mutable_values() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.Cursor.values) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.Cursor.values) return &values_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& Cursor::values() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.Cursor.values) + // @@protoc_insertion_point(field_list:google.firestore.v1.Cursor.values) return values_; } @@ -2526,13 +2526,13 @@ inline void Cursor::clear_before() { before_ = false; } inline bool Cursor::before() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Cursor.before) + // @@protoc_insertion_point(field_get:google.firestore.v1.Cursor.before) return before_; } inline void Cursor::set_before(bool value) { before_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Cursor.before) + // @@protoc_insertion_point(field_set:google.firestore.v1.Cursor.before) } #ifdef __GNUC__ @@ -2559,32 +2559,32 @@ inline void Cursor::set_before(bool value) { // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace protobuf { -template <> struct is_proto_enum< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator>() { - return ::google::firestore::v1beta1::StructuredQuery_CompositeFilter_Operator_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator>() { + return ::google::firestore::v1::StructuredQuery_CompositeFilter_Operator_descriptor(); } -template <> struct is_proto_enum< ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::StructuredQuery_FieldFilter_Operator> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator>() { - return ::google::firestore::v1beta1::StructuredQuery_FieldFilter_Operator_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::StructuredQuery_FieldFilter_Operator>() { + return ::google::firestore::v1::StructuredQuery_FieldFilter_Operator_descriptor(); } -template <> struct is_proto_enum< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator>() { - return ::google::firestore::v1beta1::StructuredQuery_UnaryFilter_Operator_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator>() { + return ::google::firestore::v1::StructuredQuery_UnaryFilter_Operator_descriptor(); } -template <> struct is_proto_enum< ::google::firestore::v1beta1::StructuredQuery_Direction> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::StructuredQuery_Direction> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::StructuredQuery_Direction>() { - return ::google::firestore::v1beta1::StructuredQuery_Direction_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::StructuredQuery_Direction>() { + return ::google::firestore::v1::StructuredQuery_Direction_descriptor(); } } // namespace protobuf @@ -2592,4 +2592,4 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::St // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2ffirestore_2fv1beta1_2fquery_2eproto__INCLUDED +#endif // PROTOBUF_google_2ffirestore_2fv1_2fquery_2eproto__INCLUDED diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.cc b/Firestore/Protos/cpp/google/firestore/v1/write.pb.cc similarity index 76% rename from Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.cc rename to Firestore/Protos/cpp/google/firestore/v1/write.pb.cc index 06f2d8e34f2..43fa16dc272 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.cc +++ b/Firestore/Protos/cpp/google/firestore/v1/write.pb.cc @@ -15,9 +15,9 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/write.proto +// source: google/firestore/v1/write.proto -#include "google/firestore/v1beta1/write.pb.h" +#include "google/firestore/v1/write.pb.h" #include @@ -37,23 +37,25 @@ // @@protoc_insertion_point(includes) namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class WriteDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; - const ::google::firestore::v1beta1::Document* update_; + const ::google::firestore::v1::Document* update_; ::google::protobuf::internal::ArenaStringPtr delete__; - const ::google::firestore::v1beta1::DocumentTransform* transform_; + const ::google::firestore::v1::DocumentTransform* transform_; } _Write_default_instance_; class DocumentTransform_FieldTransformDefaultTypeInternal { public: ::google::protobuf::internal::ExplicitlyConstructed _instance; int set_to_server_value_; - const ::google::firestore::v1beta1::Value* numeric_add_; - const ::google::firestore::v1beta1::ArrayValue* append_missing_elements_; - const ::google::firestore::v1beta1::ArrayValue* remove_all_from_array_; + const ::google::firestore::v1::Value* increment_; + const ::google::firestore::v1::Value* maximum_; + const ::google::firestore::v1::Value* minimum_; + const ::google::firestore::v1::ArrayValue* append_missing_elements_; + const ::google::firestore::v1::ArrayValue* remove_all_from_array_; } _DocumentTransform_FieldTransform_default_instance_; class DocumentTransformDefaultTypeInternal { public: @@ -85,10 +87,10 @@ class ExistenceFilterDefaultTypeInternal { ::google::protobuf::internal::ExplicitlyConstructed _instance; } _ExistenceFilter_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google -namespace protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fwrite_2eproto { void InitDefaultsWriteImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; @@ -97,16 +99,16 @@ void InitDefaultsWriteImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsDocumentMask(); - protobuf_google_2ffirestore_2fv1beta1_2fcommon_2eproto::InitDefaultsPrecondition(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsDocumentMask(); + protobuf_google_2ffirestore_2fv1_2fcommon_2eproto::InitDefaultsPrecondition(); { - void* ptr = &::google::firestore::v1beta1::_Write_default_instance_; - new (ptr) ::google::firestore::v1beta1::Write(); + void* ptr = &::google::firestore::v1::_Write_default_instance_; + new (ptr) ::google::firestore::v1::Write(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::Write::InitAsDefaultInstance(); + ::google::firestore::v1::Write::InitAsDefaultInstance(); } void InitDefaultsWrite() { @@ -122,13 +124,13 @@ void InitDefaultsDocumentTransform_FieldTransformImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); { - void* ptr = &::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentTransform_FieldTransform(); + void* ptr = &::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_; + new (ptr) ::google::firestore::v1::DocumentTransform_FieldTransform(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentTransform_FieldTransform::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentTransform_FieldTransform::InitAsDefaultInstance(); } void InitDefaultsDocumentTransform_FieldTransform() { @@ -144,13 +146,13 @@ void InitDefaultsDocumentTransformImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); { - void* ptr = &::google::firestore::v1beta1::_DocumentTransform_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentTransform(); + void* ptr = &::google::firestore::v1::_DocumentTransform_default_instance_; + new (ptr) ::google::firestore::v1::DocumentTransform(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentTransform::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentTransform::InitAsDefaultInstance(); } void InitDefaultsDocumentTransform() { @@ -167,13 +169,13 @@ void InitDefaultsWriteResultImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsArrayValue(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsArrayValue(); { - void* ptr = &::google::firestore::v1beta1::_WriteResult_default_instance_; - new (ptr) ::google::firestore::v1beta1::WriteResult(); + void* ptr = &::google::firestore::v1::_WriteResult_default_instance_; + new (ptr) ::google::firestore::v1::WriteResult(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::WriteResult::InitAsDefaultInstance(); + ::google::firestore::v1::WriteResult::InitAsDefaultInstance(); } void InitDefaultsWriteResult() { @@ -189,13 +191,13 @@ void InitDefaultsDocumentChangeImpl() { #else ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS - protobuf_google_2ffirestore_2fv1beta1_2fdocument_2eproto::InitDefaultsDocument(); + protobuf_google_2ffirestore_2fv1_2fdocument_2eproto::InitDefaultsDocument(); { - void* ptr = &::google::firestore::v1beta1::_DocumentChange_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentChange(); + void* ptr = &::google::firestore::v1::_DocumentChange_default_instance_; + new (ptr) ::google::firestore::v1::DocumentChange(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentChange::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentChange::InitAsDefaultInstance(); } void InitDefaultsDocumentChange() { @@ -213,11 +215,11 @@ void InitDefaultsDocumentDeleteImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_DocumentDelete_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentDelete(); + void* ptr = &::google::firestore::v1::_DocumentDelete_default_instance_; + new (ptr) ::google::firestore::v1::DocumentDelete(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentDelete::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentDelete::InitAsDefaultInstance(); } void InitDefaultsDocumentDelete() { @@ -235,11 +237,11 @@ void InitDefaultsDocumentRemoveImpl() { #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp(); { - void* ptr = &::google::firestore::v1beta1::_DocumentRemove_default_instance_; - new (ptr) ::google::firestore::v1beta1::DocumentRemove(); + void* ptr = &::google::firestore::v1::_DocumentRemove_default_instance_; + new (ptr) ::google::firestore::v1::DocumentRemove(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::DocumentRemove::InitAsDefaultInstance(); + ::google::firestore::v1::DocumentRemove::InitAsDefaultInstance(); } void InitDefaultsDocumentRemove() { @@ -256,11 +258,11 @@ void InitDefaultsExistenceFilterImpl() { ::google::protobuf::internal::InitProtobufDefaults(); #endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS { - void* ptr = &::google::firestore::v1beta1::_ExistenceFilter_default_instance_; - new (ptr) ::google::firestore::v1beta1::ExistenceFilter(); + void* ptr = &::google::firestore::v1::_ExistenceFilter_default_instance_; + new (ptr) ::google::firestore::v1::ExistenceFilter(); ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); } - ::google::firestore::v1beta1::ExistenceFilter::InitAsDefaultInstance(); + ::google::firestore::v1::ExistenceFilter::InitAsDefaultInstance(); } void InitDefaultsExistenceFilter() { @@ -273,100 +275,102 @@ const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1]; const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, _oneof_case_[0]), ~0u, // no _weak_field_map_ - offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, update_), - offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, delete__), - offsetof(::google::firestore::v1beta1::WriteDefaultTypeInternal, transform_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, update_mask_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, current_document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::Write, operation_), + offsetof(::google::firestore::v1::WriteDefaultTypeInternal, update_), + offsetof(::google::firestore::v1::WriteDefaultTypeInternal, delete__), + offsetof(::google::firestore::v1::WriteDefaultTypeInternal, transform_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, update_mask_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, current_document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::Write, operation_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _internal_metadata_), ~0u, // no _extensions_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, _oneof_case_[0]), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _oneof_case_[0]), ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, field_path_), - offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, set_to_server_value_), - offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, numeric_add_), - offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, append_missing_elements_), - offsetof(::google::firestore::v1beta1::DocumentTransform_FieldTransformDefaultTypeInternal, remove_all_from_array_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform_FieldTransform, transform_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, field_path_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, set_to_server_value_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, increment_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, maximum_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, minimum_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, append_missing_elements_), + offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, remove_all_from_array_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, transform_type_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentTransform, field_transforms_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, field_transforms_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, update_time_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::WriteResult, transform_results_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, update_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::WriteResult, transform_results_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, target_ids_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentChange, removed_target_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, target_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentChange, removed_target_ids_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, removed_target_ids_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentDelete, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, removed_target_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, read_time_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, document_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, removed_target_ids_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::DocumentRemove, read_time_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, document_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, removed_target_ids_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, read_time_), ~0u, // no _has_bits_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, target_id_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1beta1::ExistenceFilter, count_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, target_id_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, count_), }; static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - { 0, -1, sizeof(::google::firestore::v1beta1::Write)}, - { 11, -1, sizeof(::google::firestore::v1beta1::DocumentTransform_FieldTransform)}, - { 22, -1, sizeof(::google::firestore::v1beta1::DocumentTransform)}, - { 29, -1, sizeof(::google::firestore::v1beta1::WriteResult)}, - { 36, -1, sizeof(::google::firestore::v1beta1::DocumentChange)}, - { 44, -1, sizeof(::google::firestore::v1beta1::DocumentDelete)}, - { 52, -1, sizeof(::google::firestore::v1beta1::DocumentRemove)}, - { 60, -1, sizeof(::google::firestore::v1beta1::ExistenceFilter)}, + { 0, -1, sizeof(::google::firestore::v1::Write)}, + { 11, -1, sizeof(::google::firestore::v1::DocumentTransform_FieldTransform)}, + { 24, -1, sizeof(::google::firestore::v1::DocumentTransform)}, + { 31, -1, sizeof(::google::firestore::v1::WriteResult)}, + { 38, -1, sizeof(::google::firestore::v1::DocumentChange)}, + { 46, -1, sizeof(::google::firestore::v1::DocumentDelete)}, + { 54, -1, sizeof(::google::firestore::v1::DocumentRemove)}, + { 62, -1, sizeof(::google::firestore::v1::ExistenceFilter)}, }; static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::google::firestore::v1beta1::_Write_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DocumentTransform_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_WriteResult_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DocumentChange_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DocumentDelete_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_DocumentRemove_default_instance_), - reinterpret_cast(&::google::firestore::v1beta1::_ExistenceFilter_default_instance_), + reinterpret_cast(&::google::firestore::v1::_Write_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentTransform_default_instance_), + reinterpret_cast(&::google::firestore::v1::_WriteResult_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentChange_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentDelete_default_instance_), + reinterpret_cast(&::google::firestore::v1::_DocumentRemove_default_instance_), + reinterpret_cast(&::google::firestore::v1::_ExistenceFilter_default_instance_), }; void protobuf_AssignDescriptors() { AddDescriptors(); ::google::protobuf::MessageFactory* factory = NULL; AssignDescriptors( - "google/firestore/v1beta1/write.proto", schemas, file_default_instances, TableStruct::offsets, factory, + "google/firestore/v1/write.proto", schemas, file_default_instances, TableStruct::offsets, factory, file_level_metadata, file_level_enum_descriptors, NULL); } @@ -384,58 +388,59 @@ void protobuf_RegisterTypes(const ::std::string&) { void AddDescriptorsImpl() { InitDefaults(); static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { - "\n$google/firestore/v1beta1/write.proto\022\030" - "google.firestore.v1beta1\032\034google/api/ann" - "otations.proto\032%google/firestore/v1beta1" - "/common.proto\032\'google/firestore/v1beta1/" - "document.proto\032\037google/protobuf/timestam" - "p.proto\"\235\002\n\005Write\0224\n\006update\030\001 \001(\0132\".goog" - "le.firestore.v1beta1.DocumentH\000\022\020\n\006delet" - "e\030\002 \001(\tH\000\022@\n\ttransform\030\006 \001(\0132+.google.fi" - "restore.v1beta1.DocumentTransformH\000\022;\n\013u" - "pdate_mask\030\003 \001(\0132&.google.firestore.v1be" - "ta1.DocumentMask\022@\n\020current_document\030\004 \001" - "(\0132&.google.firestore.v1beta1.Preconditi" - "onB\013\n\toperation\"\242\004\n\021DocumentTransform\022\020\n" - "\010document\030\001 \001(\t\022T\n\020field_transforms\030\002 \003(" - "\0132:.google.firestore.v1beta1.DocumentTra" - "nsform.FieldTransform\032\244\003\n\016FieldTransform" - "\022\022\n\nfield_path\030\001 \001(\t\022e\n\023set_to_server_va" - "lue\030\002 \001(\0162F.google.firestore.v1beta1.Doc" - "umentTransform.FieldTransform.ServerValu" - "eH\000\0226\n\013numeric_add\030\003 \001(\0132\037.google.firest" - "ore.v1beta1.ValueH\000\022G\n\027append_missing_el" - "ements\030\006 \001(\0132$.google.firestore.v1beta1." - "ArrayValueH\000\022E\n\025remove_all_from_array\030\007 " - "\001(\0132$.google.firestore.v1beta1.ArrayValu" - "eH\000\"=\n\013ServerValue\022\034\n\030SERVER_VALUE_UNSPE" - "CIFIED\020\000\022\020\n\014REQUEST_TIME\020\001B\020\n\016transform_" - "type\"z\n\013WriteResult\022/\n\013update_time\030\001 \001(\013" - "2\032.google.protobuf.Timestamp\022:\n\021transfor" - "m_results\030\002 \003(\0132\037.google.firestore.v1bet" - "a1.Value\"v\n\016DocumentChange\0224\n\010document\030\001" - " \001(\0132\".google.firestore.v1beta1.Document" - "\022\022\n\ntarget_ids\030\005 \003(\005\022\032\n\022removed_target_i" - "ds\030\006 \003(\005\"m\n\016DocumentDelete\022\020\n\010document\030\001" - " \001(\t\022\032\n\022removed_target_ids\030\006 \003(\005\022-\n\tread" - "_time\030\004 \001(\0132\032.google.protobuf.Timestamp\"" - "m\n\016DocumentRemove\022\020\n\010document\030\001 \001(\t\022\032\n\022r" - "emoved_target_ids\030\002 \003(\005\022-\n\tread_time\030\004 \001" - "(\0132\032.google.protobuf.Timestamp\"3\n\017Existe" - "nceFilter\022\021\n\ttarget_id\030\001 \001(\005\022\r\n\005count\030\002 " - "\001(\005B\270\001\n\034com.google.firestore.v1beta1B\nWr" - "iteProtoP\001ZAgoogle.golang.org/genproto/g" - "oogleapis/firestore/v1beta1;firestore\242\002\004" - "GCFS\252\002\036Google.Cloud.Firestore.V1Beta1\312\002\036" - "Google\\Cloud\\Firestore\\V1beta1b\006proto3" + "\n\037google/firestore/v1/write.proto\022\023googl" + "e.firestore.v1\032\034google/api/annotations.p" + "roto\032 google/firestore/v1/common.proto\032\"" + "google/firestore/v1/document.proto\032\037goog" + "le/protobuf/timestamp.proto\"\211\002\n\005Write\022/\n" + "\006update\030\001 \001(\0132\035.google.firestore.v1.Docu" + "mentH\000\022\020\n\006delete\030\002 \001(\tH\000\022;\n\ttransform\030\006 " + "\001(\0132&.google.firestore.v1.DocumentTransf" + "ormH\000\0226\n\013update_mask\030\003 \001(\0132!.google.fire" + "store.v1.DocumentMask\022;\n\020current_documen" + "t\030\004 \001(\0132!.google.firestore.v1.Preconditi" + "onB\013\n\toperation\"\345\004\n\021DocumentTransform\022\020\n" + "\010document\030\001 \001(\t\022O\n\020field_transforms\030\002 \003(" + "\01325.google.firestore.v1.DocumentTransfor" + "m.FieldTransform\032\354\003\n\016FieldTransform\022\022\n\nf" + "ield_path\030\001 \001(\t\022`\n\023set_to_server_value\030\002" + " \001(\0162A.google.firestore.v1.DocumentTrans" + "form.FieldTransform.ServerValueH\000\022/\n\tinc" + "rement\030\003 \001(\0132\032.google.firestore.v1.Value" + "H\000\022-\n\007maximum\030\004 \001(\0132\032.google.firestore.v" + "1.ValueH\000\022-\n\007minimum\030\005 \001(\0132\032.google.fire" + "store.v1.ValueH\000\022B\n\027append_missing_eleme" + "nts\030\006 \001(\0132\037.google.firestore.v1.ArrayVal" + "ueH\000\022@\n\025remove_all_from_array\030\007 \001(\0132\037.go" + "ogle.firestore.v1.ArrayValueH\000\"=\n\013Server" + "Value\022\034\n\030SERVER_VALUE_UNSPECIFIED\020\000\022\020\n\014R" + "EQUEST_TIME\020\001B\020\n\016transform_type\"u\n\013Write" + "Result\022/\n\013update_time\030\001 \001(\0132\032.google.pro" + "tobuf.Timestamp\0225\n\021transform_results\030\002 \003" + "(\0132\032.google.firestore.v1.Value\"q\n\016Docume" + "ntChange\022/\n\010document\030\001 \001(\0132\035.google.fire" + "store.v1.Document\022\022\n\ntarget_ids\030\005 \003(\005\022\032\n" + "\022removed_target_ids\030\006 \003(\005\"m\n\016DocumentDel" + "ete\022\020\n\010document\030\001 \001(\t\022\032\n\022removed_target_" + "ids\030\006 \003(\005\022-\n\tread_time\030\004 \001(\0132\032.google.pr" + "otobuf.Timestamp\"m\n\016DocumentRemove\022\020\n\010do" + "cument\030\001 \001(\t\022\032\n\022removed_target_ids\030\002 \003(\005" + "\022-\n\tread_time\030\004 \001(\0132\032.google.protobuf.Ti" + "mestamp\"3\n\017ExistenceFilter\022\021\n\ttarget_id\030" + "\001 \001(\005\022\r\n\005count\030\002 \001(\005B\256\001\n\027com.google.fire" + "store.v1B\nWriteProtoP\001Z( - ::google::firestore::v1beta1::Document::internal_default_instance()); - ::google::firestore::v1beta1::_Write_default_instance_.delete__.UnsafeSetDefault( + ::google::firestore::v1::_Write_default_instance_.update_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); + ::google::firestore::v1::_Write_default_instance_.delete__.UnsafeSetDefault( &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ::google::firestore::v1beta1::_Write_default_instance_.transform_ = const_cast< ::google::firestore::v1beta1::DocumentTransform*>( - ::google::firestore::v1beta1::DocumentTransform::internal_default_instance()); - ::google::firestore::v1beta1::_Write_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1beta1::DocumentMask*>( - ::google::firestore::v1beta1::DocumentMask::internal_default_instance()); - ::google::firestore::v1beta1::_Write_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1beta1::Precondition*>( - ::google::firestore::v1beta1::Precondition::internal_default_instance()); -} -void Write::set_allocated_update(::google::firestore::v1beta1::Document* update) { + ::google::firestore::v1::_Write_default_instance_.transform_ = const_cast< ::google::firestore::v1::DocumentTransform*>( + ::google::firestore::v1::DocumentTransform::internal_default_instance()); + ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>( + ::google::firestore::v1::DocumentMask::internal_default_instance()); + ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>( + ::google::firestore::v1::Precondition::internal_default_instance()); +} +void Write::set_allocated_update(::google::firestore::v1::Document* update) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_operation(); if (update) { @@ -501,7 +506,7 @@ void Write::set_allocated_update(::google::firestore::v1beta1::Document* update) set_has_update(); operation_.update_ = update; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.update) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.update) } void Write::clear_update() { if (has_update()) { @@ -509,7 +514,7 @@ void Write::clear_update() { clear_has_operation(); } } -void Write::set_allocated_transform(::google::firestore::v1beta1::DocumentTransform* transform) { +void Write::set_allocated_transform(::google::firestore::v1::DocumentTransform* transform) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_operation(); if (transform) { @@ -521,7 +526,7 @@ void Write::set_allocated_transform(::google::firestore::v1beta1::DocumentTransf set_has_transform(); operation_.transform_ = transform; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.transform) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.transform) } void Write::clear_update_mask() { if (GetArenaNoVirtual() == NULL && update_mask_ != NULL) { @@ -546,10 +551,10 @@ const int Write::kCurrentDocumentFieldNumber; Write::Write() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(constructor:google.firestore.v1.Write) } Write::Write(const Write& from) : ::google::protobuf::Message(), @@ -557,19 +562,19 @@ Write::Write(const Write& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_update_mask()) { - update_mask_ = new ::google::firestore::v1beta1::DocumentMask(*from.update_mask_); + update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_); } else { update_mask_ = NULL; } if (from.has_current_document()) { - current_document_ = new ::google::firestore::v1beta1::Precondition(*from.current_document_); + current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_); } else { current_document_ = NULL; } clear_has_operation(); switch (from.operation_case()) { case kUpdate: { - mutable_update()->::google::firestore::v1beta1::Document::MergeFrom(from.update()); + mutable_update()->::google::firestore::v1::Document::MergeFrom(from.update()); break; } case kDelete: { @@ -577,14 +582,14 @@ Write::Write(const Write& from) break; } case kTransform: { - mutable_transform()->::google::firestore::v1beta1::DocumentTransform::MergeFrom(from.transform()); + mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from.transform()); break; } case OPERATION_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Write) } void Write::SharedCtor() { @@ -596,7 +601,7 @@ void Write::SharedCtor() { } Write::~Write() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(destructor:google.firestore.v1.Write) SharedDtor(); } @@ -614,12 +619,12 @@ void Write::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* Write::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const Write& Write::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWrite(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWrite(); return *internal_default_instance(); } @@ -632,7 +637,7 @@ Write* Write::New(::google::protobuf::Arena* arena) const { } void Write::clear_operation() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Write) switch (operation_case()) { case kUpdate: { delete operation_.update_; @@ -655,7 +660,7 @@ void Write::clear_operation() { void Write::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Write) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -676,13 +681,13 @@ bool Write::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(parse_start:google.firestore.v1.Write) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Document update = 1; + // .google.firestore.v1.Document update = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -703,14 +708,14 @@ bool Write::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->delete_().data(), static_cast(this->delete_().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.Write.delete")); + "google.firestore.v1.Write.delete")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.DocumentMask update_mask = 3; + // .google.firestore.v1.DocumentMask update_mask = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { @@ -722,7 +727,7 @@ bool Write::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; case 4: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { @@ -734,7 +739,7 @@ bool Write::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.DocumentTransform transform = 6; + // .google.firestore.v1.DocumentTransform transform = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -758,21 +763,21 @@ bool Write::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(parse_success:google.firestore.v1.Write) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.Write) return false; #undef DO_ } void Write::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.Write) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document update = 1; + // .google.firestore.v1.Document update = 1; if (has_update()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *operation_.update_, output); @@ -783,24 +788,24 @@ void Write::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->delete_().data(), static_cast(this->delete_().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Write.delete"); + "google.firestore.v1.Write.delete"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 2, this->delete_(), output); } - // .google.firestore.v1beta1.DocumentMask update_mask = 3; + // .google.firestore.v1.DocumentMask update_mask = 3; if (this->has_update_mask()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 3, *this->update_mask_, output); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 4, *this->current_document_, output); } - // .google.firestore.v1beta1.DocumentTransform transform = 6; + // .google.firestore.v1.DocumentTransform transform = 6; if (has_transform()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *operation_.transform_, output); @@ -810,17 +815,17 @@ void Write::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.Write) } ::google::protobuf::uint8* Write::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Write) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document update = 1; + // .google.firestore.v1.Document update = 1; if (has_update()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -832,27 +837,27 @@ ::google::protobuf::uint8* Write::InternalSerializeWithCachedSizesToArray( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->delete_().data(), static_cast(this->delete_().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.Write.delete"); + "google.firestore.v1.Write.delete"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 2, this->delete_(), target); } - // .google.firestore.v1beta1.DocumentMask update_mask = 3; + // .google.firestore.v1.DocumentMask update_mask = 3; if (this->has_update_mask()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 3, *this->update_mask_, deterministic, target); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 4, *this->current_document_, deterministic, target); } - // .google.firestore.v1beta1.DocumentTransform transform = 6; + // .google.firestore.v1.DocumentTransform transform = 6; if (has_transform()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -863,12 +868,12 @@ ::google::protobuf::uint8* Write::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Write) return target; } size_t Write::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Write) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -876,14 +881,14 @@ size_t Write::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // .google.firestore.v1beta1.DocumentMask update_mask = 3; + // .google.firestore.v1.DocumentMask update_mask = 3; if (this->has_update_mask()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *this->update_mask_); } - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; if (this->has_current_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -891,7 +896,7 @@ size_t Write::ByteSizeLong() const { } switch (operation_case()) { - // .google.firestore.v1beta1.Document update = 1; + // .google.firestore.v1.Document update = 1; case kUpdate: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -905,7 +910,7 @@ size_t Write::ByteSizeLong() const { this->delete_()); break; } - // .google.firestore.v1beta1.DocumentTransform transform = 6; + // .google.firestore.v1.DocumentTransform transform = 6; case kTransform: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -924,36 +929,36 @@ size_t Write::ByteSizeLong() const { } void Write::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Write) GOOGLE_DCHECK_NE(&from, this); const Write* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Write) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Write) MergeFrom(*source); } } void Write::MergeFrom(const Write& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Write) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.has_update_mask()) { - mutable_update_mask()->::google::firestore::v1beta1::DocumentMask::MergeFrom(from.update_mask()); + mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from.update_mask()); } if (from.has_current_document()) { - mutable_current_document()->::google::firestore::v1beta1::Precondition::MergeFrom(from.current_document()); + mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from.current_document()); } switch (from.operation_case()) { case kUpdate: { - mutable_update()->::google::firestore::v1beta1::Document::MergeFrom(from.update()); + mutable_update()->::google::firestore::v1::Document::MergeFrom(from.update()); break; } case kDelete: { @@ -961,7 +966,7 @@ void Write::MergeFrom(const Write& from) { break; } case kTransform: { - mutable_transform()->::google::firestore::v1beta1::DocumentTransform::MergeFrom(from.transform()); + mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from.transform()); break; } case OPERATION_NOT_SET: { @@ -971,14 +976,14 @@ void Write::MergeFrom(const Write& from) { } void Write::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Write) if (&from == this) return; Clear(); MergeFrom(from); } void Write::CopyFrom(const Write& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.Write) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Write) if (&from == this) return; Clear(); MergeFrom(from); @@ -1003,43 +1008,87 @@ void Write::InternalSwap(Write* other) { } ::google::protobuf::Metadata Write::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DocumentTransform_FieldTransform::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.set_to_server_value_ = 0; - ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.numeric_add_ = const_cast< ::google::firestore::v1beta1::Value*>( - ::google::firestore::v1beta1::Value::internal_default_instance()); - ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.append_missing_elements_ = const_cast< ::google::firestore::v1beta1::ArrayValue*>( - ::google::firestore::v1beta1::ArrayValue::internal_default_instance()); - ::google::firestore::v1beta1::_DocumentTransform_FieldTransform_default_instance_.remove_all_from_array_ = const_cast< ::google::firestore::v1beta1::ArrayValue*>( - ::google::firestore::v1beta1::ArrayValue::internal_default_instance()); -} -void DocumentTransform_FieldTransform::set_allocated_numeric_add(::google::firestore::v1beta1::Value* numeric_add) { + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.set_to_server_value_ = 0; + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.increment_ = const_cast< ::google::firestore::v1::Value*>( + ::google::firestore::v1::Value::internal_default_instance()); + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.maximum_ = const_cast< ::google::firestore::v1::Value*>( + ::google::firestore::v1::Value::internal_default_instance()); + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.minimum_ = const_cast< ::google::firestore::v1::Value*>( + ::google::firestore::v1::Value::internal_default_instance()); + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.append_missing_elements_ = const_cast< ::google::firestore::v1::ArrayValue*>( + ::google::firestore::v1::ArrayValue::internal_default_instance()); + ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.remove_all_from_array_ = const_cast< ::google::firestore::v1::ArrayValue*>( + ::google::firestore::v1::ArrayValue::internal_default_instance()); +} +void DocumentTransform_FieldTransform::set_allocated_increment(::google::firestore::v1::Value* increment) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_transform_type(); - if (numeric_add) { + if (increment) { ::google::protobuf::Arena* submessage_arena = NULL; if (message_arena != submessage_arena) { - numeric_add = ::google::protobuf::internal::GetOwnedMessage( - message_arena, numeric_add, submessage_arena); + increment = ::google::protobuf::internal::GetOwnedMessage( + message_arena, increment, submessage_arena); } - set_has_numeric_add(); - transform_type_.numeric_add_ = numeric_add; + set_has_increment(); + transform_type_.increment_ = increment; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.numeric_add) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.increment) } -void DocumentTransform_FieldTransform::clear_numeric_add() { - if (has_numeric_add()) { - delete transform_type_.numeric_add_; +void DocumentTransform_FieldTransform::clear_increment() { + if (has_increment()) { + delete transform_type_.increment_; clear_has_transform_type(); } } -void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::google::firestore::v1beta1::ArrayValue* append_missing_elements) { +void DocumentTransform_FieldTransform::set_allocated_maximum(::google::firestore::v1::Value* maximum) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + clear_transform_type(); + if (maximum) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + maximum = ::google::protobuf::internal::GetOwnedMessage( + message_arena, maximum, submessage_arena); + } + set_has_maximum(); + transform_type_.maximum_ = maximum; + } + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.maximum) +} +void DocumentTransform_FieldTransform::clear_maximum() { + if (has_maximum()) { + delete transform_type_.maximum_; + clear_has_transform_type(); + } +} +void DocumentTransform_FieldTransform::set_allocated_minimum(::google::firestore::v1::Value* minimum) { + ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + clear_transform_type(); + if (minimum) { + ::google::protobuf::Arena* submessage_arena = NULL; + if (message_arena != submessage_arena) { + minimum = ::google::protobuf::internal::GetOwnedMessage( + message_arena, minimum, submessage_arena); + } + set_has_minimum(); + transform_type_.minimum_ = minimum; + } + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.minimum) +} +void DocumentTransform_FieldTransform::clear_minimum() { + if (has_minimum()) { + delete transform_type_.minimum_; + clear_has_transform_type(); + } +} +void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::google::firestore::v1::ArrayValue* append_missing_elements) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_transform_type(); if (append_missing_elements) { @@ -1051,7 +1100,7 @@ void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::g set_has_append_missing_elements(); transform_type_.append_missing_elements_ = append_missing_elements; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.append_missing_elements) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements) } void DocumentTransform_FieldTransform::clear_append_missing_elements() { if (has_append_missing_elements()) { @@ -1059,7 +1108,7 @@ void DocumentTransform_FieldTransform::clear_append_missing_elements() { clear_has_transform_type(); } } -void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::google::firestore::v1beta1::ArrayValue* remove_all_from_array) { +void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::google::firestore::v1::ArrayValue* remove_all_from_array) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); clear_transform_type(); if (remove_all_from_array) { @@ -1071,7 +1120,7 @@ void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::goo set_has_remove_all_from_array(); transform_type_.remove_all_from_array_ = remove_all_from_array; } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.remove_all_from_array) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array) } void DocumentTransform_FieldTransform::clear_remove_all_from_array() { if (has_remove_all_from_array()) { @@ -1082,7 +1131,9 @@ void DocumentTransform_FieldTransform::clear_remove_all_from_array() { #if !defined(_MSC_VER) || _MSC_VER >= 1900 const int DocumentTransform_FieldTransform::kFieldPathFieldNumber; const int DocumentTransform_FieldTransform::kSetToServerValueFieldNumber; -const int DocumentTransform_FieldTransform::kNumericAddFieldNumber; +const int DocumentTransform_FieldTransform::kIncrementFieldNumber; +const int DocumentTransform_FieldTransform::kMaximumFieldNumber; +const int DocumentTransform_FieldTransform::kMinimumFieldNumber; const int DocumentTransform_FieldTransform::kAppendMissingElementsFieldNumber; const int DocumentTransform_FieldTransform::kRemoveAllFromArrayFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 @@ -1090,10 +1141,10 @@ const int DocumentTransform_FieldTransform::kRemoveAllFromArrayFieldNumber; DocumentTransform_FieldTransform::DocumentTransform_FieldTransform() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform.FieldTransform) } DocumentTransform_FieldTransform::DocumentTransform_FieldTransform(const DocumentTransform_FieldTransform& from) : ::google::protobuf::Message(), @@ -1110,23 +1161,31 @@ DocumentTransform_FieldTransform::DocumentTransform_FieldTransform(const Documen set_set_to_server_value(from.set_to_server_value()); break; } - case kNumericAdd: { - mutable_numeric_add()->::google::firestore::v1beta1::Value::MergeFrom(from.numeric_add()); + case kIncrement: { + mutable_increment()->::google::firestore::v1::Value::MergeFrom(from.increment()); + break; + } + case kMaximum: { + mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from.maximum()); + break; + } + case kMinimum: { + mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from.minimum()); break; } case kAppendMissingElements: { - mutable_append_missing_elements()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.append_missing_elements()); + mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from.append_missing_elements()); break; } case kRemoveAllFromArray: { - mutable_remove_all_from_array()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.remove_all_from_array()); + mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from.remove_all_from_array()); break; } case TRANSFORM_TYPE_NOT_SET: { break; } } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform.FieldTransform) } void DocumentTransform_FieldTransform::SharedCtor() { @@ -1136,7 +1195,7 @@ void DocumentTransform_FieldTransform::SharedCtor() { } DocumentTransform_FieldTransform::~DocumentTransform_FieldTransform() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform.FieldTransform) SharedDtor(); } @@ -1153,12 +1212,12 @@ void DocumentTransform_FieldTransform::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DocumentTransform_FieldTransform::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DocumentTransform_FieldTransform& DocumentTransform_FieldTransform::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransform(); return *internal_default_instance(); } @@ -1171,14 +1230,22 @@ DocumentTransform_FieldTransform* DocumentTransform_FieldTransform::New(::google } void DocumentTransform_FieldTransform::clear_transform_type() { -// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.DocumentTransform.FieldTransform) switch (transform_type_case()) { case kSetToServerValue: { // No need to clear break; } - case kNumericAdd: { - delete transform_type_.numeric_add_; + case kIncrement: { + delete transform_type_.increment_; + break; + } + case kMaximum: { + delete transform_type_.maximum_; + break; + } + case kMinimum: { + delete transform_type_.minimum_; break; } case kAppendMissingElements: { @@ -1198,7 +1265,7 @@ void DocumentTransform_FieldTransform::clear_transform_type() { void DocumentTransform_FieldTransform::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform.FieldTransform) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1212,7 +1279,7 @@ bool DocumentTransform_FieldTransform::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentTransform.FieldTransform) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1227,14 +1294,14 @@ bool DocumentTransform_FieldTransform::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path")); + "google.firestore.v1.DocumentTransform.FieldTransform.field_path")); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) { @@ -1242,26 +1309,50 @@ bool DocumentTransform_FieldTransform::MergePartialFromCodedStream( DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( input, &value))); - set_set_to_server_value(static_cast< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue >(value)); + set_set_to_server_value(static_cast< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue >(value)); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.Value numeric_add = 3; + // .google.firestore.v1.Value increment = 3; case 3: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) { DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_numeric_add())); + input, mutable_increment())); + } else { + goto handle_unusual; + } + break; + } + + // .google.firestore.v1.Value maximum = 4; + case 4: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_maximum())); } else { goto handle_unusual; } break; } - // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; + // .google.firestore.v1.Value minimum = 5; + case 5: { + if (static_cast< ::google::protobuf::uint8>(tag) == + static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( + input, mutable_minimum())); + } else { + goto handle_unusual; + } + break; + } + + // .google.firestore.v1.ArrayValue append_missing_elements = 6; case 6: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) { @@ -1273,7 +1364,7 @@ bool DocumentTransform_FieldTransform::MergePartialFromCodedStream( break; } - // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; + // .google.firestore.v1.ArrayValue remove_all_from_array = 7; case 7: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) { @@ -1297,17 +1388,17 @@ bool DocumentTransform_FieldTransform::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentTransform.FieldTransform) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentTransform.FieldTransform) return false; #undef DO_ } void DocumentTransform_FieldTransform::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentTransform.FieldTransform) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1316,30 +1407,42 @@ void DocumentTransform_FieldTransform::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path"); + "google.firestore.v1.DocumentTransform.FieldTransform.field_path"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->field_path(), output); } - // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; if (has_set_to_server_value()) { ::google::protobuf::internal::WireFormatLite::WriteEnum( 2, this->set_to_server_value(), output); } - // .google.firestore.v1beta1.Value numeric_add = 3; - if (has_numeric_add()) { + // .google.firestore.v1.Value increment = 3; + if (has_increment()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, *transform_type_.numeric_add_, output); + 3, *transform_type_.increment_, output); } - // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; + // .google.firestore.v1.Value maximum = 4; + if (has_maximum()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, *transform_type_.maximum_, output); + } + + // .google.firestore.v1.Value minimum = 5; + if (has_minimum()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *transform_type_.minimum_, output); + } + + // .google.firestore.v1.ArrayValue append_missing_elements = 6; if (has_append_missing_elements()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 6, *transform_type_.append_missing_elements_, output); } - // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; + // .google.firestore.v1.ArrayValue remove_all_from_array = 7; if (has_remove_all_from_array()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 7, *transform_type_.remove_all_from_array_, output); @@ -1349,13 +1452,13 @@ void DocumentTransform_FieldTransform::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentTransform.FieldTransform) } ::google::protobuf::uint8* DocumentTransform_FieldTransform::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform.FieldTransform) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1364,33 +1467,47 @@ ::google::protobuf::uint8* DocumentTransform_FieldTransform::InternalSerializeWi ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->field_path().data(), static_cast(this->field_path().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path"); + "google.firestore.v1.DocumentTransform.FieldTransform.field_path"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->field_path(), target); } - // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; if (has_set_to_server_value()) { target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( 2, this->set_to_server_value(), target); } - // .google.firestore.v1beta1.Value numeric_add = 3; - if (has_numeric_add()) { + // .google.firestore.v1.Value increment = 3; + if (has_increment()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( - 3, *transform_type_.numeric_add_, deterministic, target); + 3, *transform_type_.increment_, deterministic, target); } - // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; + // .google.firestore.v1.Value maximum = 4; + if (has_maximum()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 4, *transform_type_.maximum_, deterministic, target); + } + + // .google.firestore.v1.Value minimum = 5; + if (has_minimum()) { + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessageToArray( + 5, *transform_type_.minimum_, deterministic, target); + } + + // .google.firestore.v1.ArrayValue append_missing_elements = 6; if (has_append_missing_elements()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( 6, *transform_type_.append_missing_elements_, deterministic, target); } - // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; + // .google.firestore.v1.ArrayValue remove_all_from_array = 7; if (has_remove_all_from_array()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -1401,12 +1518,12 @@ ::google::protobuf::uint8* DocumentTransform_FieldTransform::InternalSerializeWi target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform.FieldTransform) return target; } size_t DocumentTransform_FieldTransform::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform.FieldTransform) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1422,27 +1539,41 @@ size_t DocumentTransform_FieldTransform::ByteSizeLong() const { } switch (transform_type_case()) { - // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; case kSetToServerValue: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::EnumSize(this->set_to_server_value()); break; } - // .google.firestore.v1beta1.Value numeric_add = 3; - case kNumericAdd: { + // .google.firestore.v1.Value increment = 3; + case kIncrement: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *transform_type_.increment_); + break; + } + // .google.firestore.v1.Value maximum = 4; + case kMaximum: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSize( + *transform_type_.maximum_); + break; + } + // .google.firestore.v1.Value minimum = 5; + case kMinimum: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( - *transform_type_.numeric_add_); + *transform_type_.minimum_); break; } - // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; + // .google.firestore.v1.ArrayValue append_missing_elements = 6; case kAppendMissingElements: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( *transform_type_.append_missing_elements_); break; } - // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; + // .google.firestore.v1.ArrayValue remove_all_from_array = 7; case kRemoveAllFromArray: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -1461,22 +1592,22 @@ size_t DocumentTransform_FieldTransform::ByteSizeLong() const { } void DocumentTransform_FieldTransform::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform) GOOGLE_DCHECK_NE(&from, this); const DocumentTransform_FieldTransform* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform.FieldTransform) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform.FieldTransform) MergeFrom(*source); } } void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTransform& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1491,16 +1622,24 @@ void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTr set_set_to_server_value(from.set_to_server_value()); break; } - case kNumericAdd: { - mutable_numeric_add()->::google::firestore::v1beta1::Value::MergeFrom(from.numeric_add()); + case kIncrement: { + mutable_increment()->::google::firestore::v1::Value::MergeFrom(from.increment()); + break; + } + case kMaximum: { + mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from.maximum()); + break; + } + case kMinimum: { + mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from.minimum()); break; } case kAppendMissingElements: { - mutable_append_missing_elements()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.append_missing_elements()); + mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from.append_missing_elements()); break; } case kRemoveAllFromArray: { - mutable_remove_all_from_array()->::google::firestore::v1beta1::ArrayValue::MergeFrom(from.remove_all_from_array()); + mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from.remove_all_from_array()); break; } case TRANSFORM_TYPE_NOT_SET: { @@ -1510,14 +1649,14 @@ void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTr } void DocumentTransform_FieldTransform::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentTransform_FieldTransform::CopyFrom(const DocumentTransform_FieldTransform& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentTransform.FieldTransform) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform) if (&from == this) return; Clear(); MergeFrom(from); @@ -1541,8 +1680,8 @@ void DocumentTransform_FieldTransform::InternalSwap(DocumentTransform_FieldTrans } ::google::protobuf::Metadata DocumentTransform_FieldTransform::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -1558,10 +1697,10 @@ const int DocumentTransform::kFieldTransformsFieldNumber; DocumentTransform::DocumentTransform() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform) } DocumentTransform::DocumentTransform(const DocumentTransform& from) : ::google::protobuf::Message(), @@ -1573,7 +1712,7 @@ DocumentTransform::DocumentTransform(const DocumentTransform& from) if (from.document().size() > 0) { document_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.document_); } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform) } void DocumentTransform::SharedCtor() { @@ -1582,7 +1721,7 @@ void DocumentTransform::SharedCtor() { } DocumentTransform::~DocumentTransform() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform) SharedDtor(); } @@ -1596,12 +1735,12 @@ void DocumentTransform::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DocumentTransform::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DocumentTransform& DocumentTransform::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform(); return *internal_default_instance(); } @@ -1614,7 +1753,7 @@ DocumentTransform* DocumentTransform::New(::google::protobuf::Arena* arena) cons } void DocumentTransform::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1628,7 +1767,7 @@ bool DocumentTransform::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentTransform) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1643,14 +1782,14 @@ bool DocumentTransform::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DocumentTransform.document")); + "google.firestore.v1.DocumentTransform.document")); } else { goto handle_unusual; } break; } - // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; + // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1673,17 +1812,17 @@ bool DocumentTransform::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentTransform) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentTransform) return false; #undef DO_ } void DocumentTransform::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentTransform) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1692,12 +1831,12 @@ void DocumentTransform::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentTransform.document"); + "google.firestore.v1.DocumentTransform.document"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->document(), output); } - // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; + // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; for (unsigned int i = 0, n = static_cast(this->field_transforms_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -1708,13 +1847,13 @@ void DocumentTransform::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentTransform) } ::google::protobuf::uint8* DocumentTransform::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -1723,13 +1862,13 @@ ::google::protobuf::uint8* DocumentTransform::InternalSerializeWithCachedSizesTo ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentTransform.document"); + "google.firestore.v1.DocumentTransform.document"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->document(), target); } - // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; + // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; for (unsigned int i = 0, n = static_cast(this->field_transforms_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -1741,12 +1880,12 @@ ::google::protobuf::uint8* DocumentTransform::InternalSerializeWithCachedSizesTo target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform) return target; } size_t DocumentTransform::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -1754,7 +1893,7 @@ size_t DocumentTransform::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; + // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; { unsigned int count = static_cast(this->field_transforms_size()); total_size += 1UL * count; @@ -1780,22 +1919,22 @@ size_t DocumentTransform::ByteSizeLong() const { } void DocumentTransform::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform) GOOGLE_DCHECK_NE(&from, this); const DocumentTransform* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform) MergeFrom(*source); } } void DocumentTransform::MergeFrom(const DocumentTransform& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -1809,14 +1948,14 @@ void DocumentTransform::MergeFrom(const DocumentTransform& from) { } void DocumentTransform::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentTransform::CopyFrom(const DocumentTransform& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentTransform) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform) if (&from == this) return; Clear(); MergeFrom(from); @@ -1839,15 +1978,15 @@ void DocumentTransform::InternalSwap(DocumentTransform* other) { } ::google::protobuf::Metadata DocumentTransform::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void WriteResult::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_WriteResult_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_WriteResult_default_instance_._instance.get_mutable()->update_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void WriteResult::clear_update_time() { @@ -1867,10 +2006,10 @@ const int WriteResult::kTransformResultsFieldNumber; WriteResult::WriteResult() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResult) } WriteResult::WriteResult(const WriteResult& from) : ::google::protobuf::Message(), @@ -1883,7 +2022,7 @@ WriteResult::WriteResult(const WriteResult& from) } else { update_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResult) } void WriteResult::SharedCtor() { @@ -1892,7 +2031,7 @@ void WriteResult::SharedCtor() { } WriteResult::~WriteResult() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResult) SharedDtor(); } @@ -1906,12 +2045,12 @@ void WriteResult::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* WriteResult::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const WriteResult& WriteResult::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResult(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResult(); return *internal_default_instance(); } @@ -1924,7 +2063,7 @@ WriteResult* WriteResult::New(::google::protobuf::Arena* arena) const { } void WriteResult::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResult) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -1941,7 +2080,7 @@ bool WriteResult::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(parse_start:google.firestore.v1.WriteResult) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -1959,7 +2098,7 @@ bool WriteResult::MergePartialFromCodedStream( break; } - // repeated .google.firestore.v1beta1.Value transform_results = 2; + // repeated .google.firestore.v1.Value transform_results = 2; case 2: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) { @@ -1982,17 +2121,17 @@ bool WriteResult::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(parse_success:google.firestore.v1.WriteResult) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.WriteResult) return false; #undef DO_ } void WriteResult::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.WriteResult) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2002,7 +2141,7 @@ void WriteResult::SerializeWithCachedSizes( 1, *this->update_time_, output); } - // repeated .google.firestore.v1beta1.Value transform_results = 2; + // repeated .google.firestore.v1.Value transform_results = 2; for (unsigned int i = 0, n = static_cast(this->transform_results_size()); i < n; i++) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( @@ -2013,13 +2152,13 @@ void WriteResult::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.WriteResult) } ::google::protobuf::uint8* WriteResult::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResult) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2030,7 +2169,7 @@ ::google::protobuf::uint8* WriteResult::InternalSerializeWithCachedSizesToArray( 1, *this->update_time_, deterministic, target); } - // repeated .google.firestore.v1beta1.Value transform_results = 2; + // repeated .google.firestore.v1.Value transform_results = 2; for (unsigned int i = 0, n = static_cast(this->transform_results_size()); i < n; i++) { target = ::google::protobuf::internal::WireFormatLite:: @@ -2042,12 +2181,12 @@ ::google::protobuf::uint8* WriteResult::InternalSerializeWithCachedSizesToArray( target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResult) return target; } size_t WriteResult::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResult) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2055,7 +2194,7 @@ size_t WriteResult::ByteSizeLong() const { ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance())); } - // repeated .google.firestore.v1beta1.Value transform_results = 2; + // repeated .google.firestore.v1.Value transform_results = 2; { unsigned int count = static_cast(this->transform_results_size()); total_size += 1UL * count; @@ -2081,22 +2220,22 @@ size_t WriteResult::ByteSizeLong() const { } void WriteResult::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResult) GOOGLE_DCHECK_NE(&from, this); const WriteResult* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResult) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResult) MergeFrom(*source); } } void WriteResult::MergeFrom(const WriteResult& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2109,14 +2248,14 @@ void WriteResult::MergeFrom(const WriteResult& from) { } void WriteResult::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResult) if (&from == this) return; Clear(); MergeFrom(from); } void WriteResult::CopyFrom(const WriteResult& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.WriteResult) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResult) if (&from == this) return; Clear(); MergeFrom(from); @@ -2139,16 +2278,16 @@ void WriteResult::InternalSwap(WriteResult* other) { } ::google::protobuf::Metadata WriteResult::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DocumentChange::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_DocumentChange_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1beta1::Document*>( - ::google::firestore::v1beta1::Document::internal_default_instance()); + ::google::firestore::v1::_DocumentChange_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>( + ::google::firestore::v1::Document::internal_default_instance()); } void DocumentChange::clear_document() { if (GetArenaNoVirtual() == NULL && document_ != NULL) { @@ -2165,10 +2304,10 @@ const int DocumentChange::kRemovedTargetIdsFieldNumber; DocumentChange::DocumentChange() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentChange) } DocumentChange::DocumentChange(const DocumentChange& from) : ::google::protobuf::Message(), @@ -2178,11 +2317,11 @@ DocumentChange::DocumentChange(const DocumentChange& from) _cached_size_(0) { _internal_metadata_.MergeFrom(from._internal_metadata_); if (from.has_document()) { - document_ = new ::google::firestore::v1beta1::Document(*from.document_); + document_ = new ::google::firestore::v1::Document(*from.document_); } else { document_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentChange) } void DocumentChange::SharedCtor() { @@ -2191,7 +2330,7 @@ void DocumentChange::SharedCtor() { } DocumentChange::~DocumentChange() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentChange) SharedDtor(); } @@ -2205,12 +2344,12 @@ void DocumentChange::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DocumentChange::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DocumentChange& DocumentChange::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChange(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChange(); return *internal_default_instance(); } @@ -2223,7 +2362,7 @@ DocumentChange* DocumentChange::New(::google::protobuf::Arena* arena) const { } void DocumentChange::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentChange) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2241,13 +2380,13 @@ bool DocumentChange::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentChange) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; if (!p.second) goto handle_unusual; switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; case 1: { if (static_cast< ::google::protobuf::uint8>(tag) == static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) { @@ -2309,21 +2448,21 @@ bool DocumentChange::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentChange) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentChange) return false; #undef DO_ } void DocumentChange::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentChange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( 1, *this->document_, output); @@ -2355,17 +2494,17 @@ void DocumentChange::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentChange) } ::google::protobuf::uint8* DocumentChange::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentChange) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { target = ::google::protobuf::internal::WireFormatLite:: InternalWriteMessageToArray( @@ -2402,12 +2541,12 @@ ::google::protobuf::uint8* DocumentChange::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentChange) return target; } size_t DocumentChange::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentChange) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2447,7 +2586,7 @@ size_t DocumentChange::ByteSizeLong() const { total_size += data_size; } - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; if (this->has_document()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize( @@ -2462,22 +2601,22 @@ size_t DocumentChange::ByteSizeLong() const { } void DocumentChange::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentChange) GOOGLE_DCHECK_NE(&from, this); const DocumentChange* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentChange) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentChange) MergeFrom(*source); } } void DocumentChange::MergeFrom(const DocumentChange& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentChange) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2486,19 +2625,19 @@ void DocumentChange::MergeFrom(const DocumentChange& from) { target_ids_.MergeFrom(from.target_ids_); removed_target_ids_.MergeFrom(from.removed_target_ids_); if (from.has_document()) { - mutable_document()->::google::firestore::v1beta1::Document::MergeFrom(from.document()); + mutable_document()->::google::firestore::v1::Document::MergeFrom(from.document()); } } void DocumentChange::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentChange) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentChange::CopyFrom(const DocumentChange& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentChange) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentChange) if (&from == this) return; Clear(); MergeFrom(from); @@ -2522,15 +2661,15 @@ void DocumentChange::InternalSwap(DocumentChange* other) { } ::google::protobuf::Metadata DocumentChange::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DocumentDelete::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_DocumentDelete_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_DocumentDelete_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void DocumentDelete::clear_read_time() { @@ -2548,10 +2687,10 @@ const int DocumentDelete::kReadTimeFieldNumber; DocumentDelete::DocumentDelete() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentDelete) } DocumentDelete::DocumentDelete(const DocumentDelete& from) : ::google::protobuf::Message(), @@ -2568,7 +2707,7 @@ DocumentDelete::DocumentDelete(const DocumentDelete& from) } else { read_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentDelete) } void DocumentDelete::SharedCtor() { @@ -2578,7 +2717,7 @@ void DocumentDelete::SharedCtor() { } DocumentDelete::~DocumentDelete() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentDelete) SharedDtor(); } @@ -2593,12 +2732,12 @@ void DocumentDelete::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DocumentDelete::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DocumentDelete& DocumentDelete::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDelete(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDelete(); return *internal_default_instance(); } @@ -2611,7 +2750,7 @@ DocumentDelete* DocumentDelete::New(::google::protobuf::Arena* arena) const { } void DocumentDelete::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentDelete) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2629,7 +2768,7 @@ bool DocumentDelete::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentDelete) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -2644,7 +2783,7 @@ bool DocumentDelete::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DocumentDelete.document")); + "google.firestore.v1.DocumentDelete.document")); } else { goto handle_unusual; } @@ -2694,17 +2833,17 @@ bool DocumentDelete::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentDelete) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentDelete) return false; #undef DO_ } void DocumentDelete::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentDelete) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2713,7 +2852,7 @@ void DocumentDelete::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentDelete.document"); + "google.firestore.v1.DocumentDelete.document"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->document(), output); } @@ -2739,13 +2878,13 @@ void DocumentDelete::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentDelete) } ::google::protobuf::uint8* DocumentDelete::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentDelete) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -2754,7 +2893,7 @@ ::google::protobuf::uint8* DocumentDelete::InternalSerializeWithCachedSizesToArr ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentDelete.document"); + "google.firestore.v1.DocumentDelete.document"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->document(), target); @@ -2784,12 +2923,12 @@ ::google::protobuf::uint8* DocumentDelete::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentDelete) return target; } size_t DocumentDelete::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentDelete) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -2835,22 +2974,22 @@ size_t DocumentDelete::ByteSizeLong() const { } void DocumentDelete::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentDelete) GOOGLE_DCHECK_NE(&from, this); const DocumentDelete* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentDelete) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentDelete) MergeFrom(*source); } } void DocumentDelete::MergeFrom(const DocumentDelete& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentDelete) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -2867,14 +3006,14 @@ void DocumentDelete::MergeFrom(const DocumentDelete& from) { } void DocumentDelete::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentDelete) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentDelete::CopyFrom(const DocumentDelete& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentDelete) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentDelete) if (&from == this) return; Clear(); MergeFrom(from); @@ -2898,15 +3037,15 @@ void DocumentDelete::InternalSwap(DocumentDelete* other) { } ::google::protobuf::Metadata DocumentDelete::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // =================================================================== void DocumentRemove::InitAsDefaultInstance() { - ::google::firestore::v1beta1::_DocumentRemove_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( + ::google::firestore::v1::_DocumentRemove_default_instance_._instance.get_mutable()->read_time_ = const_cast< ::google::protobuf::Timestamp*>( ::google::protobuf::Timestamp::internal_default_instance()); } void DocumentRemove::clear_read_time() { @@ -2924,10 +3063,10 @@ const int DocumentRemove::kReadTimeFieldNumber; DocumentRemove::DocumentRemove() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentRemove) } DocumentRemove::DocumentRemove(const DocumentRemove& from) : ::google::protobuf::Message(), @@ -2944,7 +3083,7 @@ DocumentRemove::DocumentRemove(const DocumentRemove& from) } else { read_time_ = NULL; } - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentRemove) } void DocumentRemove::SharedCtor() { @@ -2954,7 +3093,7 @@ void DocumentRemove::SharedCtor() { } DocumentRemove::~DocumentRemove() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentRemove) SharedDtor(); } @@ -2969,12 +3108,12 @@ void DocumentRemove::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* DocumentRemove::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const DocumentRemove& DocumentRemove::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemove(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemove(); return *internal_default_instance(); } @@ -2987,7 +3126,7 @@ DocumentRemove* DocumentRemove::New(::google::protobuf::Arena* arena) const { } void DocumentRemove::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentRemove) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3005,7 +3144,7 @@ bool DocumentRemove::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(parse_start:google.firestore.v1.DocumentRemove) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -3020,7 +3159,7 @@ bool DocumentRemove::MergePartialFromCodedStream( DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::PARSE, - "google.firestore.v1beta1.DocumentRemove.document")); + "google.firestore.v1.DocumentRemove.document")); } else { goto handle_unusual; } @@ -3070,17 +3209,17 @@ bool DocumentRemove::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(parse_success:google.firestore.v1.DocumentRemove) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.DocumentRemove) return false; #undef DO_ } void DocumentRemove::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.DocumentRemove) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3089,7 +3228,7 @@ void DocumentRemove::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentRemove.document"); + "google.firestore.v1.DocumentRemove.document"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( 1, this->document(), output); } @@ -3115,13 +3254,13 @@ void DocumentRemove::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.DocumentRemove) } ::google::protobuf::uint8* DocumentRemove::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentRemove) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3130,7 +3269,7 @@ ::google::protobuf::uint8* DocumentRemove::InternalSerializeWithCachedSizesToArr ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( this->document().data(), static_cast(this->document().length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "google.firestore.v1beta1.DocumentRemove.document"); + "google.firestore.v1.DocumentRemove.document"); target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->document(), target); @@ -3160,12 +3299,12 @@ ::google::protobuf::uint8* DocumentRemove::InternalSerializeWithCachedSizesToArr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentRemove) return target; } size_t DocumentRemove::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentRemove) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3211,22 +3350,22 @@ size_t DocumentRemove::ByteSizeLong() const { } void DocumentRemove::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentRemove) GOOGLE_DCHECK_NE(&from, this); const DocumentRemove* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentRemove) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentRemove) MergeFrom(*source); } } void DocumentRemove::MergeFrom(const DocumentRemove& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentRemove) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3243,14 +3382,14 @@ void DocumentRemove::MergeFrom(const DocumentRemove& from) { } void DocumentRemove::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentRemove) if (&from == this) return; Clear(); MergeFrom(from); } void DocumentRemove::CopyFrom(const DocumentRemove& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.DocumentRemove) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentRemove) if (&from == this) return; Clear(); MergeFrom(from); @@ -3274,8 +3413,8 @@ void DocumentRemove::InternalSwap(DocumentRemove* other) { } ::google::protobuf::Metadata DocumentRemove::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } @@ -3291,10 +3430,10 @@ const int ExistenceFilter::kCountFieldNumber; ExistenceFilter::ExistenceFilter() : ::google::protobuf::Message(), _internal_metadata_(NULL) { if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter(); } SharedCtor(); - // @@protoc_insertion_point(constructor:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(constructor:google.firestore.v1.ExistenceFilter) } ExistenceFilter::ExistenceFilter(const ExistenceFilter& from) : ::google::protobuf::Message(), @@ -3304,7 +3443,7 @@ ExistenceFilter::ExistenceFilter(const ExistenceFilter& from) ::memcpy(&target_id_, &from.target_id_, static_cast(reinterpret_cast(&count_) - reinterpret_cast(&target_id_)) + sizeof(count_)); - // @@protoc_insertion_point(copy_constructor:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ExistenceFilter) } void ExistenceFilter::SharedCtor() { @@ -3315,7 +3454,7 @@ void ExistenceFilter::SharedCtor() { } ExistenceFilter::~ExistenceFilter() { - // @@protoc_insertion_point(destructor:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(destructor:google.firestore.v1.ExistenceFilter) SharedDtor(); } @@ -3328,12 +3467,12 @@ void ExistenceFilter::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_END(); } const ::google::protobuf::Descriptor* ExistenceFilter::descriptor() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages].descriptor; } const ExistenceFilter& ExistenceFilter::default_instance() { - ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilter(); + ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilter(); return *internal_default_instance(); } @@ -3346,7 +3485,7 @@ ExistenceFilter* ExistenceFilter::New(::google::protobuf::Arena* arena) const { } void ExistenceFilter::Clear() { -// @@protoc_insertion_point(message_clear_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ExistenceFilter) ::google::protobuf::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -3361,7 +3500,7 @@ bool ExistenceFilter::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(parse_start:google.firestore.v1.ExistenceFilter) for (;;) { ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); tag = p.first; @@ -3407,17 +3546,17 @@ bool ExistenceFilter::MergePartialFromCodedStream( } } success: - // @@protoc_insertion_point(parse_success:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(parse_success:google.firestore.v1.ExistenceFilter) return true; failure: - // @@protoc_insertion_point(parse_failure:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(parse_failure:google.firestore.v1.ExistenceFilter) return false; #undef DO_ } void ExistenceFilter::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(serialize_start:google.firestore.v1.ExistenceFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3435,13 +3574,13 @@ void ExistenceFilter::SerializeWithCachedSizes( ::google::protobuf::internal::WireFormat::SerializeUnknownFields( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output); } - // @@protoc_insertion_point(serialize_end:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(serialize_end:google.firestore.v1.ExistenceFilter) } ::google::protobuf::uint8* ExistenceFilter::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const { (void)deterministic; // Unused - // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ExistenceFilter) ::google::protobuf::uint32 cached_has_bits = 0; (void) cached_has_bits; @@ -3459,12 +3598,12 @@ ::google::protobuf::uint8* ExistenceFilter::InternalSerializeWithCachedSizesToAr target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), target); } - // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ExistenceFilter) return target; } size_t ExistenceFilter::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ExistenceFilter) size_t total_size = 0; if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) { @@ -3494,22 +3633,22 @@ size_t ExistenceFilter::ByteSizeLong() const { } void ExistenceFilter::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ExistenceFilter) GOOGLE_DCHECK_NE(&from, this); const ExistenceFilter* source = ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ExistenceFilter) ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ExistenceFilter) MergeFrom(*source); } } void ExistenceFilter::MergeFrom(const ExistenceFilter& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ExistenceFilter) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); ::google::protobuf::uint32 cached_has_bits = 0; @@ -3524,14 +3663,14 @@ void ExistenceFilter::MergeFrom(const ExistenceFilter& from) { } void ExistenceFilter::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ExistenceFilter) if (&from == this) return; Clear(); MergeFrom(from); } void ExistenceFilter::CopyFrom(const ExistenceFilter& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1beta1.ExistenceFilter) +// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ExistenceFilter) if (&from == this) return; Clear(); MergeFrom(from); @@ -3554,13 +3693,13 @@ void ExistenceFilter::InternalSwap(ExistenceFilter* other) { } ::google::protobuf::Metadata ExistenceFilter::GetMetadata() const { - protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); - return ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; + protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::protobuf_AssignDescriptorsOnce(); + return ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::file_level_metadata[kIndexInFileMessages]; } // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google diff --git a/Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.h b/Firestore/Protos/cpp/google/firestore/v1/write.pb.h similarity index 72% rename from Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.h rename to Firestore/Protos/cpp/google/firestore/v1/write.pb.h index 08a8618fea7..086b12932a2 100644 --- a/Firestore/Protos/cpp/google/firestore/v1beta1/write.pb.h +++ b/Firestore/Protos/cpp/google/firestore/v1/write.pb.h @@ -15,10 +15,10 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/write.proto +// source: google/firestore/v1/write.proto -#ifndef PROTOBUF_google_2ffirestore_2fv1beta1_2fwrite_2eproto__INCLUDED -#define PROTOBUF_google_2ffirestore_2fv1beta1_2fwrite_2eproto__INCLUDED +#ifndef PROTOBUF_google_2ffirestore_2fv1_2fwrite_2eproto__INCLUDED +#define PROTOBUF_google_2ffirestore_2fv1_2fwrite_2eproto__INCLUDED #include @@ -47,12 +47,12 @@ #include #include #include "google/api/annotations.pb.h" -#include "google/firestore/v1beta1/common.pb.h" -#include "google/firestore/v1beta1/document.pb.h" +#include "google/firestore/v1/common.pb.h" +#include "google/firestore/v1/document.pb.h" #include // @@protoc_insertion_point(includes) -namespace protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto { +namespace protobuf_google_2ffirestore_2fv1_2fwrite_2eproto { // Internal implementation detail -- do not use these members. struct TableStruct { static const ::google::protobuf::internal::ParseTableField entries[]; @@ -89,10 +89,10 @@ inline void InitDefaults() { InitDefaultsDocumentRemove(); InitDefaultsExistenceFilter(); } -} // namespace protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto +} // namespace protobuf_google_2ffirestore_2fv1_2fwrite_2eproto namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { class DocumentChange; class DocumentChangeDefaultTypeInternal; extern DocumentChangeDefaultTypeInternal _DocumentChange_default_instance_; @@ -117,12 +117,12 @@ extern WriteDefaultTypeInternal _Write_default_instance_; class WriteResult; class WriteResultDefaultTypeInternal; extern WriteResultDefaultTypeInternal _WriteResult_default_instance_; -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace firestore { -namespace v1beta1 { +namespace v1 { enum DocumentTransform_FieldTransform_ServerValue { DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED = 0, @@ -147,7 +147,7 @@ inline bool DocumentTransform_FieldTransform_ServerValue_Parse( } // =================================================================== -class Write : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.Write) */ { +class Write : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.Write) */ { public: Write(); virtual ~Write(); @@ -236,32 +236,32 @@ class Write : public ::google::protobuf::Message /* @@protoc_insertion_point(cla // accessors ------------------------------------------------------- - // .google.firestore.v1beta1.DocumentMask update_mask = 3; + // .google.firestore.v1.DocumentMask update_mask = 3; bool has_update_mask() const; void clear_update_mask(); static const int kUpdateMaskFieldNumber = 3; - const ::google::firestore::v1beta1::DocumentMask& update_mask() const; - ::google::firestore::v1beta1::DocumentMask* release_update_mask(); - ::google::firestore::v1beta1::DocumentMask* mutable_update_mask(); - void set_allocated_update_mask(::google::firestore::v1beta1::DocumentMask* update_mask); + const ::google::firestore::v1::DocumentMask& update_mask() const; + ::google::firestore::v1::DocumentMask* release_update_mask(); + ::google::firestore::v1::DocumentMask* mutable_update_mask(); + void set_allocated_update_mask(::google::firestore::v1::DocumentMask* update_mask); - // .google.firestore.v1beta1.Precondition current_document = 4; + // .google.firestore.v1.Precondition current_document = 4; bool has_current_document() const; void clear_current_document(); static const int kCurrentDocumentFieldNumber = 4; - const ::google::firestore::v1beta1::Precondition& current_document() const; - ::google::firestore::v1beta1::Precondition* release_current_document(); - ::google::firestore::v1beta1::Precondition* mutable_current_document(); - void set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document); + const ::google::firestore::v1::Precondition& current_document() const; + ::google::firestore::v1::Precondition* release_current_document(); + ::google::firestore::v1::Precondition* mutable_current_document(); + void set_allocated_current_document(::google::firestore::v1::Precondition* current_document); - // .google.firestore.v1beta1.Document update = 1; + // .google.firestore.v1.Document update = 1; bool has_update() const; void clear_update(); static const int kUpdateFieldNumber = 1; - const ::google::firestore::v1beta1::Document& update() const; - ::google::firestore::v1beta1::Document* release_update(); - ::google::firestore::v1beta1::Document* mutable_update(); - void set_allocated_update(::google::firestore::v1beta1::Document* update); + const ::google::firestore::v1::Document& update() const; + ::google::firestore::v1::Document* release_update(); + ::google::firestore::v1::Document* mutable_update(); + void set_allocated_update(::google::firestore::v1::Document* update); // string delete = 2; private: @@ -280,17 +280,17 @@ class Write : public ::google::protobuf::Message /* @@protoc_insertion_point(cla ::std::string* release_delete_(); void set_allocated_delete_(::std::string* delete_); - // .google.firestore.v1beta1.DocumentTransform transform = 6; + // .google.firestore.v1.DocumentTransform transform = 6; bool has_transform() const; void clear_transform(); static const int kTransformFieldNumber = 6; - const ::google::firestore::v1beta1::DocumentTransform& transform() const; - ::google::firestore::v1beta1::DocumentTransform* release_transform(); - ::google::firestore::v1beta1::DocumentTransform* mutable_transform(); - void set_allocated_transform(::google::firestore::v1beta1::DocumentTransform* transform); + const ::google::firestore::v1::DocumentTransform& transform() const; + ::google::firestore::v1::DocumentTransform* release_transform(); + ::google::firestore::v1::DocumentTransform* mutable_transform(); + void set_allocated_transform(::google::firestore::v1::DocumentTransform* transform); OperationCase operation_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.Write) + // @@protoc_insertion_point(class_scope:google.firestore.v1.Write) private: void set_has_update(); void set_has_delete_(); @@ -301,23 +301,23 @@ class Write : public ::google::protobuf::Message /* @@protoc_insertion_point(cla inline void clear_has_operation(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::firestore::v1beta1::DocumentMask* update_mask_; - ::google::firestore::v1beta1::Precondition* current_document_; + ::google::firestore::v1::DocumentMask* update_mask_; + ::google::firestore::v1::Precondition* current_document_; union OperationUnion { OperationUnion() {} - ::google::firestore::v1beta1::Document* update_; + ::google::firestore::v1::Document* update_; ::google::protobuf::internal::ArenaStringPtr delete__; - ::google::firestore::v1beta1::DocumentTransform* transform_; + ::google::firestore::v1::DocumentTransform* transform_; } operation_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteImpl(); }; // ------------------------------------------------------------------- -class DocumentTransform_FieldTransform : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentTransform.FieldTransform) */ { +class DocumentTransform_FieldTransform : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentTransform.FieldTransform) */ { public: DocumentTransform_FieldTransform(); virtual ~DocumentTransform_FieldTransform(); @@ -348,7 +348,9 @@ class DocumentTransform_FieldTransform : public ::google::protobuf::Message /* @ enum TransformTypeCase { kSetToServerValue = 2, - kNumericAdd = 3, + kIncrement = 3, + kMaximum = 4, + kMinimum = 5, kAppendMissingElements = 6, kRemoveAllFromArray = 7, TRANSFORM_TYPE_NOT_SET = 0, @@ -447,47 +449,67 @@ class DocumentTransform_FieldTransform : public ::google::protobuf::Message /* @ ::std::string* release_field_path(); void set_allocated_field_path(::std::string* field_path); - // .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; private: bool has_set_to_server_value() const; public: void clear_set_to_server_value(); static const int kSetToServerValueFieldNumber = 2; - ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue set_to_server_value() const; - void set_set_to_server_value(::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue value); - - // .google.firestore.v1beta1.Value numeric_add = 3; - bool has_numeric_add() const; - void clear_numeric_add(); - static const int kNumericAddFieldNumber = 3; - const ::google::firestore::v1beta1::Value& numeric_add() const; - ::google::firestore::v1beta1::Value* release_numeric_add(); - ::google::firestore::v1beta1::Value* mutable_numeric_add(); - void set_allocated_numeric_add(::google::firestore::v1beta1::Value* numeric_add); - - // .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; + ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue set_to_server_value() const; + void set_set_to_server_value(::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue value); + + // .google.firestore.v1.Value increment = 3; + bool has_increment() const; + void clear_increment(); + static const int kIncrementFieldNumber = 3; + const ::google::firestore::v1::Value& increment() const; + ::google::firestore::v1::Value* release_increment(); + ::google::firestore::v1::Value* mutable_increment(); + void set_allocated_increment(::google::firestore::v1::Value* increment); + + // .google.firestore.v1.Value maximum = 4; + bool has_maximum() const; + void clear_maximum(); + static const int kMaximumFieldNumber = 4; + const ::google::firestore::v1::Value& maximum() const; + ::google::firestore::v1::Value* release_maximum(); + ::google::firestore::v1::Value* mutable_maximum(); + void set_allocated_maximum(::google::firestore::v1::Value* maximum); + + // .google.firestore.v1.Value minimum = 5; + bool has_minimum() const; + void clear_minimum(); + static const int kMinimumFieldNumber = 5; + const ::google::firestore::v1::Value& minimum() const; + ::google::firestore::v1::Value* release_minimum(); + ::google::firestore::v1::Value* mutable_minimum(); + void set_allocated_minimum(::google::firestore::v1::Value* minimum); + + // .google.firestore.v1.ArrayValue append_missing_elements = 6; bool has_append_missing_elements() const; void clear_append_missing_elements(); static const int kAppendMissingElementsFieldNumber = 6; - const ::google::firestore::v1beta1::ArrayValue& append_missing_elements() const; - ::google::firestore::v1beta1::ArrayValue* release_append_missing_elements(); - ::google::firestore::v1beta1::ArrayValue* mutable_append_missing_elements(); - void set_allocated_append_missing_elements(::google::firestore::v1beta1::ArrayValue* append_missing_elements); + const ::google::firestore::v1::ArrayValue& append_missing_elements() const; + ::google::firestore::v1::ArrayValue* release_append_missing_elements(); + ::google::firestore::v1::ArrayValue* mutable_append_missing_elements(); + void set_allocated_append_missing_elements(::google::firestore::v1::ArrayValue* append_missing_elements); - // .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; + // .google.firestore.v1.ArrayValue remove_all_from_array = 7; bool has_remove_all_from_array() const; void clear_remove_all_from_array(); static const int kRemoveAllFromArrayFieldNumber = 7; - const ::google::firestore::v1beta1::ArrayValue& remove_all_from_array() const; - ::google::firestore::v1beta1::ArrayValue* release_remove_all_from_array(); - ::google::firestore::v1beta1::ArrayValue* mutable_remove_all_from_array(); - void set_allocated_remove_all_from_array(::google::firestore::v1beta1::ArrayValue* remove_all_from_array); + const ::google::firestore::v1::ArrayValue& remove_all_from_array() const; + ::google::firestore::v1::ArrayValue* release_remove_all_from_array(); + ::google::firestore::v1::ArrayValue* mutable_remove_all_from_array(); + void set_allocated_remove_all_from_array(::google::firestore::v1::ArrayValue* remove_all_from_array); TransformTypeCase transform_type_case() const; - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentTransform.FieldTransform) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentTransform.FieldTransform) private: void set_has_set_to_server_value(); - void set_has_numeric_add(); + void set_has_increment(); + void set_has_maximum(); + void set_has_minimum(); void set_has_append_missing_elements(); void set_has_remove_all_from_array(); @@ -500,19 +522,21 @@ class DocumentTransform_FieldTransform : public ::google::protobuf::Message /* @ union TransformTypeUnion { TransformTypeUnion() {} int set_to_server_value_; - ::google::firestore::v1beta1::Value* numeric_add_; - ::google::firestore::v1beta1::ArrayValue* append_missing_elements_; - ::google::firestore::v1beta1::ArrayValue* remove_all_from_array_; + ::google::firestore::v1::Value* increment_; + ::google::firestore::v1::Value* maximum_; + ::google::firestore::v1::Value* minimum_; + ::google::firestore::v1::ArrayValue* append_missing_elements_; + ::google::firestore::v1::ArrayValue* remove_all_from_array_; } transform_type_; mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransformImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransform_FieldTransformImpl(); }; // ------------------------------------------------------------------- -class DocumentTransform : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentTransform) */ { +class DocumentTransform : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentTransform) */ { public: DocumentTransform(); virtual ~DocumentTransform(); @@ -596,16 +620,16 @@ class DocumentTransform : public ::google::protobuf::Message /* @@protoc_inserti // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; + // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; int field_transforms_size() const; void clear_field_transforms(); static const int kFieldTransformsFieldNumber = 2; - const ::google::firestore::v1beta1::DocumentTransform_FieldTransform& field_transforms(int index) const; - ::google::firestore::v1beta1::DocumentTransform_FieldTransform* mutable_field_transforms(int index); - ::google::firestore::v1beta1::DocumentTransform_FieldTransform* add_field_transforms(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::DocumentTransform_FieldTransform >* + const ::google::firestore::v1::DocumentTransform_FieldTransform& field_transforms(int index) const; + ::google::firestore::v1::DocumentTransform_FieldTransform* mutable_field_transforms(int index); + ::google::firestore::v1::DocumentTransform_FieldTransform* add_field_transforms(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::DocumentTransform_FieldTransform >* mutable_field_transforms(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::DocumentTransform_FieldTransform >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::DocumentTransform_FieldTransform >& field_transforms() const; // string document = 1; @@ -622,19 +646,19 @@ class DocumentTransform : public ::google::protobuf::Message /* @@protoc_inserti ::std::string* release_document(); void set_allocated_document(::std::string* document); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentTransform) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentTransform) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::DocumentTransform_FieldTransform > field_transforms_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::DocumentTransform_FieldTransform > field_transforms_; ::google::protobuf::internal::ArenaStringPtr document_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentTransformImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentTransformImpl(); }; // ------------------------------------------------------------------- -class WriteResult : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.WriteResult) */ { +class WriteResult : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.WriteResult) */ { public: WriteResult(); virtual ~WriteResult(); @@ -716,16 +740,16 @@ class WriteResult : public ::google::protobuf::Message /* @@protoc_insertion_poi // accessors ------------------------------------------------------- - // repeated .google.firestore.v1beta1.Value transform_results = 2; + // repeated .google.firestore.v1.Value transform_results = 2; int transform_results_size() const; void clear_transform_results(); static const int kTransformResultsFieldNumber = 2; - const ::google::firestore::v1beta1::Value& transform_results(int index) const; - ::google::firestore::v1beta1::Value* mutable_transform_results(int index); - ::google::firestore::v1beta1::Value* add_transform_results(); - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* + const ::google::firestore::v1::Value& transform_results(int index) const; + ::google::firestore::v1::Value* mutable_transform_results(int index); + ::google::firestore::v1::Value* add_transform_results(); + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* mutable_transform_results(); - const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& + const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& transform_results() const; // .google.protobuf.Timestamp update_time = 1; @@ -737,19 +761,19 @@ class WriteResult : public ::google::protobuf::Message /* @@protoc_insertion_poi ::google::protobuf::Timestamp* mutable_update_time(); void set_allocated_update_time(::google::protobuf::Timestamp* update_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.WriteResult) + // @@protoc_insertion_point(class_scope:google.firestore.v1.WriteResult) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value > transform_results_; + ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value > transform_results_; ::google::protobuf::Timestamp* update_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsWriteResultImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsWriteResultImpl(); }; // ------------------------------------------------------------------- -class DocumentChange : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentChange) */ { +class DocumentChange : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentChange) */ { public: DocumentChange(); virtual ~DocumentChange(); @@ -855,16 +879,16 @@ class DocumentChange : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* mutable_removed_target_ids(); - // .google.firestore.v1beta1.Document document = 1; + // .google.firestore.v1.Document document = 1; bool has_document() const; void clear_document(); static const int kDocumentFieldNumber = 1; - const ::google::firestore::v1beta1::Document& document() const; - ::google::firestore::v1beta1::Document* release_document(); - ::google::firestore::v1beta1::Document* mutable_document(); - void set_allocated_document(::google::firestore::v1beta1::Document* 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); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentChange) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentChange) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -872,14 +896,14 @@ class DocumentChange : public ::google::protobuf::Message /* @@protoc_insertion_ mutable int _target_ids_cached_byte_size_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > removed_target_ids_; mutable int _removed_target_ids_cached_byte_size_; - ::google::firestore::v1beta1::Document* document_; + ::google::firestore::v1::Document* document_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentChangeImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentChangeImpl(); }; // ------------------------------------------------------------------- -class DocumentDelete : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentDelete) */ { +class DocumentDelete : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentDelete) */ { public: DocumentDelete(); virtual ~DocumentDelete(); @@ -996,7 +1020,7 @@ class DocumentDelete : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::Timestamp* mutable_read_time(); void set_allocated_read_time(::google::protobuf::Timestamp* read_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentDelete) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentDelete) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -1005,12 +1029,12 @@ class DocumentDelete : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::internal::ArenaStringPtr document_; ::google::protobuf::Timestamp* read_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentDeleteImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentDeleteImpl(); }; // ------------------------------------------------------------------- -class DocumentRemove : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.DocumentRemove) */ { +class DocumentRemove : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.DocumentRemove) */ { public: DocumentRemove(); virtual ~DocumentRemove(); @@ -1127,7 +1151,7 @@ class DocumentRemove : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::Timestamp* mutable_read_time(); void set_allocated_read_time(::google::protobuf::Timestamp* read_time); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.DocumentRemove) + // @@protoc_insertion_point(class_scope:google.firestore.v1.DocumentRemove) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; @@ -1136,12 +1160,12 @@ class DocumentRemove : public ::google::protobuf::Message /* @@protoc_insertion_ ::google::protobuf::internal::ArenaStringPtr document_; ::google::protobuf::Timestamp* read_time_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsDocumentRemoveImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsDocumentRemoveImpl(); }; // ------------------------------------------------------------------- -class ExistenceFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1beta1.ExistenceFilter) */ { +class ExistenceFilter : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.firestore.v1.ExistenceFilter) */ { public: ExistenceFilter(); virtual ~ExistenceFilter(); @@ -1235,15 +1259,15 @@ class ExistenceFilter : public ::google::protobuf::Message /* @@protoc_insertion ::google::protobuf::int32 count() const; void set_count(::google::protobuf::int32 value); - // @@protoc_insertion_point(class_scope:google.firestore.v1beta1.ExistenceFilter) + // @@protoc_insertion_point(class_scope:google.firestore.v1.ExistenceFilter) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::int32 target_id_; ::google::protobuf::int32 count_; mutable int _cached_size_; - friend struct ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::TableStruct; - friend void ::protobuf_google_2ffirestore_2fv1beta1_2fwrite_2eproto::InitDefaultsExistenceFilterImpl(); + friend struct ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::TableStruct; + friend void ::protobuf_google_2ffirestore_2fv1_2fwrite_2eproto::InitDefaultsExistenceFilterImpl(); }; // =================================================================== @@ -1256,37 +1280,37 @@ class ExistenceFilter : public ::google::protobuf::Message /* @@protoc_insertion #endif // __GNUC__ // Write -// .google.firestore.v1beta1.Document update = 1; +// .google.firestore.v1.Document update = 1; inline bool Write::has_update() const { return operation_case() == kUpdate; } inline void Write::set_has_update() { _oneof_case_[0] = kUpdate; } -inline ::google::firestore::v1beta1::Document* Write::release_update() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Write.update) +inline ::google::firestore::v1::Document* Write::release_update() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Write.update) if (has_update()) { clear_has_operation(); - ::google::firestore::v1beta1::Document* temp = operation_.update_; + ::google::firestore::v1::Document* temp = operation_.update_; operation_.update_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Document& Write::update() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Write.update) +inline const ::google::firestore::v1::Document& Write::update() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Write.update) return has_update() ? *operation_.update_ - : *reinterpret_cast< ::google::firestore::v1beta1::Document*>(&::google::firestore::v1beta1::_Document_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::Document*>(&::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* Write::mutable_update() { +inline ::google::firestore::v1::Document* Write::mutable_update() { if (!has_update()) { clear_operation(); set_has_update(); - operation_.update_ = new ::google::firestore::v1beta1::Document; + operation_.update_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Write.update) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Write.update) return operation_.update_; } @@ -1304,25 +1328,25 @@ inline void Write::clear_delete_() { } } inline const ::std::string& Write::delete_() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_get:google.firestore.v1.Write.delete) if (has_delete_()) { return operation_.delete__.GetNoArena(); } return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } inline void Write::set_delete_(const ::std::string& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set:google.firestore.v1.Write.delete) if (!has_delete_()) { clear_operation(); set_has_delete_(); operation_.delete__.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } operation_.delete__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set:google.firestore.v1.Write.delete) } #if LANG_CXX11 inline void Write::set_delete_(::std::string&& value) { - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set:google.firestore.v1.Write.delete) if (!has_delete_()) { clear_operation(); set_has_delete_(); @@ -1330,7 +1354,7 @@ inline void Write::set_delete_(::std::string&& value) { } operation_.delete__.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.Write.delete) } #endif inline void Write::set_delete_(const char* value) { @@ -1342,7 +1366,7 @@ inline void Write::set_delete_(const char* value) { } operation_.delete__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.Write.delete) } inline void Write::set_delete_(const char* value, size_t size) { if (!has_delete_()) { @@ -1352,7 +1376,7 @@ inline void Write::set_delete_(const char* value, size_t size) { } operation_.delete__.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.Write.delete) } inline ::std::string* Write::mutable_delete_() { if (!has_delete_()) { @@ -1360,11 +1384,11 @@ inline ::std::string* Write::mutable_delete_() { set_has_delete_(); operation_.delete__.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Write.delete) return operation_.delete__.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* Write::release_delete_() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_release:google.firestore.v1.Write.delete) if (has_delete_()) { clear_has_operation(); return operation_.delete__.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); @@ -1382,10 +1406,10 @@ inline void Write::set_allocated_delete_(::std::string* delete_) { operation_.delete__.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), delete_); } - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.delete) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.delete) } -// .google.firestore.v1beta1.DocumentTransform transform = 6; +// .google.firestore.v1.DocumentTransform transform = 6; inline bool Write::has_transform() const { return operation_case() == kTransform; } @@ -1398,59 +1422,59 @@ inline void Write::clear_transform() { clear_has_operation(); } } -inline ::google::firestore::v1beta1::DocumentTransform* Write::release_transform() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Write.transform) +inline ::google::firestore::v1::DocumentTransform* Write::release_transform() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Write.transform) if (has_transform()) { clear_has_operation(); - ::google::firestore::v1beta1::DocumentTransform* temp = operation_.transform_; + ::google::firestore::v1::DocumentTransform* temp = operation_.transform_; operation_.transform_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::DocumentTransform& Write::transform() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Write.transform) +inline const ::google::firestore::v1::DocumentTransform& Write::transform() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.Write.transform) return has_transform() ? *operation_.transform_ - : *reinterpret_cast< ::google::firestore::v1beta1::DocumentTransform*>(&::google::firestore::v1beta1::_DocumentTransform_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::DocumentTransform*>(&::google::firestore::v1::_DocumentTransform_default_instance_); } -inline ::google::firestore::v1beta1::DocumentTransform* Write::mutable_transform() { +inline ::google::firestore::v1::DocumentTransform* Write::mutable_transform() { if (!has_transform()) { clear_operation(); set_has_transform(); - operation_.transform_ = new ::google::firestore::v1beta1::DocumentTransform; + operation_.transform_ = new ::google::firestore::v1::DocumentTransform; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Write.transform) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Write.transform) return operation_.transform_; } -// .google.firestore.v1beta1.DocumentMask update_mask = 3; +// .google.firestore.v1.DocumentMask update_mask = 3; inline bool Write::has_update_mask() const { return this != internal_default_instance() && update_mask_ != NULL; } -inline const ::google::firestore::v1beta1::DocumentMask& Write::update_mask() const { - const ::google::firestore::v1beta1::DocumentMask* p = update_mask_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Write.update_mask) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_DocumentMask_default_instance_); +inline const ::google::firestore::v1::DocumentMask& Write::update_mask() const { + const ::google::firestore::v1::DocumentMask* p = update_mask_; + // @@protoc_insertion_point(field_get:google.firestore.v1.Write.update_mask) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_DocumentMask_default_instance_); } -inline ::google::firestore::v1beta1::DocumentMask* Write::release_update_mask() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Write.update_mask) +inline ::google::firestore::v1::DocumentMask* Write::release_update_mask() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Write.update_mask) - ::google::firestore::v1beta1::DocumentMask* temp = update_mask_; + ::google::firestore::v1::DocumentMask* temp = update_mask_; update_mask_ = NULL; return temp; } -inline ::google::firestore::v1beta1::DocumentMask* Write::mutable_update_mask() { +inline ::google::firestore::v1::DocumentMask* Write::mutable_update_mask() { if (update_mask_ == NULL) { - update_mask_ = new ::google::firestore::v1beta1::DocumentMask; + update_mask_ = new ::google::firestore::v1::DocumentMask; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Write.update_mask) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Write.update_mask) return update_mask_; } -inline void Write::set_allocated_update_mask(::google::firestore::v1beta1::DocumentMask* update_mask) { +inline void Write::set_allocated_update_mask(::google::firestore::v1::DocumentMask* update_mask) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(update_mask_); @@ -1466,35 +1490,35 @@ inline void Write::set_allocated_update_mask(::google::firestore::v1beta1::Docum } update_mask_ = update_mask; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.update_mask) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.update_mask) } -// .google.firestore.v1beta1.Precondition current_document = 4; +// .google.firestore.v1.Precondition current_document = 4; inline bool Write::has_current_document() const { return this != internal_default_instance() && current_document_ != NULL; } -inline const ::google::firestore::v1beta1::Precondition& Write::current_document() const { - const ::google::firestore::v1beta1::Precondition* p = current_document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.Write.current_document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Precondition_default_instance_); +inline const ::google::firestore::v1::Precondition& Write::current_document() const { + const ::google::firestore::v1::Precondition* p = current_document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.Write.current_document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Precondition_default_instance_); } -inline ::google::firestore::v1beta1::Precondition* Write::release_current_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.Write.current_document) +inline ::google::firestore::v1::Precondition* Write::release_current_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.Write.current_document) - ::google::firestore::v1beta1::Precondition* temp = current_document_; + ::google::firestore::v1::Precondition* temp = current_document_; current_document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Precondition* Write::mutable_current_document() { +inline ::google::firestore::v1::Precondition* Write::mutable_current_document() { if (current_document_ == NULL) { - current_document_ = new ::google::firestore::v1beta1::Precondition; + current_document_ = new ::google::firestore::v1::Precondition; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.Write.current_document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.Write.current_document) return current_document_; } -inline void Write::set_allocated_current_document(::google::firestore::v1beta1::Precondition* current_document) { +inline void Write::set_allocated_current_document(::google::firestore::v1::Precondition* current_document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(current_document_); @@ -1510,7 +1534,7 @@ inline void Write::set_allocated_current_document(::google::firestore::v1beta1:: } current_document_ = current_document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.Write.current_document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.current_document) } inline bool Write::has_operation() const { @@ -1531,41 +1555,41 @@ inline void DocumentTransform_FieldTransform::clear_field_path() { field_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& DocumentTransform_FieldTransform::field_path() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.field_path) return field_path_.GetNoArena(); } inline void DocumentTransform_FieldTransform::set_field_path(const ::std::string& value) { field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentTransform.FieldTransform.field_path) } #if LANG_CXX11 inline void DocumentTransform_FieldTransform::set_field_path(::std::string&& value) { field_path_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.DocumentTransform.FieldTransform.field_path) } #endif inline void DocumentTransform_FieldTransform::set_field_path(const char* value) { GOOGLE_DCHECK(value != NULL); field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DocumentTransform.FieldTransform.field_path) } inline void DocumentTransform_FieldTransform::set_field_path(const char* value, size_t size) { field_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DocumentTransform.FieldTransform.field_path) } inline ::std::string* DocumentTransform_FieldTransform::mutable_field_path() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.field_path) return field_path_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* DocumentTransform_FieldTransform::release_field_path() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.field_path) return field_path_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1576,10 +1600,10 @@ inline void DocumentTransform_FieldTransform::set_allocated_field_path(::std::st } field_path_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), field_path); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.FieldTransform.field_path) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.field_path) } -// .google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; +// .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; inline bool DocumentTransform_FieldTransform::has_set_to_server_value() const { return transform_type_case() == kSetToServerValue; } @@ -1592,121 +1616,189 @@ inline void DocumentTransform_FieldTransform::clear_set_to_server_value() { clear_has_transform_type(); } } -inline ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::set_to_server_value() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.FieldTransform.set_to_server_value) +inline ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::set_to_server_value() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.set_to_server_value) if (has_set_to_server_value()) { - return static_cast< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue >(transform_type_.set_to_server_value_); + return static_cast< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue >(transform_type_.set_to_server_value_); } - return static_cast< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue >(0); + return static_cast< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue >(0); } -inline void DocumentTransform_FieldTransform::set_set_to_server_value(::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue value) { +inline void DocumentTransform_FieldTransform::set_set_to_server_value(::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue value) { if (!has_set_to_server_value()) { clear_transform_type(); set_has_set_to_server_value(); } transform_type_.set_to_server_value_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentTransform.FieldTransform.set_to_server_value) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentTransform.FieldTransform.set_to_server_value) } -// .google.firestore.v1beta1.Value numeric_add = 3; -inline bool DocumentTransform_FieldTransform::has_numeric_add() const { - return transform_type_case() == kNumericAdd; +// .google.firestore.v1.Value increment = 3; +inline bool DocumentTransform_FieldTransform::has_increment() const { + return transform_type_case() == kIncrement; } -inline void DocumentTransform_FieldTransform::set_has_numeric_add() { - _oneof_case_[0] = kNumericAdd; +inline void DocumentTransform_FieldTransform::set_has_increment() { + _oneof_case_[0] = kIncrement; } -inline ::google::firestore::v1beta1::Value* DocumentTransform_FieldTransform::release_numeric_add() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentTransform.FieldTransform.numeric_add) - if (has_numeric_add()) { +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::release_increment() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.increment) + if (has_increment()) { clear_has_transform_type(); - ::google::firestore::v1beta1::Value* temp = transform_type_.numeric_add_; - transform_type_.numeric_add_ = NULL; + ::google::firestore::v1::Value* temp = transform_type_.increment_; + transform_type_.increment_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::Value& DocumentTransform_FieldTransform::numeric_add() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.FieldTransform.numeric_add) - return has_numeric_add() - ? *transform_type_.numeric_add_ - : *reinterpret_cast< ::google::firestore::v1beta1::Value*>(&::google::firestore::v1beta1::_Value_default_instance_); +inline const ::google::firestore::v1::Value& DocumentTransform_FieldTransform::increment() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.increment) + return has_increment() + ? *transform_type_.increment_ + : *reinterpret_cast< ::google::firestore::v1::Value*>(&::google::firestore::v1::_Value_default_instance_); } -inline ::google::firestore::v1beta1::Value* DocumentTransform_FieldTransform::mutable_numeric_add() { - if (!has_numeric_add()) { +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::mutable_increment() { + if (!has_increment()) { clear_transform_type(); - set_has_numeric_add(); - transform_type_.numeric_add_ = new ::google::firestore::v1beta1::Value; + set_has_increment(); + transform_type_.increment_ = new ::google::firestore::v1::Value; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.FieldTransform.numeric_add) - return transform_type_.numeric_add_; + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.increment) + return transform_type_.increment_; } -// .google.firestore.v1beta1.ArrayValue append_missing_elements = 6; +// .google.firestore.v1.Value maximum = 4; +inline bool DocumentTransform_FieldTransform::has_maximum() const { + return transform_type_case() == kMaximum; +} +inline void DocumentTransform_FieldTransform::set_has_maximum() { + _oneof_case_[0] = kMaximum; +} +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::release_maximum() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.maximum) + if (has_maximum()) { + clear_has_transform_type(); + ::google::firestore::v1::Value* temp = transform_type_.maximum_; + transform_type_.maximum_ = NULL; + return temp; + } else { + return NULL; + } +} +inline const ::google::firestore::v1::Value& DocumentTransform_FieldTransform::maximum() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.maximum) + return has_maximum() + ? *transform_type_.maximum_ + : *reinterpret_cast< ::google::firestore::v1::Value*>(&::google::firestore::v1::_Value_default_instance_); +} +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::mutable_maximum() { + if (!has_maximum()) { + clear_transform_type(); + set_has_maximum(); + transform_type_.maximum_ = new ::google::firestore::v1::Value; + } + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.maximum) + return transform_type_.maximum_; +} + +// .google.firestore.v1.Value minimum = 5; +inline bool DocumentTransform_FieldTransform::has_minimum() const { + return transform_type_case() == kMinimum; +} +inline void DocumentTransform_FieldTransform::set_has_minimum() { + _oneof_case_[0] = kMinimum; +} +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::release_minimum() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.minimum) + if (has_minimum()) { + clear_has_transform_type(); + ::google::firestore::v1::Value* temp = transform_type_.minimum_; + transform_type_.minimum_ = NULL; + return temp; + } else { + return NULL; + } +} +inline const ::google::firestore::v1::Value& DocumentTransform_FieldTransform::minimum() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.minimum) + return has_minimum() + ? *transform_type_.minimum_ + : *reinterpret_cast< ::google::firestore::v1::Value*>(&::google::firestore::v1::_Value_default_instance_); +} +inline ::google::firestore::v1::Value* DocumentTransform_FieldTransform::mutable_minimum() { + if (!has_minimum()) { + clear_transform_type(); + set_has_minimum(); + transform_type_.minimum_ = new ::google::firestore::v1::Value; + } + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.minimum) + return transform_type_.minimum_; +} + +// .google.firestore.v1.ArrayValue append_missing_elements = 6; inline bool DocumentTransform_FieldTransform::has_append_missing_elements() const { return transform_type_case() == kAppendMissingElements; } inline void DocumentTransform_FieldTransform::set_has_append_missing_elements() { _oneof_case_[0] = kAppendMissingElements; } -inline ::google::firestore::v1beta1::ArrayValue* DocumentTransform_FieldTransform::release_append_missing_elements() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentTransform.FieldTransform.append_missing_elements) +inline ::google::firestore::v1::ArrayValue* DocumentTransform_FieldTransform::release_append_missing_elements() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements) if (has_append_missing_elements()) { clear_has_transform_type(); - ::google::firestore::v1beta1::ArrayValue* temp = transform_type_.append_missing_elements_; + ::google::firestore::v1::ArrayValue* temp = transform_type_.append_missing_elements_; transform_type_.append_missing_elements_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::ArrayValue& DocumentTransform_FieldTransform::append_missing_elements() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.FieldTransform.append_missing_elements) +inline const ::google::firestore::v1::ArrayValue& DocumentTransform_FieldTransform::append_missing_elements() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements) return has_append_missing_elements() ? *transform_type_.append_missing_elements_ - : *reinterpret_cast< ::google::firestore::v1beta1::ArrayValue*>(&::google::firestore::v1beta1::_ArrayValue_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::ArrayValue*>(&::google::firestore::v1::_ArrayValue_default_instance_); } -inline ::google::firestore::v1beta1::ArrayValue* DocumentTransform_FieldTransform::mutable_append_missing_elements() { +inline ::google::firestore::v1::ArrayValue* DocumentTransform_FieldTransform::mutable_append_missing_elements() { if (!has_append_missing_elements()) { clear_transform_type(); set_has_append_missing_elements(); - transform_type_.append_missing_elements_ = new ::google::firestore::v1beta1::ArrayValue; + transform_type_.append_missing_elements_ = new ::google::firestore::v1::ArrayValue; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.FieldTransform.append_missing_elements) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements) return transform_type_.append_missing_elements_; } -// .google.firestore.v1beta1.ArrayValue remove_all_from_array = 7; +// .google.firestore.v1.ArrayValue remove_all_from_array = 7; inline bool DocumentTransform_FieldTransform::has_remove_all_from_array() const { return transform_type_case() == kRemoveAllFromArray; } inline void DocumentTransform_FieldTransform::set_has_remove_all_from_array() { _oneof_case_[0] = kRemoveAllFromArray; } -inline ::google::firestore::v1beta1::ArrayValue* DocumentTransform_FieldTransform::release_remove_all_from_array() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentTransform.FieldTransform.remove_all_from_array) +inline ::google::firestore::v1::ArrayValue* DocumentTransform_FieldTransform::release_remove_all_from_array() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array) if (has_remove_all_from_array()) { clear_has_transform_type(); - ::google::firestore::v1beta1::ArrayValue* temp = transform_type_.remove_all_from_array_; + ::google::firestore::v1::ArrayValue* temp = transform_type_.remove_all_from_array_; transform_type_.remove_all_from_array_ = NULL; return temp; } else { return NULL; } } -inline const ::google::firestore::v1beta1::ArrayValue& DocumentTransform_FieldTransform::remove_all_from_array() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.FieldTransform.remove_all_from_array) +inline const ::google::firestore::v1::ArrayValue& DocumentTransform_FieldTransform::remove_all_from_array() const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array) return has_remove_all_from_array() ? *transform_type_.remove_all_from_array_ - : *reinterpret_cast< ::google::firestore::v1beta1::ArrayValue*>(&::google::firestore::v1beta1::_ArrayValue_default_instance_); + : *reinterpret_cast< ::google::firestore::v1::ArrayValue*>(&::google::firestore::v1::_ArrayValue_default_instance_); } -inline ::google::firestore::v1beta1::ArrayValue* DocumentTransform_FieldTransform::mutable_remove_all_from_array() { +inline ::google::firestore::v1::ArrayValue* DocumentTransform_FieldTransform::mutable_remove_all_from_array() { if (!has_remove_all_from_array()) { clear_transform_type(); set_has_remove_all_from_array(); - transform_type_.remove_all_from_array_ = new ::google::firestore::v1beta1::ArrayValue; + transform_type_.remove_all_from_array_ = new ::google::firestore::v1::ArrayValue; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.FieldTransform.remove_all_from_array) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array) return transform_type_.remove_all_from_array_; } @@ -1728,41 +1820,41 @@ inline void DocumentTransform::clear_document() { document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& DocumentTransform::document() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.document) return document_.GetNoArena(); } inline void DocumentTransform::set_document(const ::std::string& value) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentTransform.document) } #if LANG_CXX11 inline void DocumentTransform::set_document(::std::string&& value) { document_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.DocumentTransform.document) } #endif inline void DocumentTransform::set_document(const char* value) { GOOGLE_DCHECK(value != NULL); document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DocumentTransform.document) } inline void DocumentTransform::set_document(const char* value, size_t size) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DocumentTransform.document) } inline ::std::string* DocumentTransform::mutable_document() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.document) return document_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* DocumentTransform::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentTransform.document) return document_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -1773,36 +1865,36 @@ inline void DocumentTransform::set_allocated_document(::std::string* document) { } document_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), document); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentTransform.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.document) } -// repeated .google.firestore.v1beta1.DocumentTransform.FieldTransform field_transforms = 2; +// repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; inline int DocumentTransform::field_transforms_size() const { return field_transforms_.size(); } inline void DocumentTransform::clear_field_transforms() { field_transforms_.Clear(); } -inline const ::google::firestore::v1beta1::DocumentTransform_FieldTransform& DocumentTransform::field_transforms(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentTransform.field_transforms) +inline const ::google::firestore::v1::DocumentTransform_FieldTransform& DocumentTransform::field_transforms(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentTransform.field_transforms) return field_transforms_.Get(index); } -inline ::google::firestore::v1beta1::DocumentTransform_FieldTransform* DocumentTransform::mutable_field_transforms(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentTransform.field_transforms) +inline ::google::firestore::v1::DocumentTransform_FieldTransform* DocumentTransform::mutable_field_transforms(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentTransform.field_transforms) return field_transforms_.Mutable(index); } -inline ::google::firestore::v1beta1::DocumentTransform_FieldTransform* DocumentTransform::add_field_transforms() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentTransform.field_transforms) +inline ::google::firestore::v1::DocumentTransform_FieldTransform* DocumentTransform::add_field_transforms() { + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentTransform.field_transforms) return field_transforms_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::DocumentTransform_FieldTransform >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::DocumentTransform_FieldTransform >* DocumentTransform::mutable_field_transforms() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentTransform.field_transforms) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentTransform.field_transforms) return &field_transforms_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::DocumentTransform_FieldTransform >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::DocumentTransform_FieldTransform >& DocumentTransform::field_transforms() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentTransform.field_transforms) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentTransform.field_transforms) return field_transforms_; } @@ -1816,12 +1908,12 @@ inline bool WriteResult::has_update_time() const { } inline const ::google::protobuf::Timestamp& WriteResult::update_time() const { const ::google::protobuf::Timestamp* p = update_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResult.update_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResult.update_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* WriteResult::release_update_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.WriteResult.update_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.WriteResult.update_time) ::google::protobuf::Timestamp* temp = update_time_; update_time_ = NULL; @@ -1832,7 +1924,7 @@ inline ::google::protobuf::Timestamp* WriteResult::mutable_update_time() { if (update_time_ == NULL) { update_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResult.update_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResult.update_time) return update_time_; } inline void WriteResult::set_allocated_update_time(::google::protobuf::Timestamp* update_time) { @@ -1852,33 +1944,33 @@ inline void WriteResult::set_allocated_update_time(::google::protobuf::Timestamp } update_time_ = update_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.WriteResult.update_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.WriteResult.update_time) } -// repeated .google.firestore.v1beta1.Value transform_results = 2; +// repeated .google.firestore.v1.Value transform_results = 2; inline int WriteResult::transform_results_size() const { return transform_results_.size(); } -inline const ::google::firestore::v1beta1::Value& WriteResult::transform_results(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.WriteResult.transform_results) +inline const ::google::firestore::v1::Value& WriteResult::transform_results(int index) const { + // @@protoc_insertion_point(field_get:google.firestore.v1.WriteResult.transform_results) return transform_results_.Get(index); } -inline ::google::firestore::v1beta1::Value* WriteResult::mutable_transform_results(int index) { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.WriteResult.transform_results) +inline ::google::firestore::v1::Value* WriteResult::mutable_transform_results(int index) { + // @@protoc_insertion_point(field_mutable:google.firestore.v1.WriteResult.transform_results) return transform_results_.Mutable(index); } -inline ::google::firestore::v1beta1::Value* WriteResult::add_transform_results() { - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.WriteResult.transform_results) +inline ::google::firestore::v1::Value* WriteResult::add_transform_results() { + // @@protoc_insertion_point(field_add:google.firestore.v1.WriteResult.transform_results) return transform_results_.Add(); } -inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >* +inline ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >* WriteResult::mutable_transform_results() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.WriteResult.transform_results) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.WriteResult.transform_results) return &transform_results_; } -inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1beta1::Value >& +inline const ::google::protobuf::RepeatedPtrField< ::google::firestore::v1::Value >& WriteResult::transform_results() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.WriteResult.transform_results) + // @@protoc_insertion_point(field_list:google.firestore.v1.WriteResult.transform_results) return transform_results_; } @@ -1886,32 +1978,32 @@ WriteResult::transform_results() const { // DocumentChange -// .google.firestore.v1beta1.Document document = 1; +// .google.firestore.v1.Document document = 1; inline bool DocumentChange::has_document() const { return this != internal_default_instance() && document_ != NULL; } -inline const ::google::firestore::v1beta1::Document& DocumentChange::document() const { - const ::google::firestore::v1beta1::Document* p = document_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentChange.document) - return p != NULL ? *p : *reinterpret_cast( - &::google::firestore::v1beta1::_Document_default_instance_); +inline const ::google::firestore::v1::Document& DocumentChange::document() const { + const ::google::firestore::v1::Document* p = document_; + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentChange.document) + return p != NULL ? *p : *reinterpret_cast( + &::google::firestore::v1::_Document_default_instance_); } -inline ::google::firestore::v1beta1::Document* DocumentChange::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentChange.document) +inline ::google::firestore::v1::Document* DocumentChange::release_document() { + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentChange.document) - ::google::firestore::v1beta1::Document* temp = document_; + ::google::firestore::v1::Document* temp = document_; document_ = NULL; return temp; } -inline ::google::firestore::v1beta1::Document* DocumentChange::mutable_document() { +inline ::google::firestore::v1::Document* DocumentChange::mutable_document() { if (document_ == NULL) { - document_ = new ::google::firestore::v1beta1::Document; + document_ = new ::google::firestore::v1::Document; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentChange.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentChange.document) return document_; } -inline void DocumentChange::set_allocated_document(::google::firestore::v1beta1::Document* document) { +inline void DocumentChange::set_allocated_document(::google::firestore::v1::Document* document) { ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == NULL) { delete reinterpret_cast< ::google::protobuf::MessageLite*>(document_); @@ -1927,7 +2019,7 @@ inline void DocumentChange::set_allocated_document(::google::firestore::v1beta1: } document_ = document; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentChange.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentChange.document) } // repeated int32 target_ids = 5; @@ -1938,25 +2030,25 @@ inline void DocumentChange::clear_target_ids() { target_ids_.Clear(); } inline ::google::protobuf::int32 DocumentChange::target_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentChange.target_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentChange.target_ids) return target_ids_.Get(index); } inline void DocumentChange::set_target_ids(int index, ::google::protobuf::int32 value) { target_ids_.Set(index, value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentChange.target_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentChange.target_ids) } inline void DocumentChange::add_target_ids(::google::protobuf::int32 value) { target_ids_.Add(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentChange.target_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentChange.target_ids) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& DocumentChange::target_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentChange.target_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentChange.target_ids) return target_ids_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* DocumentChange::mutable_target_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentChange.target_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentChange.target_ids) return &target_ids_; } @@ -1968,25 +2060,25 @@ inline void DocumentChange::clear_removed_target_ids() { removed_target_ids_.Clear(); } inline ::google::protobuf::int32 DocumentChange::removed_target_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentChange.removed_target_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentChange.removed_target_ids) return removed_target_ids_.Get(index); } inline void DocumentChange::set_removed_target_ids(int index, ::google::protobuf::int32 value) { removed_target_ids_.Set(index, value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentChange.removed_target_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentChange.removed_target_ids) } inline void DocumentChange::add_removed_target_ids(::google::protobuf::int32 value) { removed_target_ids_.Add(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentChange.removed_target_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentChange.removed_target_ids) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& DocumentChange::removed_target_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentChange.removed_target_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentChange.removed_target_ids) return removed_target_ids_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* DocumentChange::mutable_removed_target_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentChange.removed_target_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentChange.removed_target_ids) return &removed_target_ids_; } @@ -1999,41 +2091,41 @@ inline void DocumentDelete::clear_document() { document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& DocumentDelete::document() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentDelete.document) return document_.GetNoArena(); } inline void DocumentDelete::set_document(const ::std::string& value) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentDelete.document) } #if LANG_CXX11 inline void DocumentDelete::set_document(::std::string&& value) { document_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.DocumentDelete.document) } #endif inline void DocumentDelete::set_document(const char* value) { GOOGLE_DCHECK(value != NULL); document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DocumentDelete.document) } inline void DocumentDelete::set_document(const char* value, size_t size) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DocumentDelete.document) } inline ::std::string* DocumentDelete::mutable_document() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentDelete.document) return document_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* DocumentDelete::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentDelete.document) return document_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -2044,7 +2136,7 @@ inline void DocumentDelete::set_allocated_document(::std::string* document) { } document_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), document); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentDelete.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentDelete.document) } // repeated int32 removed_target_ids = 6; @@ -2055,25 +2147,25 @@ inline void DocumentDelete::clear_removed_target_ids() { removed_target_ids_.Clear(); } inline ::google::protobuf::int32 DocumentDelete::removed_target_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentDelete.removed_target_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentDelete.removed_target_ids) return removed_target_ids_.Get(index); } inline void DocumentDelete::set_removed_target_ids(int index, ::google::protobuf::int32 value) { removed_target_ids_.Set(index, value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentDelete.removed_target_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentDelete.removed_target_ids) } inline void DocumentDelete::add_removed_target_ids(::google::protobuf::int32 value) { removed_target_ids_.Add(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentDelete.removed_target_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentDelete.removed_target_ids) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& DocumentDelete::removed_target_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentDelete.removed_target_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentDelete.removed_target_ids) return removed_target_ids_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* DocumentDelete::mutable_removed_target_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentDelete.removed_target_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentDelete.removed_target_ids) return &removed_target_ids_; } @@ -2083,12 +2175,12 @@ inline bool DocumentDelete::has_read_time() const { } inline const ::google::protobuf::Timestamp& DocumentDelete::read_time() const { const ::google::protobuf::Timestamp* p = read_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentDelete.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentDelete.read_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* DocumentDelete::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentDelete.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentDelete.read_time) ::google::protobuf::Timestamp* temp = read_time_; read_time_ = NULL; @@ -2099,7 +2191,7 @@ inline ::google::protobuf::Timestamp* DocumentDelete::mutable_read_time() { if (read_time_ == NULL) { read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentDelete.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentDelete.read_time) return read_time_; } inline void DocumentDelete::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -2119,7 +2211,7 @@ inline void DocumentDelete::set_allocated_read_time(::google::protobuf::Timestam } read_time_ = read_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentDelete.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentDelete.read_time) } // ------------------------------------------------------------------- @@ -2131,41 +2223,41 @@ inline void DocumentRemove::clear_document() { document_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& DocumentRemove::document() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentRemove.document) return document_.GetNoArena(); } inline void DocumentRemove::set_document(const ::std::string& value) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentRemove.document) } #if LANG_CXX11 inline void DocumentRemove::set_document(::std::string&& value) { document_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); - // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_set_rvalue:google.firestore.v1.DocumentRemove.document) } #endif inline void DocumentRemove::set_document(const char* value) { GOOGLE_DCHECK(value != NULL); document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_set_char:google.firestore.v1.DocumentRemove.document) } inline void DocumentRemove::set_document(const char* value, size_t size) { document_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_set_pointer:google.firestore.v1.DocumentRemove.document) } inline ::std::string* DocumentRemove::mutable_document() { - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentRemove.document) return document_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* DocumentRemove::release_document() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentRemove.document) return document_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } @@ -2176,7 +2268,7 @@ inline void DocumentRemove::set_allocated_document(::std::string* document) { } document_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), document); - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentRemove.document) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentRemove.document) } // repeated int32 removed_target_ids = 2; @@ -2187,25 +2279,25 @@ inline void DocumentRemove::clear_removed_target_ids() { removed_target_ids_.Clear(); } inline ::google::protobuf::int32 DocumentRemove::removed_target_ids(int index) const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentRemove.removed_target_ids) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentRemove.removed_target_ids) return removed_target_ids_.Get(index); } inline void DocumentRemove::set_removed_target_ids(int index, ::google::protobuf::int32 value) { removed_target_ids_.Set(index, value); - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.DocumentRemove.removed_target_ids) + // @@protoc_insertion_point(field_set:google.firestore.v1.DocumentRemove.removed_target_ids) } inline void DocumentRemove::add_removed_target_ids(::google::protobuf::int32 value) { removed_target_ids_.Add(value); - // @@protoc_insertion_point(field_add:google.firestore.v1beta1.DocumentRemove.removed_target_ids) + // @@protoc_insertion_point(field_add:google.firestore.v1.DocumentRemove.removed_target_ids) } inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& DocumentRemove::removed_target_ids() const { - // @@protoc_insertion_point(field_list:google.firestore.v1beta1.DocumentRemove.removed_target_ids) + // @@protoc_insertion_point(field_list:google.firestore.v1.DocumentRemove.removed_target_ids) return removed_target_ids_; } inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* DocumentRemove::mutable_removed_target_ids() { - // @@protoc_insertion_point(field_mutable_list:google.firestore.v1beta1.DocumentRemove.removed_target_ids) + // @@protoc_insertion_point(field_mutable_list:google.firestore.v1.DocumentRemove.removed_target_ids) return &removed_target_ids_; } @@ -2215,12 +2307,12 @@ inline bool DocumentRemove::has_read_time() const { } inline const ::google::protobuf::Timestamp& DocumentRemove::read_time() const { const ::google::protobuf::Timestamp* p = read_time_; - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.DocumentRemove.read_time) + // @@protoc_insertion_point(field_get:google.firestore.v1.DocumentRemove.read_time) return p != NULL ? *p : *reinterpret_cast( &::google::protobuf::_Timestamp_default_instance_); } inline ::google::protobuf::Timestamp* DocumentRemove::release_read_time() { - // @@protoc_insertion_point(field_release:google.firestore.v1beta1.DocumentRemove.read_time) + // @@protoc_insertion_point(field_release:google.firestore.v1.DocumentRemove.read_time) ::google::protobuf::Timestamp* temp = read_time_; read_time_ = NULL; @@ -2231,7 +2323,7 @@ inline ::google::protobuf::Timestamp* DocumentRemove::mutable_read_time() { if (read_time_ == NULL) { read_time_ = new ::google::protobuf::Timestamp; } - // @@protoc_insertion_point(field_mutable:google.firestore.v1beta1.DocumentRemove.read_time) + // @@protoc_insertion_point(field_mutable:google.firestore.v1.DocumentRemove.read_time) return read_time_; } inline void DocumentRemove::set_allocated_read_time(::google::protobuf::Timestamp* read_time) { @@ -2251,7 +2343,7 @@ inline void DocumentRemove::set_allocated_read_time(::google::protobuf::Timestam } read_time_ = read_time; - // @@protoc_insertion_point(field_set_allocated:google.firestore.v1beta1.DocumentRemove.read_time) + // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentRemove.read_time) } // ------------------------------------------------------------------- @@ -2263,13 +2355,13 @@ inline void ExistenceFilter::clear_target_id() { target_id_ = 0; } inline ::google::protobuf::int32 ExistenceFilter::target_id() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ExistenceFilter.target_id) + // @@protoc_insertion_point(field_get:google.firestore.v1.ExistenceFilter.target_id) return target_id_; } inline void ExistenceFilter::set_target_id(::google::protobuf::int32 value) { target_id_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ExistenceFilter.target_id) + // @@protoc_insertion_point(field_set:google.firestore.v1.ExistenceFilter.target_id) } // int32 count = 2; @@ -2277,13 +2369,13 @@ inline void ExistenceFilter::clear_count() { count_ = 0; } inline ::google::protobuf::int32 ExistenceFilter::count() const { - // @@protoc_insertion_point(field_get:google.firestore.v1beta1.ExistenceFilter.count) + // @@protoc_insertion_point(field_get:google.firestore.v1.ExistenceFilter.count) return count_; } inline void ExistenceFilter::set_count(::google::protobuf::int32 value) { count_ = value; - // @@protoc_insertion_point(field_set:google.firestore.v1beta1.ExistenceFilter.count) + // @@protoc_insertion_point(field_set:google.firestore.v1.ExistenceFilter.count) } #ifdef __GNUC__ @@ -2306,17 +2398,17 @@ inline void ExistenceFilter::set_count(::google::protobuf::int32 value) { // @@protoc_insertion_point(namespace_scope) -} // namespace v1beta1 +} // namespace v1 } // namespace firestore } // namespace google namespace google { namespace protobuf { -template <> struct is_proto_enum< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue> : ::google::protobuf::internal::true_type {}; +template <> struct is_proto_enum< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue> : ::google::protobuf::internal::true_type {}; template <> -inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue>() { - return ::google::firestore::v1beta1::DocumentTransform_FieldTransform_ServerValue_descriptor(); +inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue>() { + return ::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue_descriptor(); } } // namespace protobuf @@ -2324,4 +2416,4 @@ inline const EnumDescriptor* GetEnumDescriptor< ::google::firestore::v1beta1::Do // @@protoc_insertion_point(global_scope) -#endif // PROTOBUF_google_2ffirestore_2fv1beta1_2fwrite_2eproto__INCLUDED +#endif // PROTOBUF_google_2ffirestore_2fv1_2fwrite_2eproto__INCLUDED diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc index bb3e2433f6e..0295f6e4ff9 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.cc @@ -43,7 +43,7 @@ const pb_field_t firestore_client_UnknownDocument_fields[3] = { const pb_field_t firestore_client_MaybeDocument_fields[5] = { PB_ANONYMOUS_ONEOF_FIELD(document_type, 1, MESSAGE , ONEOF, STATIC , FIRST, firestore_client_MaybeDocument, no_document, no_document, &firestore_client_NoDocument_fields), - PB_ANONYMOUS_ONEOF_FIELD(document_type, 2, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, document, document, &google_firestore_v1beta1_Document_fields), + PB_ANONYMOUS_ONEOF_FIELD(document_type, 2, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, document, document, &google_firestore_v1_Document_fields), PB_ANONYMOUS_ONEOF_FIELD(document_type, 3, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, unknown_document, unknown_document, &firestore_client_UnknownDocument_fields), PB_FIELD( 4, BOOL , SINGULAR, STATIC , OTHER, firestore_client_MaybeDocument, has_committed_mutations, unknown_document, 0), PB_LAST_FIELD diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h index 9d490c8bb69..5422e413e6e 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h @@ -21,7 +21,7 @@ #define PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_NANOPB_H_INCLUDED #include -#include "google/firestore/v1beta1/document.nanopb.h" +#include "google/firestore/v1/document.nanopb.h" #include "google/protobuf/timestamp.nanopb.h" @@ -51,7 +51,7 @@ typedef struct _firestore_client_MaybeDocument { pb_size_t which_document_type; union { firestore_client_NoDocument no_document; - google_firestore_v1beta1_Document document; + google_firestore_v1_Document document; firestore_client_UnknownDocument unknown_document; }; bool has_committed_mutations; @@ -86,7 +86,7 @@ extern const pb_field_t firestore_client_MaybeDocument_fields[5]; /* Maximum encoded size of messages (where known) */ /* firestore_client_NoDocument_size depends on runtime parameters */ /* firestore_client_UnknownDocument_size depends on runtime parameters */ -#define firestore_client_MaybeDocument_size (2 + (((firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) > google_firestore_v1beta1_Document_size ? (firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) : google_firestore_v1beta1_Document_size) > 0 ? ((firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) > google_firestore_v1beta1_Document_size ? (firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) : google_firestore_v1beta1_Document_size) : 0)) +#define firestore_client_MaybeDocument_size (2 + (((firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) > google_firestore_v1_Document_size ? (firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) : google_firestore_v1_Document_size) > 0 ? ((firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) > google_firestore_v1_Document_size ? (firestore_client_NoDocument_size > firestore_client_UnknownDocument_size ? firestore_client_NoDocument_size : firestore_client_UnknownDocument_size) : google_firestore_v1_Document_size) : 0)) /* Message IDs (where set with "msgid" option) */ #ifdef PB_MSGID diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc index 2dae91555cc..c9e68d8693d 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.cc @@ -37,9 +37,9 @@ const pb_field_t firestore_client_MutationQueue_fields[3] = { const pb_field_t firestore_client_WriteBatch_fields[5] = { PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_WriteBatch, batch_id, batch_id, 0), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, writes, batch_id, &google_firestore_v1beta1_Write_fields), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, writes, batch_id, &google_firestore_v1_Write_fields), PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_WriteBatch, local_write_time, writes, &google_protobuf_Timestamp_fields), - PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, base_writes, local_write_time, &google_firestore_v1beta1_Write_fields), + PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, firestore_client_WriteBatch, base_writes, local_write_time, &google_firestore_v1_Write_fields), PB_LAST_FIELD }; diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h index 45944119757..59efa450083 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h @@ -21,7 +21,7 @@ #define PB_FIRESTORE_CLIENT_MUTATION_NANOPB_H_INCLUDED #include -#include "google/firestore/v1beta1/write.nanopb.h" +#include "google/firestore/v1/write.nanopb.h" #include "google/protobuf/timestamp.nanopb.h" @@ -44,10 +44,10 @@ typedef struct _firestore_client_MutationQueue { typedef struct _firestore_client_WriteBatch { int32_t batch_id; pb_size_t writes_count; - struct _google_firestore_v1beta1_Write *writes; + struct _google_firestore_v1_Write *writes; google_protobuf_Timestamp local_write_time; pb_size_t base_writes_count; - struct _google_firestore_v1beta1_Write *base_writes; + struct _google_firestore_v1_Write *base_writes; /* @@protoc_insertion_point(struct:firestore_client_WriteBatch) */ } firestore_client_WriteBatch; diff --git a/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc b/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc index 96b5c4ba5f2..74223caa72f 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc +++ b/Firestore/Protos/nanopb/firestore/local/target.nanopb.cc @@ -34,8 +34,8 @@ const pb_field_t firestore_client_Target_fields[7] = { PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_Target, snapshot_version, target_id, &google_protobuf_Timestamp_fields), PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, firestore_client_Target, resume_token, snapshot_version, 0), PB_FIELD( 4, INT64 , SINGULAR, STATIC , OTHER, firestore_client_Target, last_listen_sequence_number, resume_token, 0), - PB_ANONYMOUS_ONEOF_FIELD(target_type, 5, MESSAGE , ONEOF, STATIC , OTHER, firestore_client_Target, query, last_listen_sequence_number, &google_firestore_v1beta1_Target_QueryTarget_fields), - PB_ANONYMOUS_ONEOF_FIELD(target_type, 6, MESSAGE , ONEOF, STATIC , UNION, firestore_client_Target, documents, last_listen_sequence_number, &google_firestore_v1beta1_Target_DocumentsTarget_fields), + PB_ANONYMOUS_ONEOF_FIELD(target_type, 5, MESSAGE , ONEOF, STATIC , OTHER, firestore_client_Target, query, last_listen_sequence_number, &google_firestore_v1_Target_QueryTarget_fields), + PB_ANONYMOUS_ONEOF_FIELD(target_type, 6, MESSAGE , ONEOF, STATIC , UNION, firestore_client_Target, documents, last_listen_sequence_number, &google_firestore_v1_Target_DocumentsTarget_fields), PB_LAST_FIELD }; diff --git a/Firestore/Protos/nanopb/firestore/local/target.nanopb.h b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h index 76fbd493462..5feacc3e5d8 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.nanopb.h +++ b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h @@ -21,7 +21,7 @@ #define PB_FIRESTORE_CLIENT_TARGET_NANOPB_H_INCLUDED #include -#include "google/firestore/v1beta1/firestore.nanopb.h" +#include "google/firestore/v1/firestore.nanopb.h" #include "google/protobuf/timestamp.nanopb.h" @@ -42,8 +42,8 @@ typedef struct _firestore_client_Target { int64_t last_listen_sequence_number; pb_size_t which_target_type; union { - google_firestore_v1beta1_Target_QueryTarget query; - google_firestore_v1beta1_Target_DocumentsTarget documents; + google_firestore_v1_Target_QueryTarget query; + google_firestore_v1_Target_DocumentsTarget documents; }; /* @@protoc_insertion_point(struct:firestore_client_Target) */ } firestore_client_Target; @@ -59,9 +59,9 @@ typedef struct _firestore_client_TargetGlobal { /* Default values for struct fields */ /* Initializer values for message structs */ -#define firestore_client_Target_init_default {0, google_protobuf_Timestamp_init_default, NULL, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_default}} +#define firestore_client_Target_init_default {0, google_protobuf_Timestamp_init_default, NULL, 0, 0, {google_firestore_v1_Target_QueryTarget_init_default}} #define firestore_client_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default, 0} -#define firestore_client_Target_init_zero {0, google_protobuf_Timestamp_init_zero, NULL, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}} +#define firestore_client_Target_init_zero {0, google_protobuf_Timestamp_init_zero, NULL, 0, 0, {google_firestore_v1_Target_QueryTarget_init_zero}} #define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero, 0} /* Field tags (for use in manual encoding/decoding) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc similarity index 50% rename from Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.cc rename to Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc index 1febff4d9a7..08db6ccd74b 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.cc +++ b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.cc @@ -29,30 +29,30 @@ namespace firestore { -const pb_field_t google_firestore_v1beta1_DocumentMask_fields[2] = { - PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1beta1_DocumentMask, field_paths, field_paths, 0), +const pb_field_t google_firestore_v1_DocumentMask_fields[2] = { + PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_DocumentMask, field_paths, field_paths, 0), PB_LAST_FIELD }; -const pb_field_t google_firestore_v1beta1_Precondition_fields[3] = { - PB_ANONYMOUS_ONEOF_FIELD(condition_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Precondition, exists, exists, 0), - PB_ANONYMOUS_ONEOF_FIELD(condition_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Precondition, update_time, update_time, &google_protobuf_Timestamp_fields), +const pb_field_t google_firestore_v1_Precondition_fields[3] = { + PB_ANONYMOUS_ONEOF_FIELD(condition_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1_Precondition, exists, exists, 0), + PB_ANONYMOUS_ONEOF_FIELD(condition_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Precondition, update_time, update_time, &google_protobuf_Timestamp_fields), PB_LAST_FIELD }; -const pb_field_t google_firestore_v1beta1_TransactionOptions_fields[3] = { - PB_ANONYMOUS_ONEOF_FIELD(mode, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_TransactionOptions, read_only, read_only, &google_firestore_v1beta1_TransactionOptions_ReadOnly_fields), - PB_ANONYMOUS_ONEOF_FIELD(mode, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_TransactionOptions, read_write, read_write, &google_firestore_v1beta1_TransactionOptions_ReadWrite_fields), +const pb_field_t google_firestore_v1_TransactionOptions_fields[3] = { + PB_ANONYMOUS_ONEOF_FIELD(mode, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_TransactionOptions, read_only, read_only, &google_firestore_v1_TransactionOptions_ReadOnly_fields), + PB_ANONYMOUS_ONEOF_FIELD(mode, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_TransactionOptions, read_write, read_write, &google_firestore_v1_TransactionOptions_ReadWrite_fields), PB_LAST_FIELD }; -const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadWrite_fields[2] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_TransactionOptions_ReadWrite, retry_transaction, retry_transaction, 0), +const pb_field_t google_firestore_v1_TransactionOptions_ReadWrite_fields[2] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_TransactionOptions_ReadWrite, retry_transaction, retry_transaction, 0), PB_LAST_FIELD }; -const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadOnly_fields[2] = { - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_TransactionOptions_ReadOnly, read_time, read_time, &google_protobuf_Timestamp_fields), +const pb_field_t google_firestore_v1_TransactionOptions_ReadOnly_fields[2] = { + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_TransactionOptions_ReadOnly, read_time, read_time, &google_protobuf_Timestamp_fields), PB_LAST_FIELD }; @@ -66,7 +66,7 @@ const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadOnly_fields[2] * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Precondition, update_time) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions, read_only) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions, read_write) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions_ReadOnly, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_DocumentMask_google_firestore_v1beta1_Precondition_google_firestore_v1beta1_TransactionOptions_google_firestore_v1beta1_TransactionOptions_ReadWrite_google_firestore_v1beta1_TransactionOptions_ReadOnly) +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Precondition, update_time) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions, read_only) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions, read_write) < 65536 && pb_membersize(google_firestore_v1_TransactionOptions_ReadOnly, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_DocumentMask_google_firestore_v1_Precondition_google_firestore_v1_TransactionOptions_google_firestore_v1_TransactionOptions_ReadWrite_google_firestore_v1_TransactionOptions_ReadOnly) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -77,7 +77,7 @@ PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Precondition, update_ti * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Precondition, update_time) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions, read_only) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions, read_write) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions_ReadOnly, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_DocumentMask_google_firestore_v1beta1_Precondition_google_firestore_v1beta1_TransactionOptions_google_firestore_v1beta1_TransactionOptions_ReadWrite_google_firestore_v1beta1_TransactionOptions_ReadOnly) +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Precondition, update_time) < 256 && pb_membersize(google_firestore_v1_TransactionOptions, read_only) < 256 && pb_membersize(google_firestore_v1_TransactionOptions, read_write) < 256 && pb_membersize(google_firestore_v1_TransactionOptions_ReadOnly, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_DocumentMask_google_firestore_v1_Precondition_google_firestore_v1_TransactionOptions_google_firestore_v1_TransactionOptions_ReadWrite_google_firestore_v1_TransactionOptions_ReadOnly) #endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h new file mode 100644 index 00000000000..c650f803ab4 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/common.nanopb.h @@ -0,0 +1,125 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9.1 */ + +#ifndef PB_GOOGLE_FIRESTORE_V1_COMMON_NANOPB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1_COMMON_NANOPB_H_INCLUDED +#include + +#include "google/api/annotations.nanopb.h" + +#include "google/protobuf/timestamp.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + +/* Struct definitions */ +typedef struct _google_firestore_v1_DocumentMask { + pb_size_t field_paths_count; + pb_bytes_array_t **field_paths; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentMask) */ +} google_firestore_v1_DocumentMask; + +typedef struct _google_firestore_v1_TransactionOptions_ReadWrite { + pb_bytes_array_t *retry_transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions_ReadWrite) */ +} google_firestore_v1_TransactionOptions_ReadWrite; + +typedef struct _google_firestore_v1_Precondition { + pb_size_t which_condition_type; + union { + bool exists; + google_protobuf_Timestamp update_time; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_Precondition) */ +} google_firestore_v1_Precondition; + +typedef struct _google_firestore_v1_TransactionOptions_ReadOnly { + pb_size_t which_consistency_selector; + union { + google_protobuf_Timestamp read_time; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions_ReadOnly) */ +} google_firestore_v1_TransactionOptions_ReadOnly; + +typedef struct _google_firestore_v1_TransactionOptions { + pb_size_t which_mode; + union { + google_firestore_v1_TransactionOptions_ReadOnly read_only; + google_firestore_v1_TransactionOptions_ReadWrite read_write; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_TransactionOptions) */ +} google_firestore_v1_TransactionOptions; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1_DocumentMask_init_default {0, NULL} +#define google_firestore_v1_Precondition_init_default {0, {0}} +#define google_firestore_v1_TransactionOptions_init_default {0, {google_firestore_v1_TransactionOptions_ReadOnly_init_default}} +#define google_firestore_v1_TransactionOptions_ReadWrite_init_default {NULL} +#define google_firestore_v1_TransactionOptions_ReadOnly_init_default {0, {google_protobuf_Timestamp_init_default}} +#define google_firestore_v1_DocumentMask_init_zero {0, NULL} +#define google_firestore_v1_Precondition_init_zero {0, {0}} +#define google_firestore_v1_TransactionOptions_init_zero {0, {google_firestore_v1_TransactionOptions_ReadOnly_init_zero}} +#define google_firestore_v1_TransactionOptions_ReadWrite_init_zero {NULL} +#define google_firestore_v1_TransactionOptions_ReadOnly_init_zero {0, {google_protobuf_Timestamp_init_zero}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1_DocumentMask_field_paths_tag 1 +#define google_firestore_v1_TransactionOptions_ReadWrite_retry_transaction_tag 1 +#define google_firestore_v1_Precondition_exists_tag 1 +#define google_firestore_v1_Precondition_update_time_tag 2 +#define google_firestore_v1_TransactionOptions_ReadOnly_read_time_tag 2 +#define google_firestore_v1_TransactionOptions_read_only_tag 2 +#define google_firestore_v1_TransactionOptions_read_write_tag 3 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1_DocumentMask_fields[2]; +extern const pb_field_t google_firestore_v1_Precondition_fields[3]; +extern const pb_field_t google_firestore_v1_TransactionOptions_fields[3]; +extern const pb_field_t google_firestore_v1_TransactionOptions_ReadWrite_fields[2]; +extern const pb_field_t google_firestore_v1_TransactionOptions_ReadOnly_fields[2]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1_DocumentMask_size depends on runtime parameters */ +#define google_firestore_v1_Precondition_size 24 +#define google_firestore_v1_TransactionOptions_size (0 + (google_firestore_v1_TransactionOptions_ReadWrite_size > 26 ? google_firestore_v1_TransactionOptions_ReadWrite_size : 26)) +/* google_firestore_v1_TransactionOptions_ReadWrite_size depends on runtime parameters */ +#define google_firestore_v1_TransactionOptions_ReadOnly_size 24 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define COMMON_MESSAGES \ + + +#endif + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc new file mode 100644 index 00000000000..00e15d5b42b --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.cc @@ -0,0 +1,105 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9.1 */ + +#include "document.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1_Document_fields[5] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Document, name, name, 0), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_Document, fields, name, &google_firestore_v1_Document_FieldsEntry_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Document, create_time, fields, &google_protobuf_Timestamp_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Document, update_time, create_time, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Document_FieldsEntry_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Document_FieldsEntry, key, key, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Document_FieldsEntry, value, key, &google_firestore_v1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Value_fields[12] = { + PB_ANONYMOUS_ONEOF_FIELD(value_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1_Value, boolean_value, boolean_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 2, INT64 , ONEOF, STATIC , UNION, google_firestore_v1_Value, integer_value, integer_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 3, DOUBLE , ONEOF, STATIC , UNION, google_firestore_v1_Value, double_value, double_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 5, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, reference_value, reference_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, map_value, map_value, &google_firestore_v1_MapValue_fields), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 8, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, geo_point_value, geo_point_value, &google_type_LatLng_fields), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 9, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, array_value, array_value, &google_firestore_v1_ArrayValue_fields), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Value, timestamp_value, timestamp_value, &google_protobuf_Timestamp_fields), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 11, ENUM , ONEOF, STATIC , UNION, google_firestore_v1_Value, null_value, null_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 17, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, string_value, string_value, 0), + PB_ANONYMOUS_ONEOF_FIELD(value_type, 18, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Value, bytes_value, bytes_value, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ArrayValue_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_ArrayValue, values, values, &google_firestore_v1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_MapValue_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_MapValue, fields, fields, &google_firestore_v1_MapValue_FieldsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_MapValue_FieldsEntry_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_MapValue_FieldsEntry, key, key, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_MapValue_FieldsEntry, value, key, &google_firestore_v1_Value_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Document, create_time) < 65536 && pb_membersize(google_firestore_v1_Document, update_time) < 65536 && pb_membersize(google_firestore_v1_Document_FieldsEntry, value) < 65536 && pb_membersize(google_firestore_v1_Value, map_value) < 65536 && pb_membersize(google_firestore_v1_Value, geo_point_value) < 65536 && pb_membersize(google_firestore_v1_Value, array_value) < 65536 && pb_membersize(google_firestore_v1_Value, timestamp_value) < 65536 && pb_membersize(google_firestore_v1_MapValue_FieldsEntry, value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_Document_google_firestore_v1_Document_FieldsEntry_google_firestore_v1_Value_google_firestore_v1_ArrayValue_google_firestore_v1_MapValue_google_firestore_v1_MapValue_FieldsEntry) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Document, create_time) < 256 && pb_membersize(google_firestore_v1_Document, update_time) < 256 && pb_membersize(google_firestore_v1_Document_FieldsEntry, value) < 256 && pb_membersize(google_firestore_v1_Value, map_value) < 256 && pb_membersize(google_firestore_v1_Value, geo_point_value) < 256 && pb_membersize(google_firestore_v1_Value, array_value) < 256 && pb_membersize(google_firestore_v1_Value, timestamp_value) < 256 && pb_membersize(google_firestore_v1_MapValue_FieldsEntry, value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_Document_google_firestore_v1_Document_FieldsEntry_google_firestore_v1_Value_google_firestore_v1_ArrayValue_google_firestore_v1_MapValue_google_firestore_v1_MapValue_FieldsEntry) +#endif + + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h new file mode 100644 index 00000000000..c07959d6022 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h @@ -0,0 +1,161 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9.1 */ + +#ifndef PB_GOOGLE_FIRESTORE_V1_DOCUMENT_NANOPB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1_DOCUMENT_NANOPB_H_INCLUDED +#include + +#include "google/api/annotations.nanopb.h" + +#include "google/protobuf/struct.nanopb.h" + +#include "google/protobuf/timestamp.nanopb.h" + +#include "google/type/latlng.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + +/* Struct definitions */ +typedef struct _google_firestore_v1_ArrayValue { + pb_size_t values_count; + struct _google_firestore_v1_Value *values; +/* @@protoc_insertion_point(struct:google_firestore_v1_ArrayValue) */ +} google_firestore_v1_ArrayValue; + +typedef struct _google_firestore_v1_MapValue { + pb_size_t fields_count; + struct _google_firestore_v1_MapValue_FieldsEntry *fields; +/* @@protoc_insertion_point(struct:google_firestore_v1_MapValue) */ +} google_firestore_v1_MapValue; + +typedef struct _google_firestore_v1_Document { + pb_bytes_array_t *name; + pb_size_t fields_count; + struct _google_firestore_v1_Document_FieldsEntry *fields; + google_protobuf_Timestamp create_time; + google_protobuf_Timestamp update_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_Document) */ +} google_firestore_v1_Document; + +typedef struct _google_firestore_v1_Value { + pb_size_t which_value_type; + union { + bool boolean_value; + int64_t integer_value; + double double_value; + pb_bytes_array_t *reference_value; + google_firestore_v1_MapValue map_value; + google_type_LatLng geo_point_value; + google_firestore_v1_ArrayValue array_value; + google_protobuf_Timestamp timestamp_value; + google_protobuf_NullValue null_value; + pb_bytes_array_t *string_value; + pb_bytes_array_t *bytes_value; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_Value) */ +} google_firestore_v1_Value; + +typedef struct _google_firestore_v1_Document_FieldsEntry { + pb_bytes_array_t *key; + google_firestore_v1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1_Document_FieldsEntry) */ +} google_firestore_v1_Document_FieldsEntry; + +typedef struct _google_firestore_v1_MapValue_FieldsEntry { + pb_bytes_array_t *key; + google_firestore_v1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1_MapValue_FieldsEntry) */ +} google_firestore_v1_MapValue_FieldsEntry; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1_Document_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_Document_FieldsEntry_init_default {NULL, google_firestore_v1_Value_init_default} +#define google_firestore_v1_Value_init_default {0, {0}} +#define google_firestore_v1_ArrayValue_init_default {0, NULL} +#define google_firestore_v1_MapValue_init_default {0, NULL} +#define google_firestore_v1_MapValue_FieldsEntry_init_default {NULL, google_firestore_v1_Value_init_default} +#define google_firestore_v1_Document_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_Document_FieldsEntry_init_zero {NULL, google_firestore_v1_Value_init_zero} +#define google_firestore_v1_Value_init_zero {0, {0}} +#define google_firestore_v1_ArrayValue_init_zero {0, NULL} +#define google_firestore_v1_MapValue_init_zero {0, NULL} +#define google_firestore_v1_MapValue_FieldsEntry_init_zero {NULL, google_firestore_v1_Value_init_zero} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1_ArrayValue_values_tag 1 +#define google_firestore_v1_MapValue_fields_tag 1 +#define google_firestore_v1_Document_name_tag 1 +#define google_firestore_v1_Document_fields_tag 2 +#define google_firestore_v1_Document_create_time_tag 3 +#define google_firestore_v1_Document_update_time_tag 4 +#define google_firestore_v1_Value_boolean_value_tag 1 +#define google_firestore_v1_Value_integer_value_tag 2 +#define google_firestore_v1_Value_double_value_tag 3 +#define google_firestore_v1_Value_reference_value_tag 5 +#define google_firestore_v1_Value_map_value_tag 6 +#define google_firestore_v1_Value_geo_point_value_tag 8 +#define google_firestore_v1_Value_array_value_tag 9 +#define google_firestore_v1_Value_timestamp_value_tag 10 +#define google_firestore_v1_Value_null_value_tag 11 +#define google_firestore_v1_Value_string_value_tag 17 +#define google_firestore_v1_Value_bytes_value_tag 18 +#define google_firestore_v1_Document_FieldsEntry_key_tag 1 +#define google_firestore_v1_Document_FieldsEntry_value_tag 2 +#define google_firestore_v1_MapValue_FieldsEntry_key_tag 1 +#define google_firestore_v1_MapValue_FieldsEntry_value_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1_Document_fields[5]; +extern const pb_field_t google_firestore_v1_Document_FieldsEntry_fields[3]; +extern const pb_field_t google_firestore_v1_Value_fields[12]; +extern const pb_field_t google_firestore_v1_ArrayValue_fields[2]; +extern const pb_field_t google_firestore_v1_MapValue_fields[2]; +extern const pb_field_t google_firestore_v1_MapValue_FieldsEntry_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1_Document_size depends on runtime parameters */ +/* google_firestore_v1_Document_FieldsEntry_size depends on runtime parameters */ +/* google_firestore_v1_Value_size depends on runtime parameters */ +/* google_firestore_v1_ArrayValue_size depends on runtime parameters */ +/* google_firestore_v1_MapValue_size depends on runtime parameters */ +/* google_firestore_v1_MapValue_FieldsEntry_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define DOCUMENT_MESSAGES \ + + +#endif + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc new file mode 100644 index 00000000000..50508a9413a --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.cc @@ -0,0 +1,265 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9.1 */ + +#include "firestore.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1_GetDocumentRequest_fields[5] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_GetDocumentRequest, name, name, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_GetDocumentRequest, mask, name, &google_firestore_v1_DocumentMask_fields), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 3, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_GetDocumentRequest, transaction, mask, 0), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_GetDocumentRequest, read_time, mask, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListDocumentsRequest_fields[10] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListDocumentsRequest, parent, parent, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, collection_id, parent, 0), + PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, page_size, collection_id, 0), + PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, page_token, page_size, 0), + PB_FIELD( 6, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, order_by, page_token, 0), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, mask, order_by, &google_firestore_v1_DocumentMask_fields), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 8, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_ListDocumentsRequest, transaction, mask, 0), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields), + PB_FIELD( 12, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_ListDocumentsRequest, show_missing, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListDocumentsResponse_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_ListDocumentsResponse, documents, documents, &google_firestore_v1_Document_fields), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListDocumentsResponse, next_page_token, documents, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_CreateDocumentRequest_fields[6] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CreateDocumentRequest, parent, parent, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, collection_id, parent, 0), + PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CreateDocumentRequest, document_id, collection_id, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, document, document_id, &google_firestore_v1_Document_fields), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CreateDocumentRequest, mask, document, &google_firestore_v1_DocumentMask_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_UpdateDocumentRequest_fields[5] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_UpdateDocumentRequest, document, document, &google_firestore_v1_Document_fields), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, update_mask, document, &google_firestore_v1_DocumentMask_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, mask, update_mask, &google_firestore_v1_DocumentMask_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_UpdateDocumentRequest, current_document, mask, &google_firestore_v1_Precondition_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DeleteDocumentRequest_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DeleteDocumentRequest, name, name, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DeleteDocumentRequest, current_document, name, &google_firestore_v1_Precondition_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_BatchGetDocumentsRequest_fields[7] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BatchGetDocumentsRequest, database, database, 0), + PB_FIELD( 2, BYTES , REPEATED, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, documents, database, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsRequest, mask, documents, &google_firestore_v1_DocumentMask_fields), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsRequest, transaction, mask, 0), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, new_transaction, mask, &google_firestore_v1_TransactionOptions_fields), + PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_BatchGetDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_BatchGetDocumentsResponse_fields[5] = { + PB_ANONYMOUS_ONEOF_FIELD(result, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_BatchGetDocumentsResponse, found, found, &google_firestore_v1_Document_fields), + PB_ANONYMOUS_ONEOF_FIELD(result, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_BatchGetDocumentsResponse, missing, missing, 0), + PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_BatchGetDocumentsResponse, transaction, missing, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BatchGetDocumentsResponse, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_BeginTransactionRequest_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionRequest, database, database, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_BeginTransactionRequest, options, database, &google_firestore_v1_TransactionOptions_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_BeginTransactionResponse_fields[2] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_BeginTransactionResponse, transaction, transaction, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_CommitRequest_fields[4] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_CommitRequest, database, database, 0), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_CommitRequest, writes, database, &google_firestore_v1_Write_fields), + PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_CommitRequest, transaction, writes, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_CommitResponse_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_CommitResponse, write_results, write_results, &google_firestore_v1_WriteResult_fields), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_CommitResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_RollbackRequest_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RollbackRequest, database, database, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RollbackRequest, transaction, database, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_RunQueryRequest_fields[6] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_RunQueryRequest, parent, parent, 0), + PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_RunQueryRequest, structured_query, parent, &google_firestore_v1_StructuredQuery_fields), + PB_ONEOF_FIELD(consistency_selector, 5, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_RunQueryRequest, transaction, query_type.structured_query, 0), + PB_ONEOF_FIELD(consistency_selector, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunQueryRequest, new_transaction, query_type.structured_query, &google_firestore_v1_TransactionOptions_fields), + PB_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_RunQueryRequest, read_time, query_type.structured_query, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_RunQueryResponse_fields[5] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_RunQueryResponse, document, document, &google_firestore_v1_Document_fields), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_RunQueryResponse, transaction, document, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_RunQueryResponse, skipped_results, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_WriteRequest_fields[6] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest, database, database, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_id, database, 0), + PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, writes, stream_id, &google_firestore_v1_Write_fields), + PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest, stream_token, writes, 0), + PB_FIELD( 5, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteRequest, labels, stream_token, &google_firestore_v1_WriteRequest_LabelsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_WriteRequest_LabelsEntry_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteRequest_LabelsEntry, key, key, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteRequest_LabelsEntry, value, key, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_WriteResponse_fields[5] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_WriteResponse, stream_id, stream_id, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_WriteResponse, stream_token, stream_id, 0), + PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteResponse, write_results, stream_token, &google_firestore_v1_WriteResult_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_WriteResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListenRequest_fields[5] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest, database, database, 0), + PB_ANONYMOUS_ONEOF_FIELD(target_change, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_ListenRequest, add_target, database, &google_firestore_v1_Target_fields), + PB_ANONYMOUS_ONEOF_FIELD(target_change, 3, INT32 , ONEOF, STATIC , UNION, google_firestore_v1_ListenRequest, remove_target, database, 0), + PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_ListenRequest, labels, remove_target, &google_firestore_v1_ListenRequest_LabelsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListenRequest_LabelsEntry_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListenRequest_LabelsEntry, key, key, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListenRequest_LabelsEntry, value, key, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListenResponse_fields[6] = { + PB_ANONYMOUS_ONEOF_FIELD(response_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_ListenResponse, target_change, target_change, &google_firestore_v1_TargetChange_fields), + PB_ANONYMOUS_ONEOF_FIELD(response_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_change, document_change, &google_firestore_v1_DocumentChange_fields), + PB_ANONYMOUS_ONEOF_FIELD(response_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_delete, document_delete, &google_firestore_v1_DocumentDelete_fields), + PB_ANONYMOUS_ONEOF_FIELD(response_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, filter, filter, &google_firestore_v1_ExistenceFilter_fields), + PB_ANONYMOUS_ONEOF_FIELD(response_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_ListenResponse, document_remove, document_remove, &google_firestore_v1_DocumentRemove_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Target_fields[7] = { + PB_ONEOF_FIELD(target_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_Target, query, query, &google_firestore_v1_Target_QueryTarget_fields), + PB_ONEOF_FIELD(target_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, documents, documents, &google_firestore_v1_Target_DocumentsTarget_fields), + PB_ONEOF_FIELD(resume_type, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1_Target, resume_token, target_type.documents, 0), + PB_ONEOF_FIELD(resume_type, 11, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Target, read_time, target_type.documents, &google_protobuf_Timestamp_fields), + PB_FIELD( 5, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, target_id, resume_type.read_time, 0), + PB_FIELD( 6, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_Target, once, target_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Target_DocumentsTarget_fields[2] = { + PB_FIELD( 2, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_Target_DocumentsTarget, documents, documents, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Target_QueryTarget_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_Target_QueryTarget, parent, parent, 0), + PB_ANONYMOUS_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_Target_QueryTarget, structured_query, parent, &google_firestore_v1_StructuredQuery_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_TargetChange_fields[6] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_TargetChange, target_change_type, target_change_type, 0), + PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_TargetChange, target_ids, target_change_type, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_TargetChange, cause, target_ids, &google_rpc_Status_fields), + PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_TargetChange, resume_token, cause, 0), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_TargetChange, read_time, resume_token, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListCollectionIdsRequest_fields[4] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_ListCollectionIdsRequest, parent, parent, 0), + PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_size, parent, 0), + PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsRequest, page_token, page_size, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ListCollectionIdsResponse_fields[3] = { + PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1_ListCollectionIdsResponse, collection_ids, collection_ids, 0), + PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1_ListCollectionIdsResponse, next_page_token, collection_ids, 0), + PB_LAST_FIELD +}; + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_GetDocumentRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_GetDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_ListDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_ListDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1_CreateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1_CreateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, update_mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1_DeleteDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, new_transaction) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, found) < 65536 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, read_time) < 65536 && pb_membersize(google_firestore_v1_BeginTransactionRequest, options) < 65536 && pb_membersize(google_firestore_v1_CommitResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, query_type.structured_query) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.new_transaction) < 65536 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.read_time) < 65536 && pb_membersize(google_firestore_v1_RunQueryResponse, document) < 65536 && pb_membersize(google_firestore_v1_RunQueryResponse, read_time) < 65536 && pb_membersize(google_firestore_v1_WriteResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1_ListenRequest, add_target) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, target_change) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_change) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_delete) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, filter) < 65536 && pb_membersize(google_firestore_v1_ListenResponse, document_remove) < 65536 && pb_membersize(google_firestore_v1_Target, target_type.query) < 65536 && pb_membersize(google_firestore_v1_Target, target_type.documents) < 65536 && pb_membersize(google_firestore_v1_Target, resume_type.read_time) < 65536 && pb_membersize(google_firestore_v1_Target_QueryTarget, structured_query) < 65536 && pb_membersize(google_firestore_v1_TargetChange, cause) < 65536 && pb_membersize(google_firestore_v1_TargetChange, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_GetDocumentRequest_google_firestore_v1_ListDocumentsRequest_google_firestore_v1_ListDocumentsResponse_google_firestore_v1_CreateDocumentRequest_google_firestore_v1_UpdateDocumentRequest_google_firestore_v1_DeleteDocumentRequest_google_firestore_v1_BatchGetDocumentsRequest_google_firestore_v1_BatchGetDocumentsResponse_google_firestore_v1_BeginTransactionRequest_google_firestore_v1_BeginTransactionResponse_google_firestore_v1_CommitRequest_google_firestore_v1_CommitResponse_google_firestore_v1_RollbackRequest_google_firestore_v1_RunQueryRequest_google_firestore_v1_RunQueryResponse_google_firestore_v1_WriteRequest_google_firestore_v1_WriteRequest_LabelsEntry_google_firestore_v1_WriteResponse_google_firestore_v1_ListenRequest_google_firestore_v1_ListenRequest_LabelsEntry_google_firestore_v1_ListenResponse_google_firestore_v1_Target_google_firestore_v1_Target_DocumentsTarget_google_firestore_v1_Target_QueryTarget_google_firestore_v1_TargetChange_google_firestore_v1_ListCollectionIdsRequest_google_firestore_v1_ListCollectionIdsResponse) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_GetDocumentRequest, read_time) < 256 && pb_membersize(google_firestore_v1_GetDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_ListDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1_ListDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1_CreateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1_CreateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, update_mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1_UpdateDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1_DeleteDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, new_transaction) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, found) < 256 && pb_membersize(google_firestore_v1_BatchGetDocumentsResponse, read_time) < 256 && pb_membersize(google_firestore_v1_BeginTransactionRequest, options) < 256 && pb_membersize(google_firestore_v1_CommitResponse, commit_time) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, query_type.structured_query) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.new_transaction) < 256 && pb_membersize(google_firestore_v1_RunQueryRequest, consistency_selector.read_time) < 256 && pb_membersize(google_firestore_v1_RunQueryResponse, document) < 256 && pb_membersize(google_firestore_v1_RunQueryResponse, read_time) < 256 && pb_membersize(google_firestore_v1_WriteResponse, commit_time) < 256 && pb_membersize(google_firestore_v1_ListenRequest, add_target) < 256 && pb_membersize(google_firestore_v1_ListenResponse, target_change) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_change) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_delete) < 256 && pb_membersize(google_firestore_v1_ListenResponse, filter) < 256 && pb_membersize(google_firestore_v1_ListenResponse, document_remove) < 256 && pb_membersize(google_firestore_v1_Target, target_type.query) < 256 && pb_membersize(google_firestore_v1_Target, target_type.documents) < 256 && pb_membersize(google_firestore_v1_Target, resume_type.read_time) < 256 && pb_membersize(google_firestore_v1_Target_QueryTarget, structured_query) < 256 && pb_membersize(google_firestore_v1_TargetChange, cause) < 256 && pb_membersize(google_firestore_v1_TargetChange, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_GetDocumentRequest_google_firestore_v1_ListDocumentsRequest_google_firestore_v1_ListDocumentsResponse_google_firestore_v1_CreateDocumentRequest_google_firestore_v1_UpdateDocumentRequest_google_firestore_v1_DeleteDocumentRequest_google_firestore_v1_BatchGetDocumentsRequest_google_firestore_v1_BatchGetDocumentsResponse_google_firestore_v1_BeginTransactionRequest_google_firestore_v1_BeginTransactionResponse_google_firestore_v1_CommitRequest_google_firestore_v1_CommitResponse_google_firestore_v1_RollbackRequest_google_firestore_v1_RunQueryRequest_google_firestore_v1_RunQueryResponse_google_firestore_v1_WriteRequest_google_firestore_v1_WriteRequest_LabelsEntry_google_firestore_v1_WriteResponse_google_firestore_v1_ListenRequest_google_firestore_v1_ListenRequest_LabelsEntry_google_firestore_v1_ListenResponse_google_firestore_v1_Target_google_firestore_v1_Target_DocumentsTarget_google_firestore_v1_Target_QueryTarget_google_firestore_v1_TargetChange_google_firestore_v1_ListCollectionIdsRequest_google_firestore_v1_ListCollectionIdsResponse) +#endif + + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h new file mode 100644 index 00000000000..3b949de9d21 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h @@ -0,0 +1,537 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9.1 */ + +#ifndef PB_GOOGLE_FIRESTORE_V1_FIRESTORE_NANOPB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1_FIRESTORE_NANOPB_H_INCLUDED +#include + +#include "google/api/annotations.nanopb.h" + +#include "google/firestore/v1/common.nanopb.h" + +#include "google/firestore/v1/document.nanopb.h" + +#include "google/firestore/v1/query.nanopb.h" + +#include "google/firestore/v1/write.nanopb.h" + +#include "google/protobuf/empty.nanopb.h" + +#include "google/protobuf/timestamp.nanopb.h" + +#include "google/rpc/status.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + +/* Enum definitions */ +typedef enum _google_firestore_v1_TargetChange_TargetChangeType { + google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE = 0, + google_firestore_v1_TargetChange_TargetChangeType_ADD = 1, + google_firestore_v1_TargetChange_TargetChangeType_REMOVE = 2, + google_firestore_v1_TargetChange_TargetChangeType_CURRENT = 3, + google_firestore_v1_TargetChange_TargetChangeType_RESET = 4 +} google_firestore_v1_TargetChange_TargetChangeType; +#define _google_firestore_v1_TargetChange_TargetChangeType_MIN google_firestore_v1_TargetChange_TargetChangeType_NO_CHANGE +#define _google_firestore_v1_TargetChange_TargetChangeType_MAX google_firestore_v1_TargetChange_TargetChangeType_RESET +#define _google_firestore_v1_TargetChange_TargetChangeType_ARRAYSIZE ((google_firestore_v1_TargetChange_TargetChangeType)(google_firestore_v1_TargetChange_TargetChangeType_RESET+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1_BeginTransactionResponse { + pb_bytes_array_t *transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1_BeginTransactionResponse) */ +} google_firestore_v1_BeginTransactionResponse; + +typedef struct _google_firestore_v1_CommitRequest { + pb_bytes_array_t *database; + pb_size_t writes_count; + struct _google_firestore_v1_Write *writes; + pb_bytes_array_t *transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1_CommitRequest) */ +} google_firestore_v1_CommitRequest; + +typedef struct _google_firestore_v1_ListCollectionIdsResponse { + pb_size_t collection_ids_count; + pb_bytes_array_t **collection_ids; + pb_bytes_array_t *next_page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListCollectionIdsResponse) */ +} google_firestore_v1_ListCollectionIdsResponse; + +typedef struct _google_firestore_v1_ListDocumentsResponse { + pb_size_t documents_count; + struct _google_firestore_v1_Document *documents; + pb_bytes_array_t *next_page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListDocumentsResponse) */ +} google_firestore_v1_ListDocumentsResponse; + +typedef struct _google_firestore_v1_ListenRequest_LabelsEntry { + pb_bytes_array_t *key; + pb_bytes_array_t *value; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListenRequest_LabelsEntry) */ +} google_firestore_v1_ListenRequest_LabelsEntry; + +typedef struct _google_firestore_v1_RollbackRequest { + pb_bytes_array_t *database; + pb_bytes_array_t *transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1_RollbackRequest) */ +} google_firestore_v1_RollbackRequest; + +typedef struct _google_firestore_v1_Target_DocumentsTarget { + pb_size_t documents_count; + pb_bytes_array_t **documents; +/* @@protoc_insertion_point(struct:google_firestore_v1_Target_DocumentsTarget) */ +} google_firestore_v1_Target_DocumentsTarget; + +typedef struct _google_firestore_v1_WriteRequest { + pb_bytes_array_t *database; + pb_bytes_array_t *stream_id; + pb_size_t writes_count; + struct _google_firestore_v1_Write *writes; + pb_bytes_array_t *stream_token; + pb_size_t labels_count; + struct _google_firestore_v1_WriteRequest_LabelsEntry *labels; +/* @@protoc_insertion_point(struct:google_firestore_v1_WriteRequest) */ +} google_firestore_v1_WriteRequest; + +typedef struct _google_firestore_v1_WriteRequest_LabelsEntry { + pb_bytes_array_t *key; + pb_bytes_array_t *value; +/* @@protoc_insertion_point(struct:google_firestore_v1_WriteRequest_LabelsEntry) */ +} google_firestore_v1_WriteRequest_LabelsEntry; + +typedef struct _google_firestore_v1_BatchGetDocumentsRequest { + pb_bytes_array_t *database; + pb_size_t documents_count; + pb_bytes_array_t **documents; + google_firestore_v1_DocumentMask mask; + pb_size_t which_consistency_selector; + union { + pb_bytes_array_t *transaction; + google_firestore_v1_TransactionOptions new_transaction; + google_protobuf_Timestamp read_time; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_BatchGetDocumentsRequest) */ +} google_firestore_v1_BatchGetDocumentsRequest; + +typedef struct _google_firestore_v1_BatchGetDocumentsResponse { + pb_size_t which_result; + union { + google_firestore_v1_Document found; + pb_bytes_array_t *missing; + }; + pb_bytes_array_t *transaction; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_BatchGetDocumentsResponse) */ +} google_firestore_v1_BatchGetDocumentsResponse; + +typedef struct _google_firestore_v1_BeginTransactionRequest { + pb_bytes_array_t *database; + google_firestore_v1_TransactionOptions options; +/* @@protoc_insertion_point(struct:google_firestore_v1_BeginTransactionRequest) */ +} google_firestore_v1_BeginTransactionRequest; + +typedef struct _google_firestore_v1_CommitResponse { + pb_size_t write_results_count; + struct _google_firestore_v1_WriteResult *write_results; + google_protobuf_Timestamp commit_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_CommitResponse) */ +} google_firestore_v1_CommitResponse; + +typedef struct _google_firestore_v1_CreateDocumentRequest { + pb_bytes_array_t *parent; + pb_bytes_array_t *collection_id; + pb_bytes_array_t *document_id; + google_firestore_v1_Document document; + google_firestore_v1_DocumentMask mask; +/* @@protoc_insertion_point(struct:google_firestore_v1_CreateDocumentRequest) */ +} google_firestore_v1_CreateDocumentRequest; + +typedef struct _google_firestore_v1_DeleteDocumentRequest { + pb_bytes_array_t *name; + google_firestore_v1_Precondition current_document; +/* @@protoc_insertion_point(struct:google_firestore_v1_DeleteDocumentRequest) */ +} google_firestore_v1_DeleteDocumentRequest; + +typedef struct _google_firestore_v1_GetDocumentRequest { + pb_bytes_array_t *name; + google_firestore_v1_DocumentMask mask; + pb_size_t which_consistency_selector; + union { + pb_bytes_array_t *transaction; + google_protobuf_Timestamp read_time; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_GetDocumentRequest) */ +} google_firestore_v1_GetDocumentRequest; + +typedef struct _google_firestore_v1_ListCollectionIdsRequest { + pb_bytes_array_t *parent; + int32_t page_size; + pb_bytes_array_t *page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListCollectionIdsRequest) */ +} google_firestore_v1_ListCollectionIdsRequest; + +typedef struct _google_firestore_v1_ListDocumentsRequest { + pb_bytes_array_t *parent; + pb_bytes_array_t *collection_id; + int32_t page_size; + pb_bytes_array_t *page_token; + pb_bytes_array_t *order_by; + google_firestore_v1_DocumentMask mask; + pb_size_t which_consistency_selector; + union { + pb_bytes_array_t *transaction; + google_protobuf_Timestamp read_time; + }; + bool show_missing; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListDocumentsRequest) */ +} google_firestore_v1_ListDocumentsRequest; + +typedef struct _google_firestore_v1_RunQueryRequest { + pb_bytes_array_t *parent; + pb_size_t which_query_type; + union { + google_firestore_v1_StructuredQuery structured_query; + } query_type; + pb_size_t which_consistency_selector; + union { + pb_bytes_array_t *transaction; + google_firestore_v1_TransactionOptions new_transaction; + google_protobuf_Timestamp read_time; + } consistency_selector; +/* @@protoc_insertion_point(struct:google_firestore_v1_RunQueryRequest) */ +} google_firestore_v1_RunQueryRequest; + +typedef struct _google_firestore_v1_RunQueryResponse { + google_firestore_v1_Document document; + pb_bytes_array_t *transaction; + google_protobuf_Timestamp read_time; + int32_t skipped_results; +/* @@protoc_insertion_point(struct:google_firestore_v1_RunQueryResponse) */ +} google_firestore_v1_RunQueryResponse; + +typedef struct _google_firestore_v1_TargetChange { + google_firestore_v1_TargetChange_TargetChangeType target_change_type; + pb_size_t target_ids_count; + int32_t *target_ids; + google_rpc_Status cause; + pb_bytes_array_t *resume_token; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_TargetChange) */ +} google_firestore_v1_TargetChange; + +typedef struct _google_firestore_v1_Target_QueryTarget { + pb_bytes_array_t *parent; + pb_size_t which_query_type; + union { + google_firestore_v1_StructuredQuery structured_query; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_Target_QueryTarget) */ +} google_firestore_v1_Target_QueryTarget; + +typedef struct _google_firestore_v1_UpdateDocumentRequest { + google_firestore_v1_Document document; + google_firestore_v1_DocumentMask update_mask; + google_firestore_v1_DocumentMask mask; + google_firestore_v1_Precondition current_document; +/* @@protoc_insertion_point(struct:google_firestore_v1_UpdateDocumentRequest) */ +} google_firestore_v1_UpdateDocumentRequest; + +typedef struct _google_firestore_v1_WriteResponse { + pb_bytes_array_t *stream_id; + pb_bytes_array_t *stream_token; + pb_size_t write_results_count; + struct _google_firestore_v1_WriteResult *write_results; + google_protobuf_Timestamp commit_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_WriteResponse) */ +} google_firestore_v1_WriteResponse; + +typedef struct _google_firestore_v1_ListenResponse { + pb_size_t which_response_type; + union { + google_firestore_v1_TargetChange target_change; + google_firestore_v1_DocumentChange document_change; + google_firestore_v1_DocumentDelete document_delete; + google_firestore_v1_ExistenceFilter filter; + google_firestore_v1_DocumentRemove document_remove; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListenResponse) */ +} google_firestore_v1_ListenResponse; + +typedef struct _google_firestore_v1_Target { + pb_size_t which_target_type; + union { + google_firestore_v1_Target_QueryTarget query; + google_firestore_v1_Target_DocumentsTarget documents; + } target_type; + pb_size_t which_resume_type; + union { + pb_bytes_array_t *resume_token; + google_protobuf_Timestamp read_time; + } resume_type; + int32_t target_id; + bool once; +/* @@protoc_insertion_point(struct:google_firestore_v1_Target) */ +} google_firestore_v1_Target; + +typedef struct _google_firestore_v1_ListenRequest { + pb_bytes_array_t *database; + pb_size_t which_target_change; + union { + google_firestore_v1_Target add_target; + int32_t remove_target; + }; + pb_size_t labels_count; + struct _google_firestore_v1_ListenRequest_LabelsEntry *labels; +/* @@protoc_insertion_point(struct:google_firestore_v1_ListenRequest) */ +} google_firestore_v1_ListenRequest; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1_GetDocumentRequest_init_default {NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}} +#define google_firestore_v1_ListDocumentsRequest_init_default {NULL, NULL, 0, NULL, NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}, 0} +#define google_firestore_v1_ListDocumentsResponse_init_default {0, NULL, NULL} +#define google_firestore_v1_CreateDocumentRequest_init_default {NULL, NULL, NULL, google_firestore_v1_Document_init_default, google_firestore_v1_DocumentMask_init_default} +#define google_firestore_v1_UpdateDocumentRequest_init_default {google_firestore_v1_Document_init_default, google_firestore_v1_DocumentMask_init_default, google_firestore_v1_DocumentMask_init_default, google_firestore_v1_Precondition_init_default} +#define google_firestore_v1_DeleteDocumentRequest_init_default {NULL, google_firestore_v1_Precondition_init_default} +#define google_firestore_v1_BatchGetDocumentsRequest_init_default {NULL, 0, NULL, google_firestore_v1_DocumentMask_init_default, 0, {NULL}} +#define google_firestore_v1_BatchGetDocumentsResponse_init_default {0, {google_firestore_v1_Document_init_default}, NULL, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_BeginTransactionRequest_init_default {NULL, google_firestore_v1_TransactionOptions_init_default} +#define google_firestore_v1_BeginTransactionResponse_init_default {NULL} +#define google_firestore_v1_CommitRequest_init_default {NULL, 0, NULL, NULL} +#define google_firestore_v1_CommitResponse_init_default {0, NULL, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_RollbackRequest_init_default {NULL, NULL} +#define google_firestore_v1_RunQueryRequest_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}, 0, {NULL}} +#define google_firestore_v1_RunQueryResponse_init_default {google_firestore_v1_Document_init_default, NULL, google_protobuf_Timestamp_init_default, 0} +#define google_firestore_v1_WriteRequest_init_default {NULL, NULL, 0, NULL, NULL, 0, NULL} +#define google_firestore_v1_WriteRequest_LabelsEntry_init_default {NULL, NULL} +#define google_firestore_v1_WriteResponse_init_default {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_ListenRequest_init_default {NULL, 0, {google_firestore_v1_Target_init_default}, 0, NULL} +#define google_firestore_v1_ListenRequest_LabelsEntry_init_default {NULL, NULL} +#define google_firestore_v1_ListenResponse_init_default {0, {google_firestore_v1_TargetChange_init_default}} +#define google_firestore_v1_Target_init_default {0, {google_firestore_v1_Target_QueryTarget_init_default}, 0, {NULL}, 0, 0} +#define google_firestore_v1_Target_DocumentsTarget_init_default {0, NULL} +#define google_firestore_v1_Target_QueryTarget_init_default {NULL, 0, {google_firestore_v1_StructuredQuery_init_default}} +#define google_firestore_v1_TargetChange_init_default {_google_firestore_v1_TargetChange_TargetChangeType_MIN, 0, NULL, google_rpc_Status_init_default, NULL, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_ListCollectionIdsRequest_init_default {NULL, 0, NULL} +#define google_firestore_v1_ListCollectionIdsResponse_init_default {0, NULL, NULL} +#define google_firestore_v1_GetDocumentRequest_init_zero {NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}} +#define google_firestore_v1_ListDocumentsRequest_init_zero {NULL, NULL, 0, NULL, NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}, 0} +#define google_firestore_v1_ListDocumentsResponse_init_zero {0, NULL, NULL} +#define google_firestore_v1_CreateDocumentRequest_init_zero {NULL, NULL, NULL, google_firestore_v1_Document_init_zero, google_firestore_v1_DocumentMask_init_zero} +#define google_firestore_v1_UpdateDocumentRequest_init_zero {google_firestore_v1_Document_init_zero, google_firestore_v1_DocumentMask_init_zero, google_firestore_v1_DocumentMask_init_zero, google_firestore_v1_Precondition_init_zero} +#define google_firestore_v1_DeleteDocumentRequest_init_zero {NULL, google_firestore_v1_Precondition_init_zero} +#define google_firestore_v1_BatchGetDocumentsRequest_init_zero {NULL, 0, NULL, google_firestore_v1_DocumentMask_init_zero, 0, {NULL}} +#define google_firestore_v1_BatchGetDocumentsResponse_init_zero {0, {google_firestore_v1_Document_init_zero}, NULL, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_BeginTransactionRequest_init_zero {NULL, google_firestore_v1_TransactionOptions_init_zero} +#define google_firestore_v1_BeginTransactionResponse_init_zero {NULL} +#define google_firestore_v1_CommitRequest_init_zero {NULL, 0, NULL, NULL} +#define google_firestore_v1_CommitResponse_init_zero {0, NULL, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_RollbackRequest_init_zero {NULL, NULL} +#define google_firestore_v1_RunQueryRequest_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}, 0, {NULL}} +#define google_firestore_v1_RunQueryResponse_init_zero {google_firestore_v1_Document_init_zero, NULL, google_protobuf_Timestamp_init_zero, 0} +#define google_firestore_v1_WriteRequest_init_zero {NULL, NULL, 0, NULL, NULL, 0, NULL} +#define google_firestore_v1_WriteRequest_LabelsEntry_init_zero {NULL, NULL} +#define google_firestore_v1_WriteResponse_init_zero {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_ListenRequest_init_zero {NULL, 0, {google_firestore_v1_Target_init_zero}, 0, NULL} +#define google_firestore_v1_ListenRequest_LabelsEntry_init_zero {NULL, NULL} +#define google_firestore_v1_ListenResponse_init_zero {0, {google_firestore_v1_TargetChange_init_zero}} +#define google_firestore_v1_Target_init_zero {0, {google_firestore_v1_Target_QueryTarget_init_zero}, 0, {NULL}, 0, 0} +#define google_firestore_v1_Target_DocumentsTarget_init_zero {0, NULL} +#define google_firestore_v1_Target_QueryTarget_init_zero {NULL, 0, {google_firestore_v1_StructuredQuery_init_zero}} +#define google_firestore_v1_TargetChange_init_zero {_google_firestore_v1_TargetChange_TargetChangeType_MIN, 0, NULL, google_rpc_Status_init_zero, NULL, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_ListCollectionIdsRequest_init_zero {NULL, 0, NULL} +#define google_firestore_v1_ListCollectionIdsResponse_init_zero {0, NULL, NULL} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1_BeginTransactionResponse_transaction_tag 1 +#define google_firestore_v1_CommitRequest_database_tag 1 +#define google_firestore_v1_CommitRequest_writes_tag 2 +#define google_firestore_v1_CommitRequest_transaction_tag 3 +#define google_firestore_v1_ListCollectionIdsResponse_collection_ids_tag 1 +#define google_firestore_v1_ListCollectionIdsResponse_next_page_token_tag 2 +#define google_firestore_v1_ListDocumentsResponse_documents_tag 1 +#define google_firestore_v1_ListDocumentsResponse_next_page_token_tag 2 +#define google_firestore_v1_ListenRequest_LabelsEntry_key_tag 1 +#define google_firestore_v1_ListenRequest_LabelsEntry_value_tag 2 +#define google_firestore_v1_RollbackRequest_database_tag 1 +#define google_firestore_v1_RollbackRequest_transaction_tag 2 +#define google_firestore_v1_Target_DocumentsTarget_documents_tag 2 +#define google_firestore_v1_WriteRequest_database_tag 1 +#define google_firestore_v1_WriteRequest_stream_id_tag 2 +#define google_firestore_v1_WriteRequest_writes_tag 3 +#define google_firestore_v1_WriteRequest_stream_token_tag 4 +#define google_firestore_v1_WriteRequest_labels_tag 5 +#define google_firestore_v1_WriteRequest_LabelsEntry_key_tag 1 +#define google_firestore_v1_WriteRequest_LabelsEntry_value_tag 2 +#define google_firestore_v1_BatchGetDocumentsRequest_transaction_tag 4 +#define google_firestore_v1_BatchGetDocumentsRequest_new_transaction_tag 5 +#define google_firestore_v1_BatchGetDocumentsRequest_read_time_tag 7 +#define google_firestore_v1_BatchGetDocumentsRequest_database_tag 1 +#define google_firestore_v1_BatchGetDocumentsRequest_documents_tag 2 +#define google_firestore_v1_BatchGetDocumentsRequest_mask_tag 3 +#define google_firestore_v1_BatchGetDocumentsResponse_found_tag 1 +#define google_firestore_v1_BatchGetDocumentsResponse_missing_tag 2 +#define google_firestore_v1_BatchGetDocumentsResponse_transaction_tag 3 +#define google_firestore_v1_BatchGetDocumentsResponse_read_time_tag 4 +#define google_firestore_v1_BeginTransactionRequest_database_tag 1 +#define google_firestore_v1_BeginTransactionRequest_options_tag 2 +#define google_firestore_v1_CommitResponse_write_results_tag 1 +#define google_firestore_v1_CommitResponse_commit_time_tag 2 +#define google_firestore_v1_CreateDocumentRequest_parent_tag 1 +#define google_firestore_v1_CreateDocumentRequest_collection_id_tag 2 +#define google_firestore_v1_CreateDocumentRequest_document_id_tag 3 +#define google_firestore_v1_CreateDocumentRequest_document_tag 4 +#define google_firestore_v1_CreateDocumentRequest_mask_tag 5 +#define google_firestore_v1_DeleteDocumentRequest_name_tag 1 +#define google_firestore_v1_DeleteDocumentRequest_current_document_tag 2 +#define google_firestore_v1_GetDocumentRequest_transaction_tag 3 +#define google_firestore_v1_GetDocumentRequest_read_time_tag 5 +#define google_firestore_v1_GetDocumentRequest_name_tag 1 +#define google_firestore_v1_GetDocumentRequest_mask_tag 2 +#define google_firestore_v1_ListCollectionIdsRequest_parent_tag 1 +#define google_firestore_v1_ListCollectionIdsRequest_page_size_tag 2 +#define google_firestore_v1_ListCollectionIdsRequest_page_token_tag 3 +#define google_firestore_v1_ListDocumentsRequest_transaction_tag 8 +#define google_firestore_v1_ListDocumentsRequest_read_time_tag 10 +#define google_firestore_v1_ListDocumentsRequest_parent_tag 1 +#define google_firestore_v1_ListDocumentsRequest_collection_id_tag 2 +#define google_firestore_v1_ListDocumentsRequest_page_size_tag 3 +#define google_firestore_v1_ListDocumentsRequest_page_token_tag 4 +#define google_firestore_v1_ListDocumentsRequest_order_by_tag 6 +#define google_firestore_v1_ListDocumentsRequest_mask_tag 7 +#define google_firestore_v1_ListDocumentsRequest_show_missing_tag 12 +#define google_firestore_v1_RunQueryRequest_structured_query_tag 2 +#define google_firestore_v1_RunQueryRequest_transaction_tag 5 +#define google_firestore_v1_RunQueryRequest_new_transaction_tag 6 +#define google_firestore_v1_RunQueryRequest_read_time_tag 7 +#define google_firestore_v1_RunQueryRequest_parent_tag 1 +#define google_firestore_v1_RunQueryResponse_transaction_tag 2 +#define google_firestore_v1_RunQueryResponse_document_tag 1 +#define google_firestore_v1_RunQueryResponse_read_time_tag 3 +#define google_firestore_v1_RunQueryResponse_skipped_results_tag 4 +#define google_firestore_v1_TargetChange_target_change_type_tag 1 +#define google_firestore_v1_TargetChange_target_ids_tag 2 +#define google_firestore_v1_TargetChange_cause_tag 3 +#define google_firestore_v1_TargetChange_resume_token_tag 4 +#define google_firestore_v1_TargetChange_read_time_tag 6 +#define google_firestore_v1_Target_QueryTarget_structured_query_tag 2 +#define google_firestore_v1_Target_QueryTarget_parent_tag 1 +#define google_firestore_v1_UpdateDocumentRequest_document_tag 1 +#define google_firestore_v1_UpdateDocumentRequest_update_mask_tag 2 +#define google_firestore_v1_UpdateDocumentRequest_mask_tag 3 +#define google_firestore_v1_UpdateDocumentRequest_current_document_tag 4 +#define google_firestore_v1_WriteResponse_stream_id_tag 1 +#define google_firestore_v1_WriteResponse_stream_token_tag 2 +#define google_firestore_v1_WriteResponse_write_results_tag 3 +#define google_firestore_v1_WriteResponse_commit_time_tag 4 +#define google_firestore_v1_ListenResponse_target_change_tag 2 +#define google_firestore_v1_ListenResponse_document_change_tag 3 +#define google_firestore_v1_ListenResponse_document_delete_tag 4 +#define google_firestore_v1_ListenResponse_filter_tag 5 +#define google_firestore_v1_ListenResponse_document_remove_tag 6 +#define google_firestore_v1_Target_query_tag 2 +#define google_firestore_v1_Target_documents_tag 3 +#define google_firestore_v1_Target_resume_token_tag 4 +#define google_firestore_v1_Target_read_time_tag 11 +#define google_firestore_v1_Target_target_id_tag 5 +#define google_firestore_v1_Target_once_tag 6 +#define google_firestore_v1_ListenRequest_add_target_tag 2 +#define google_firestore_v1_ListenRequest_remove_target_tag 3 +#define google_firestore_v1_ListenRequest_database_tag 1 +#define google_firestore_v1_ListenRequest_labels_tag 4 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1_GetDocumentRequest_fields[5]; +extern const pb_field_t google_firestore_v1_ListDocumentsRequest_fields[10]; +extern const pb_field_t google_firestore_v1_ListDocumentsResponse_fields[3]; +extern const pb_field_t google_firestore_v1_CreateDocumentRequest_fields[6]; +extern const pb_field_t google_firestore_v1_UpdateDocumentRequest_fields[5]; +extern const pb_field_t google_firestore_v1_DeleteDocumentRequest_fields[3]; +extern const pb_field_t google_firestore_v1_BatchGetDocumentsRequest_fields[7]; +extern const pb_field_t google_firestore_v1_BatchGetDocumentsResponse_fields[5]; +extern const pb_field_t google_firestore_v1_BeginTransactionRequest_fields[3]; +extern const pb_field_t google_firestore_v1_BeginTransactionResponse_fields[2]; +extern const pb_field_t google_firestore_v1_CommitRequest_fields[4]; +extern const pb_field_t google_firestore_v1_CommitResponse_fields[3]; +extern const pb_field_t google_firestore_v1_RollbackRequest_fields[3]; +extern const pb_field_t google_firestore_v1_RunQueryRequest_fields[6]; +extern const pb_field_t google_firestore_v1_RunQueryResponse_fields[5]; +extern const pb_field_t google_firestore_v1_WriteRequest_fields[6]; +extern const pb_field_t google_firestore_v1_WriteRequest_LabelsEntry_fields[3]; +extern const pb_field_t google_firestore_v1_WriteResponse_fields[5]; +extern const pb_field_t google_firestore_v1_ListenRequest_fields[5]; +extern const pb_field_t google_firestore_v1_ListenRequest_LabelsEntry_fields[3]; +extern const pb_field_t google_firestore_v1_ListenResponse_fields[6]; +extern const pb_field_t google_firestore_v1_Target_fields[7]; +extern const pb_field_t google_firestore_v1_Target_DocumentsTarget_fields[2]; +extern const pb_field_t google_firestore_v1_Target_QueryTarget_fields[3]; +extern const pb_field_t google_firestore_v1_TargetChange_fields[6]; +extern const pb_field_t google_firestore_v1_ListCollectionIdsRequest_fields[4]; +extern const pb_field_t google_firestore_v1_ListCollectionIdsResponse_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1_GetDocumentRequest_size depends on runtime parameters */ +/* google_firestore_v1_ListDocumentsRequest_size depends on runtime parameters */ +/* google_firestore_v1_ListDocumentsResponse_size depends on runtime parameters */ +/* google_firestore_v1_CreateDocumentRequest_size depends on runtime parameters */ +#define google_firestore_v1_UpdateDocumentRequest_size (44 + google_firestore_v1_Document_size + google_firestore_v1_DocumentMask_size + google_firestore_v1_DocumentMask_size) +/* google_firestore_v1_DeleteDocumentRequest_size depends on runtime parameters */ +/* google_firestore_v1_BatchGetDocumentsRequest_size depends on runtime parameters */ +/* google_firestore_v1_BatchGetDocumentsResponse_size depends on runtime parameters */ +/* google_firestore_v1_BeginTransactionRequest_size depends on runtime parameters */ +/* google_firestore_v1_BeginTransactionResponse_size depends on runtime parameters */ +/* google_firestore_v1_CommitRequest_size depends on runtime parameters */ +/* google_firestore_v1_CommitResponse_size depends on runtime parameters */ +/* google_firestore_v1_RollbackRequest_size depends on runtime parameters */ +/* google_firestore_v1_RunQueryRequest_size depends on runtime parameters */ +/* google_firestore_v1_RunQueryResponse_size depends on runtime parameters */ +/* google_firestore_v1_WriteRequest_size depends on runtime parameters */ +/* google_firestore_v1_WriteRequest_LabelsEntry_size depends on runtime parameters */ +/* google_firestore_v1_WriteResponse_size depends on runtime parameters */ +/* google_firestore_v1_ListenRequest_size depends on runtime parameters */ +/* google_firestore_v1_ListenRequest_LabelsEntry_size depends on runtime parameters */ +#define google_firestore_v1_ListenResponse_size (0 + ((((google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) > google_firestore_v1_DocumentRemove_size ? (google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) : google_firestore_v1_DocumentRemove_size) > google_firestore_v1_DocumentDelete_size ? ((google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) > google_firestore_v1_DocumentRemove_size ? (google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) : google_firestore_v1_DocumentRemove_size) : google_firestore_v1_DocumentDelete_size) > 24 ? (((google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) > google_firestore_v1_DocumentRemove_size ? (google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) : google_firestore_v1_DocumentRemove_size) > google_firestore_v1_DocumentDelete_size ? ((google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) > google_firestore_v1_DocumentRemove_size ? (google_firestore_v1_TargetChange_size > google_firestore_v1_DocumentChange_size ? google_firestore_v1_TargetChange_size : google_firestore_v1_DocumentChange_size) : google_firestore_v1_DocumentRemove_size) : google_firestore_v1_DocumentDelete_size) : 24)) +/* google_firestore_v1_Target_size depends on runtime parameters */ +/* google_firestore_v1_Target_DocumentsTarget_size depends on runtime parameters */ +/* google_firestore_v1_Target_QueryTarget_size depends on runtime parameters */ +/* google_firestore_v1_TargetChange_size depends on runtime parameters */ +/* google_firestore_v1_ListCollectionIdsRequest_size depends on runtime parameters */ +/* google_firestore_v1_ListCollectionIdsResponse_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define FIRESTORE_MESSAGES \ + + +#endif + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc new file mode 100644 index 00000000000..7e63a72d212 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.cc @@ -0,0 +1,130 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9.1 */ + +#include "query.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1_StructuredQuery_fields[9] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery, select, select, &google_firestore_v1_StructuredQuery_Projection_fields), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery, from, select, &google_firestore_v1_StructuredQuery_CollectionSelector_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, where, from, &google_firestore_v1_StructuredQuery_Filter_fields), + PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery, order_by, where, &google_firestore_v1_StructuredQuery_Order_fields), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, limit, order_by, &google_protobuf_Int32Value_fields), + PB_FIELD( 6, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, offset, limit, 0), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, start_at, offset, &google_firestore_v1_Cursor_fields), + PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery, end_at, start_at, &google_firestore_v1_Cursor_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_CollectionSelector_fields[3] = { + PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_StructuredQuery_CollectionSelector, collection_id, collection_id, 0), + PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_CollectionSelector, all_descendants, collection_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_Filter_fields[4] = { + PB_ANONYMOUS_ONEOF_FIELD(filter_type, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_StructuredQuery_Filter, composite_filter, composite_filter, &google_firestore_v1_StructuredQuery_CompositeFilter_fields), + PB_ANONYMOUS_ONEOF_FIELD(filter_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredQuery_Filter, field_filter, field_filter, &google_firestore_v1_StructuredQuery_FieldFilter_fields), + PB_ANONYMOUS_ONEOF_FIELD(filter_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_StructuredQuery_Filter, unary_filter, unary_filter, &google_firestore_v1_StructuredQuery_UnaryFilter_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_CompositeFilter_fields[3] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_CompositeFilter, op, op, 0), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_StructuredQuery_CompositeFilter, filters, op, &google_firestore_v1_StructuredQuery_Filter_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_FieldFilter_fields[4] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_FieldFilter, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields), + PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_FieldFilter, op, field, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_FieldFilter, value, op, &google_firestore_v1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_UnaryFilter_fields[3] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_UnaryFilter, op, op, 0), + PB_ANONYMOUS_ONEOF_FIELD(operand_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1_StructuredQuery_UnaryFilter, field, op, &google_firestore_v1_StructuredQuery_FieldReference_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_Order_fields[3] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_StructuredQuery_Order, field, field, &google_firestore_v1_StructuredQuery_FieldReference_fields), + PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1_StructuredQuery_Order, direction, field, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_FieldReference_fields[2] = { + PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_StructuredQuery_FieldReference, field_path, field_path, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_StructuredQuery_Projection_fields[2] = { + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_StructuredQuery_Projection, fields, fields, &google_firestore_v1_StructuredQuery_FieldReference_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_Cursor_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1_Cursor, values, values, &google_firestore_v1_Value_fields), + PB_FIELD( 2, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1_Cursor, before, values, 0), + PB_LAST_FIELD +}; + + + + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_StructuredQuery, select) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, where) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, start_at) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, end_at) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery, limit) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, composite_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, field_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, unary_filter) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, field) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, value) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_UnaryFilter, field) < 65536 && pb_membersize(google_firestore_v1_StructuredQuery_Order, field) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_StructuredQuery_google_firestore_v1_StructuredQuery_CollectionSelector_google_firestore_v1_StructuredQuery_Filter_google_firestore_v1_StructuredQuery_CompositeFilter_google_firestore_v1_StructuredQuery_FieldFilter_google_firestore_v1_StructuredQuery_UnaryFilter_google_firestore_v1_StructuredQuery_Order_google_firestore_v1_StructuredQuery_FieldReference_google_firestore_v1_StructuredQuery_Projection_google_firestore_v1_Cursor) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_StructuredQuery, select) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, where) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, start_at) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, end_at) < 256 && pb_membersize(google_firestore_v1_StructuredQuery, limit) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, composite_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, field_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Filter, unary_filter) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, field) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_FieldFilter, value) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_UnaryFilter, field) < 256 && pb_membersize(google_firestore_v1_StructuredQuery_Order, field) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_StructuredQuery_google_firestore_v1_StructuredQuery_CollectionSelector_google_firestore_v1_StructuredQuery_Filter_google_firestore_v1_StructuredQuery_CompositeFilter_google_firestore_v1_StructuredQuery_FieldFilter_google_firestore_v1_StructuredQuery_UnaryFilter_google_firestore_v1_StructuredQuery_Order_google_firestore_v1_StructuredQuery_FieldReference_google_firestore_v1_StructuredQuery_Projection_google_firestore_v1_Cursor) +#endif + + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h new file mode 100644 index 00000000000..70a7de271bf --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/query.nanopb.h @@ -0,0 +1,246 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9.1 */ + +#ifndef PB_GOOGLE_FIRESTORE_V1_QUERY_NANOPB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1_QUERY_NANOPB_H_INCLUDED +#include + +#include "google/api/annotations.nanopb.h" + +#include "google/firestore/v1/document.nanopb.h" + +#include "google/protobuf/wrappers.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + +/* Enum definitions */ +typedef enum _google_firestore_v1_StructuredQuery_Direction { + google_firestore_v1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED = 0, + google_firestore_v1_StructuredQuery_Direction_ASCENDING = 1, + google_firestore_v1_StructuredQuery_Direction_DESCENDING = 2 +} google_firestore_v1_StructuredQuery_Direction; +#define _google_firestore_v1_StructuredQuery_Direction_MIN google_firestore_v1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED +#define _google_firestore_v1_StructuredQuery_Direction_MAX google_firestore_v1_StructuredQuery_Direction_DESCENDING +#define _google_firestore_v1_StructuredQuery_Direction_ARRAYSIZE ((google_firestore_v1_StructuredQuery_Direction)(google_firestore_v1_StructuredQuery_Direction_DESCENDING+1)) + +typedef enum _google_firestore_v1_StructuredQuery_CompositeFilter_Operator { + google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1_StructuredQuery_CompositeFilter_Operator_AND = 1 +} google_firestore_v1_StructuredQuery_CompositeFilter_Operator; +#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN google_firestore_v1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MAX google_firestore_v1_StructuredQuery_CompositeFilter_Operator_AND +#define _google_firestore_v1_StructuredQuery_CompositeFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_CompositeFilter_Operator)(google_firestore_v1_StructuredQuery_CompositeFilter_Operator_AND+1)) + +typedef enum _google_firestore_v1_StructuredQuery_FieldFilter_Operator { + google_firestore_v1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN = 1, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL = 2, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN = 3, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL = 4, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_EQUAL = 5, + google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS = 7 +} google_firestore_v1_StructuredQuery_FieldFilter_Operator; +#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN google_firestore_v1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MAX google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS +#define _google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_FieldFilter_Operator)(google_firestore_v1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS+1)) + +typedef enum _google_firestore_v1_StructuredQuery_UnaryFilter_Operator { + google_firestore_v1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NAN = 2, + google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NULL = 3 +} google_firestore_v1_StructuredQuery_UnaryFilter_Operator; +#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN google_firestore_v1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MAX google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NULL +#define _google_firestore_v1_StructuredQuery_UnaryFilter_Operator_ARRAYSIZE ((google_firestore_v1_StructuredQuery_UnaryFilter_Operator)(google_firestore_v1_StructuredQuery_UnaryFilter_Operator_IS_NULL+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1_StructuredQuery_FieldReference { + pb_bytes_array_t *field_path; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_FieldReference) */ +} google_firestore_v1_StructuredQuery_FieldReference; + +typedef struct _google_firestore_v1_StructuredQuery_Projection { + pb_size_t fields_count; + struct _google_firestore_v1_StructuredQuery_FieldReference *fields; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Projection) */ +} google_firestore_v1_StructuredQuery_Projection; + +typedef struct _google_firestore_v1_Cursor { + pb_size_t values_count; + struct _google_firestore_v1_Value *values; + bool before; +/* @@protoc_insertion_point(struct:google_firestore_v1_Cursor) */ +} google_firestore_v1_Cursor; + +typedef struct _google_firestore_v1_StructuredQuery_CollectionSelector { + pb_bytes_array_t *collection_id; + bool all_descendants; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_CollectionSelector) */ +} google_firestore_v1_StructuredQuery_CollectionSelector; + +typedef struct _google_firestore_v1_StructuredQuery_CompositeFilter { + google_firestore_v1_StructuredQuery_CompositeFilter_Operator op; + pb_size_t filters_count; + struct _google_firestore_v1_StructuredQuery_Filter *filters; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_CompositeFilter) */ +} google_firestore_v1_StructuredQuery_CompositeFilter; + +typedef struct _google_firestore_v1_StructuredQuery_FieldFilter { + google_firestore_v1_StructuredQuery_FieldReference field; + google_firestore_v1_StructuredQuery_FieldFilter_Operator op; + google_firestore_v1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_FieldFilter) */ +} google_firestore_v1_StructuredQuery_FieldFilter; + +typedef struct _google_firestore_v1_StructuredQuery_Order { + google_firestore_v1_StructuredQuery_FieldReference field; + google_firestore_v1_StructuredQuery_Direction direction; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Order) */ +} google_firestore_v1_StructuredQuery_Order; + +typedef struct _google_firestore_v1_StructuredQuery_UnaryFilter { + google_firestore_v1_StructuredQuery_UnaryFilter_Operator op; + pb_size_t which_operand_type; + union { + google_firestore_v1_StructuredQuery_FieldReference field; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_UnaryFilter) */ +} google_firestore_v1_StructuredQuery_UnaryFilter; + +typedef struct _google_firestore_v1_StructuredQuery_Filter { + pb_size_t which_filter_type; + union { + google_firestore_v1_StructuredQuery_CompositeFilter composite_filter; + google_firestore_v1_StructuredQuery_FieldFilter field_filter; + google_firestore_v1_StructuredQuery_UnaryFilter unary_filter; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery_Filter) */ +} google_firestore_v1_StructuredQuery_Filter; + +typedef struct _google_firestore_v1_StructuredQuery { + google_firestore_v1_StructuredQuery_Projection select; + pb_size_t from_count; + struct _google_firestore_v1_StructuredQuery_CollectionSelector *from; + google_firestore_v1_StructuredQuery_Filter where; + pb_size_t order_by_count; + struct _google_firestore_v1_StructuredQuery_Order *order_by; + google_protobuf_Int32Value limit; + int32_t offset; + google_firestore_v1_Cursor start_at; + google_firestore_v1_Cursor end_at; +/* @@protoc_insertion_point(struct:google_firestore_v1_StructuredQuery) */ +} google_firestore_v1_StructuredQuery; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1_StructuredQuery_init_default {google_firestore_v1_StructuredQuery_Projection_init_default, 0, NULL, google_firestore_v1_StructuredQuery_Filter_init_default, 0, NULL, google_protobuf_Int32Value_init_default, 0, google_firestore_v1_Cursor_init_default, google_firestore_v1_Cursor_init_default} +#define google_firestore_v1_StructuredQuery_CollectionSelector_init_default {NULL, 0} +#define google_firestore_v1_StructuredQuery_Filter_init_default {0, {google_firestore_v1_StructuredQuery_CompositeFilter_init_default}} +#define google_firestore_v1_StructuredQuery_CompositeFilter_init_default {_google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL} +#define google_firestore_v1_StructuredQuery_FieldFilter_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default, _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1_Value_init_default} +#define google_firestore_v1_StructuredQuery_UnaryFilter_init_default {_google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1_StructuredQuery_FieldReference_init_default}} +#define google_firestore_v1_StructuredQuery_Order_init_default {google_firestore_v1_StructuredQuery_FieldReference_init_default, _google_firestore_v1_StructuredQuery_Direction_MIN} +#define google_firestore_v1_StructuredQuery_FieldReference_init_default {NULL} +#define google_firestore_v1_StructuredQuery_Projection_init_default {0, NULL} +#define google_firestore_v1_Cursor_init_default {0, NULL, 0} +#define google_firestore_v1_StructuredQuery_init_zero {google_firestore_v1_StructuredQuery_Projection_init_zero, 0, NULL, google_firestore_v1_StructuredQuery_Filter_init_zero, 0, NULL, google_protobuf_Int32Value_init_zero, 0, google_firestore_v1_Cursor_init_zero, google_firestore_v1_Cursor_init_zero} +#define google_firestore_v1_StructuredQuery_CollectionSelector_init_zero {NULL, 0} +#define google_firestore_v1_StructuredQuery_Filter_init_zero {0, {google_firestore_v1_StructuredQuery_CompositeFilter_init_zero}} +#define google_firestore_v1_StructuredQuery_CompositeFilter_init_zero {_google_firestore_v1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL} +#define google_firestore_v1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1_Value_init_zero} +#define google_firestore_v1_StructuredQuery_UnaryFilter_init_zero {_google_firestore_v1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1_StructuredQuery_FieldReference_init_zero}} +#define google_firestore_v1_StructuredQuery_Order_init_zero {google_firestore_v1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1_StructuredQuery_Direction_MIN} +#define google_firestore_v1_StructuredQuery_FieldReference_init_zero {NULL} +#define google_firestore_v1_StructuredQuery_Projection_init_zero {0, NULL} +#define google_firestore_v1_Cursor_init_zero {0, NULL, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1_StructuredQuery_FieldReference_field_path_tag 2 +#define google_firestore_v1_StructuredQuery_Projection_fields_tag 2 +#define google_firestore_v1_Cursor_values_tag 1 +#define google_firestore_v1_Cursor_before_tag 2 +#define google_firestore_v1_StructuredQuery_CollectionSelector_collection_id_tag 2 +#define google_firestore_v1_StructuredQuery_CollectionSelector_all_descendants_tag 3 +#define google_firestore_v1_StructuredQuery_CompositeFilter_op_tag 1 +#define google_firestore_v1_StructuredQuery_CompositeFilter_filters_tag 2 +#define google_firestore_v1_StructuredQuery_FieldFilter_field_tag 1 +#define google_firestore_v1_StructuredQuery_FieldFilter_op_tag 2 +#define google_firestore_v1_StructuredQuery_FieldFilter_value_tag 3 +#define google_firestore_v1_StructuredQuery_Order_field_tag 1 +#define google_firestore_v1_StructuredQuery_Order_direction_tag 2 +#define google_firestore_v1_StructuredQuery_UnaryFilter_field_tag 2 +#define google_firestore_v1_StructuredQuery_UnaryFilter_op_tag 1 +#define google_firestore_v1_StructuredQuery_Filter_composite_filter_tag 1 +#define google_firestore_v1_StructuredQuery_Filter_field_filter_tag 2 +#define google_firestore_v1_StructuredQuery_Filter_unary_filter_tag 3 +#define google_firestore_v1_StructuredQuery_select_tag 1 +#define google_firestore_v1_StructuredQuery_from_tag 2 +#define google_firestore_v1_StructuredQuery_where_tag 3 +#define google_firestore_v1_StructuredQuery_order_by_tag 4 +#define google_firestore_v1_StructuredQuery_start_at_tag 7 +#define google_firestore_v1_StructuredQuery_end_at_tag 8 +#define google_firestore_v1_StructuredQuery_offset_tag 6 +#define google_firestore_v1_StructuredQuery_limit_tag 5 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1_StructuredQuery_fields[9]; +extern const pb_field_t google_firestore_v1_StructuredQuery_CollectionSelector_fields[3]; +extern const pb_field_t google_firestore_v1_StructuredQuery_Filter_fields[4]; +extern const pb_field_t google_firestore_v1_StructuredQuery_CompositeFilter_fields[3]; +extern const pb_field_t google_firestore_v1_StructuredQuery_FieldFilter_fields[4]; +extern const pb_field_t google_firestore_v1_StructuredQuery_UnaryFilter_fields[3]; +extern const pb_field_t google_firestore_v1_StructuredQuery_Order_fields[3]; +extern const pb_field_t google_firestore_v1_StructuredQuery_FieldReference_fields[2]; +extern const pb_field_t google_firestore_v1_StructuredQuery_Projection_fields[2]; +extern const pb_field_t google_firestore_v1_Cursor_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1_StructuredQuery_size depends on runtime parameters */ +/* google_firestore_v1_StructuredQuery_CollectionSelector_size depends on runtime parameters */ +#define google_firestore_v1_StructuredQuery_Filter_size (0 + (((google_firestore_v1_StructuredQuery_UnaryFilter_size > google_firestore_v1_StructuredQuery_CompositeFilter_size ? google_firestore_v1_StructuredQuery_UnaryFilter_size : google_firestore_v1_StructuredQuery_CompositeFilter_size) > google_firestore_v1_StructuredQuery_FieldFilter_size ? (google_firestore_v1_StructuredQuery_UnaryFilter_size > google_firestore_v1_StructuredQuery_CompositeFilter_size ? google_firestore_v1_StructuredQuery_UnaryFilter_size : google_firestore_v1_StructuredQuery_CompositeFilter_size) : google_firestore_v1_StructuredQuery_FieldFilter_size) > 0 ? ((google_firestore_v1_StructuredQuery_UnaryFilter_size > google_firestore_v1_StructuredQuery_CompositeFilter_size ? google_firestore_v1_StructuredQuery_UnaryFilter_size : google_firestore_v1_StructuredQuery_CompositeFilter_size) > google_firestore_v1_StructuredQuery_FieldFilter_size ? (google_firestore_v1_StructuredQuery_UnaryFilter_size > google_firestore_v1_StructuredQuery_CompositeFilter_size ? google_firestore_v1_StructuredQuery_UnaryFilter_size : google_firestore_v1_StructuredQuery_CompositeFilter_size) : google_firestore_v1_StructuredQuery_FieldFilter_size) : 0)) +/* google_firestore_v1_StructuredQuery_CompositeFilter_size depends on runtime parameters */ +#define google_firestore_v1_StructuredQuery_FieldFilter_size (14 + google_firestore_v1_StructuredQuery_FieldReference_size + google_firestore_v1_Value_size) +#define google_firestore_v1_StructuredQuery_UnaryFilter_size (2 + (google_firestore_v1_StructuredQuery_FieldReference_size > 0 ? google_firestore_v1_StructuredQuery_FieldReference_size : 0)) +#define google_firestore_v1_StructuredQuery_Order_size (8 + google_firestore_v1_StructuredQuery_FieldReference_size) +/* google_firestore_v1_StructuredQuery_FieldReference_size depends on runtime parameters */ +/* google_firestore_v1_StructuredQuery_Projection_size depends on runtime parameters */ +/* google_firestore_v1_Cursor_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define QUERY_MESSAGES \ + + +#endif + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc new file mode 100644 index 00000000000..98cb7da4f01 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.cc @@ -0,0 +1,120 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9.1 */ + +#include "write.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1_Write_fields[6] = { + PB_ANONYMOUS_ONEOF_FIELD(operation, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1_Write, update, update, &google_firestore_v1_Document_fields), + PB_ANONYMOUS_ONEOF_FIELD(operation, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1_Write, delete_, delete_, 0), + PB_ANONYMOUS_ONEOF_FIELD(operation, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_Write, transform, transform, &google_firestore_v1_DocumentTransform_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Write, update_mask, transform, &google_firestore_v1_DocumentMask_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_Write, current_document, update_mask, &google_firestore_v1_Precondition_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DocumentTransform_fields[3] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentTransform, document, document, 0), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentTransform, field_transforms, document, &google_firestore_v1_DocumentTransform_FieldTransform_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DocumentTransform_FieldTransform_fields[8] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentTransform_FieldTransform, field_path, field_path, 0), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 2, ENUM , ONEOF, STATIC , OTHER, google_firestore_v1_DocumentTransform_FieldTransform, set_to_server_value, field_path, 0), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, increment, field_path, &google_firestore_v1_Value_fields), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, maximum, field_path, &google_firestore_v1_Value_fields), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, minimum, field_path, &google_firestore_v1_Value_fields), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements, field_path, &google_firestore_v1_ArrayValue_fields), + PB_ANONYMOUS_ONEOF_FIELD(transform_type, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array, field_path, &google_firestore_v1_ArrayValue_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_WriteResult_fields[3] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_WriteResult, update_time, update_time, &google_protobuf_Timestamp_fields), + PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1_WriteResult, transform_results, update_time, &google_firestore_v1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DocumentChange_fields[4] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1_DocumentChange, document, document, &google_firestore_v1_Document_fields), + PB_FIELD( 5, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentChange, target_ids, document, 0), + PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentChange, removed_target_ids, target_ids, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DocumentDelete_fields[4] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentDelete, document, document, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DocumentDelete, read_time, document, &google_protobuf_Timestamp_fields), + PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentDelete, removed_target_ids, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_DocumentRemove_fields[4] = { + PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1_DocumentRemove, document, document, 0), + PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1_DocumentRemove, removed_target_ids, document, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1_DocumentRemove, read_time, removed_target_ids, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1_ExistenceFilter_fields[3] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_firestore_v1_ExistenceFilter, target_id, target_id, 0), + PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1_ExistenceFilter, count, target_id, 0), + PB_LAST_FIELD +}; + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Write, update) < 65536 && pb_membersize(google_firestore_v1_Write, transform) < 65536 && pb_membersize(google_firestore_v1_Write, update_mask) < 65536 && pb_membersize(google_firestore_v1_Write, current_document) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, increment) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, maximum) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, minimum) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements) < 65536 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array) < 65536 && pb_membersize(google_firestore_v1_WriteResult, update_time) < 65536 && pb_membersize(google_firestore_v1_DocumentChange, document) < 65536 && pb_membersize(google_firestore_v1_DocumentDelete, read_time) < 65536 && pb_membersize(google_firestore_v1_DocumentRemove, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1_Write_google_firestore_v1_DocumentTransform_google_firestore_v1_DocumentTransform_FieldTransform_google_firestore_v1_WriteResult_google_firestore_v1_DocumentChange_google_firestore_v1_DocumentDelete_google_firestore_v1_DocumentRemove_google_firestore_v1_ExistenceFilter) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1_Write, update) < 256 && pb_membersize(google_firestore_v1_Write, transform) < 256 && pb_membersize(google_firestore_v1_Write, update_mask) < 256 && pb_membersize(google_firestore_v1_Write, current_document) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, increment) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, maximum) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, minimum) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, append_missing_elements) < 256 && pb_membersize(google_firestore_v1_DocumentTransform_FieldTransform, remove_all_from_array) < 256 && pb_membersize(google_firestore_v1_WriteResult, update_time) < 256 && pb_membersize(google_firestore_v1_DocumentChange, document) < 256 && pb_membersize(google_firestore_v1_DocumentDelete, read_time) < 256 && pb_membersize(google_firestore_v1_DocumentRemove, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1_Write_google_firestore_v1_DocumentTransform_google_firestore_v1_DocumentTransform_FieldTransform_google_firestore_v1_WriteResult_google_firestore_v1_DocumentChange_google_firestore_v1_DocumentDelete_google_firestore_v1_DocumentRemove_google_firestore_v1_ExistenceFilter) +#endif + + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h new file mode 100644 index 00000000000..fb9c54e6c0b --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1/write.nanopb.h @@ -0,0 +1,204 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9.1 */ + +#ifndef PB_GOOGLE_FIRESTORE_V1_WRITE_NANOPB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1_WRITE_NANOPB_H_INCLUDED +#include + +#include "google/api/annotations.nanopb.h" + +#include "google/firestore/v1/common.nanopb.h" + +#include "google/firestore/v1/document.nanopb.h" + +#include "google/protobuf/timestamp.nanopb.h" + +namespace firebase { +namespace firestore { + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + +/* Enum definitions */ +typedef enum _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue { + google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED = 0, + google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME = 1 +} google_firestore_v1_DocumentTransform_FieldTransform_ServerValue; +#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED +#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MAX google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME +#define _google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_ARRAYSIZE ((google_firestore_v1_DocumentTransform_FieldTransform_ServerValue)(google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1_DocumentTransform { + pb_bytes_array_t *document; + pb_size_t field_transforms_count; + struct _google_firestore_v1_DocumentTransform_FieldTransform *field_transforms; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentTransform) */ +} google_firestore_v1_DocumentTransform; + +typedef struct _google_firestore_v1_DocumentChange { + google_firestore_v1_Document document; + pb_size_t target_ids_count; + int32_t *target_ids; + pb_size_t removed_target_ids_count; + int32_t *removed_target_ids; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentChange) */ +} google_firestore_v1_DocumentChange; + +typedef struct _google_firestore_v1_DocumentDelete { + pb_bytes_array_t *document; + google_protobuf_Timestamp read_time; + pb_size_t removed_target_ids_count; + int32_t *removed_target_ids; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentDelete) */ +} google_firestore_v1_DocumentDelete; + +typedef struct _google_firestore_v1_DocumentRemove { + pb_bytes_array_t *document; + pb_size_t removed_target_ids_count; + int32_t *removed_target_ids; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentRemove) */ +} google_firestore_v1_DocumentRemove; + +typedef struct _google_firestore_v1_DocumentTransform_FieldTransform { + pb_bytes_array_t *field_path; + pb_size_t which_transform_type; + union { + google_firestore_v1_DocumentTransform_FieldTransform_ServerValue set_to_server_value; + google_firestore_v1_Value increment; + google_firestore_v1_Value maximum; + google_firestore_v1_Value minimum; + google_firestore_v1_ArrayValue append_missing_elements; + google_firestore_v1_ArrayValue remove_all_from_array; + }; +/* @@protoc_insertion_point(struct:google_firestore_v1_DocumentTransform_FieldTransform) */ +} google_firestore_v1_DocumentTransform_FieldTransform; + +typedef struct _google_firestore_v1_ExistenceFilter { + int32_t target_id; + int32_t count; +/* @@protoc_insertion_point(struct:google_firestore_v1_ExistenceFilter) */ +} google_firestore_v1_ExistenceFilter; + +typedef struct _google_firestore_v1_Write { + pb_size_t which_operation; + union { + google_firestore_v1_Document update; + pb_bytes_array_t *delete_; + google_firestore_v1_DocumentTransform transform; + }; + google_firestore_v1_DocumentMask update_mask; + google_firestore_v1_Precondition current_document; +/* @@protoc_insertion_point(struct:google_firestore_v1_Write) */ +} google_firestore_v1_Write; + +typedef struct _google_firestore_v1_WriteResult { + google_protobuf_Timestamp update_time; + pb_size_t transform_results_count; + struct _google_firestore_v1_Value *transform_results; +/* @@protoc_insertion_point(struct:google_firestore_v1_WriteResult) */ +} google_firestore_v1_WriteResult; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1_Write_init_default {0, {google_firestore_v1_Document_init_default}, google_firestore_v1_DocumentMask_init_default, google_firestore_v1_Precondition_init_default} +#define google_firestore_v1_DocumentTransform_init_default {NULL, 0, NULL} +#define google_firestore_v1_DocumentTransform_FieldTransform_init_default {NULL, 0, {_google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1_WriteResult_init_default {google_protobuf_Timestamp_init_default, 0, NULL} +#define google_firestore_v1_DocumentChange_init_default {google_firestore_v1_Document_init_default, 0, NULL, 0, NULL} +#define google_firestore_v1_DocumentDelete_init_default {NULL, google_protobuf_Timestamp_init_default, 0, NULL} +#define google_firestore_v1_DocumentRemove_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default} +#define google_firestore_v1_ExistenceFilter_init_default {0, 0} +#define google_firestore_v1_Write_init_zero {0, {google_firestore_v1_Document_init_zero}, google_firestore_v1_DocumentMask_init_zero, google_firestore_v1_Precondition_init_zero} +#define google_firestore_v1_DocumentTransform_init_zero {NULL, 0, NULL} +#define google_firestore_v1_DocumentTransform_FieldTransform_init_zero {NULL, 0, {_google_firestore_v1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1_WriteResult_init_zero {google_protobuf_Timestamp_init_zero, 0, NULL} +#define google_firestore_v1_DocumentChange_init_zero {google_firestore_v1_Document_init_zero, 0, NULL, 0, NULL} +#define google_firestore_v1_DocumentDelete_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, NULL} +#define google_firestore_v1_DocumentRemove_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1_ExistenceFilter_init_zero {0, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1_DocumentTransform_document_tag 1 +#define google_firestore_v1_DocumentTransform_field_transforms_tag 2 +#define google_firestore_v1_DocumentChange_document_tag 1 +#define google_firestore_v1_DocumentChange_target_ids_tag 5 +#define google_firestore_v1_DocumentChange_removed_target_ids_tag 6 +#define google_firestore_v1_DocumentDelete_document_tag 1 +#define google_firestore_v1_DocumentDelete_removed_target_ids_tag 6 +#define google_firestore_v1_DocumentDelete_read_time_tag 4 +#define google_firestore_v1_DocumentRemove_document_tag 1 +#define google_firestore_v1_DocumentRemove_removed_target_ids_tag 2 +#define google_firestore_v1_DocumentRemove_read_time_tag 4 +#define google_firestore_v1_DocumentTransform_FieldTransform_set_to_server_value_tag 2 +#define google_firestore_v1_DocumentTransform_FieldTransform_increment_tag 3 +#define google_firestore_v1_DocumentTransform_FieldTransform_maximum_tag 4 +#define google_firestore_v1_DocumentTransform_FieldTransform_minimum_tag 5 +#define google_firestore_v1_DocumentTransform_FieldTransform_append_missing_elements_tag 6 +#define google_firestore_v1_DocumentTransform_FieldTransform_remove_all_from_array_tag 7 +#define google_firestore_v1_DocumentTransform_FieldTransform_field_path_tag 1 +#define google_firestore_v1_ExistenceFilter_target_id_tag 1 +#define google_firestore_v1_ExistenceFilter_count_tag 2 +#define google_firestore_v1_Write_update_tag 1 +#define google_firestore_v1_Write_delete_tag 2 +#define google_firestore_v1_Write_transform_tag 6 +#define google_firestore_v1_Write_update_mask_tag 3 +#define google_firestore_v1_Write_current_document_tag 4 +#define google_firestore_v1_WriteResult_update_time_tag 1 +#define google_firestore_v1_WriteResult_transform_results_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1_Write_fields[6]; +extern const pb_field_t google_firestore_v1_DocumentTransform_fields[3]; +extern const pb_field_t google_firestore_v1_DocumentTransform_FieldTransform_fields[8]; +extern const pb_field_t google_firestore_v1_WriteResult_fields[3]; +extern const pb_field_t google_firestore_v1_DocumentChange_fields[4]; +extern const pb_field_t google_firestore_v1_DocumentDelete_fields[4]; +extern const pb_field_t google_firestore_v1_DocumentRemove_fields[4]; +extern const pb_field_t google_firestore_v1_ExistenceFilter_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1_Write_size depends on runtime parameters */ +/* google_firestore_v1_DocumentTransform_size depends on runtime parameters */ +/* google_firestore_v1_DocumentTransform_FieldTransform_size depends on runtime parameters */ +/* google_firestore_v1_WriteResult_size depends on runtime parameters */ +/* google_firestore_v1_DocumentChange_size depends on runtime parameters */ +/* google_firestore_v1_DocumentDelete_size depends on runtime parameters */ +/* google_firestore_v1_DocumentRemove_size depends on runtime parameters */ +#define google_firestore_v1_ExistenceFilter_size 22 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define WRITE_MESSAGES \ + + +#endif + +} // namespace firestore +} // namespace firebase + +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h deleted file mode 100644 index 6e0a3d67da7..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9.1 */ - -#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_NANOPB_H_INCLUDED -#define PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_NANOPB_H_INCLUDED -#include - -#include "google/api/annotations.nanopb.h" - -#include "google/protobuf/timestamp.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - -/* Struct definitions */ -typedef struct _google_firestore_v1beta1_DocumentMask { - pb_size_t field_paths_count; - pb_bytes_array_t **field_paths; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentMask) */ -} google_firestore_v1beta1_DocumentMask; - -typedef struct _google_firestore_v1beta1_TransactionOptions_ReadWrite { - pb_bytes_array_t *retry_transaction; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions_ReadWrite) */ -} google_firestore_v1beta1_TransactionOptions_ReadWrite; - -typedef struct _google_firestore_v1beta1_Precondition { - pb_size_t which_condition_type; - union { - bool exists; - google_protobuf_Timestamp update_time; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Precondition) */ -} google_firestore_v1beta1_Precondition; - -typedef struct _google_firestore_v1beta1_TransactionOptions_ReadOnly { - pb_size_t which_consistency_selector; - union { - google_protobuf_Timestamp read_time; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions_ReadOnly) */ -} google_firestore_v1beta1_TransactionOptions_ReadOnly; - -typedef struct _google_firestore_v1beta1_TransactionOptions { - pb_size_t which_mode; - union { - google_firestore_v1beta1_TransactionOptions_ReadOnly read_only; - google_firestore_v1beta1_TransactionOptions_ReadWrite read_write; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions) */ -} google_firestore_v1beta1_TransactionOptions; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define google_firestore_v1beta1_DocumentMask_init_default {0, NULL} -#define google_firestore_v1beta1_Precondition_init_default {0, {0}} -#define google_firestore_v1beta1_TransactionOptions_init_default {0, {google_firestore_v1beta1_TransactionOptions_ReadOnly_init_default}} -#define google_firestore_v1beta1_TransactionOptions_ReadWrite_init_default {NULL} -#define google_firestore_v1beta1_TransactionOptions_ReadOnly_init_default {0, {google_protobuf_Timestamp_init_default}} -#define google_firestore_v1beta1_DocumentMask_init_zero {0, NULL} -#define google_firestore_v1beta1_Precondition_init_zero {0, {0}} -#define google_firestore_v1beta1_TransactionOptions_init_zero {0, {google_firestore_v1beta1_TransactionOptions_ReadOnly_init_zero}} -#define google_firestore_v1beta1_TransactionOptions_ReadWrite_init_zero {NULL} -#define google_firestore_v1beta1_TransactionOptions_ReadOnly_init_zero {0, {google_protobuf_Timestamp_init_zero}} - -/* Field tags (for use in manual encoding/decoding) */ -#define google_firestore_v1beta1_DocumentMask_field_paths_tag 1 -#define google_firestore_v1beta1_TransactionOptions_ReadWrite_retry_transaction_tag 1 -#define google_firestore_v1beta1_Precondition_exists_tag 1 -#define google_firestore_v1beta1_Precondition_update_time_tag 2 -#define google_firestore_v1beta1_TransactionOptions_ReadOnly_read_time_tag 2 -#define google_firestore_v1beta1_TransactionOptions_read_only_tag 2 -#define google_firestore_v1beta1_TransactionOptions_read_write_tag 3 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t google_firestore_v1beta1_DocumentMask_fields[2]; -extern const pb_field_t google_firestore_v1beta1_Precondition_fields[3]; -extern const pb_field_t google_firestore_v1beta1_TransactionOptions_fields[3]; -extern const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadWrite_fields[2]; -extern const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadOnly_fields[2]; - -/* Maximum encoded size of messages (where known) */ -/* google_firestore_v1beta1_DocumentMask_size depends on runtime parameters */ -#define google_firestore_v1beta1_Precondition_size 24 -#define google_firestore_v1beta1_TransactionOptions_size (0 + (google_firestore_v1beta1_TransactionOptions_ReadWrite_size > 26 ? google_firestore_v1beta1_TransactionOptions_ReadWrite_size : 26)) -/* google_firestore_v1beta1_TransactionOptions_ReadWrite_size depends on runtime parameters */ -#define google_firestore_v1beta1_TransactionOptions_ReadOnly_size 24 - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define COMMON_MESSAGES \ - - -#endif - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ - -#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.cc deleted file mode 100644 index ae1279db6d9..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9.1 */ - -#include "document.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - - -const pb_field_t google_firestore_v1beta1_Document_fields[5] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_Document, name, name, 0), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_Document, fields, name, &google_firestore_v1beta1_Document_FieldsEntry_fields), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document, create_time, fields, &google_protobuf_Timestamp_fields), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document, update_time, create_time, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Document_FieldsEntry_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_Document_FieldsEntry, key, key, 0), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document_FieldsEntry, value, key, &google_firestore_v1beta1_Value_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Value_fields[12] = { - PB_ANONYMOUS_ONEOF_FIELD(value_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Value, boolean_value, boolean_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 2, INT64 , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, integer_value, integer_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 3, DOUBLE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, double_value, double_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 5, BYTES , ONEOF, POINTER , UNION, google_firestore_v1beta1_Value, reference_value, reference_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, map_value, map_value, &google_firestore_v1beta1_MapValue_fields), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 8, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, geo_point_value, geo_point_value, &google_type_LatLng_fields), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 9, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, array_value, array_value, &google_firestore_v1beta1_ArrayValue_fields), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, timestamp_value, timestamp_value, &google_protobuf_Timestamp_fields), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 11, ENUM , ONEOF, STATIC , UNION, google_firestore_v1beta1_Value, null_value, null_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 17, BYTES , ONEOF, POINTER , UNION, google_firestore_v1beta1_Value, string_value, string_value, 0), - PB_ANONYMOUS_ONEOF_FIELD(value_type, 18, BYTES , ONEOF, POINTER , UNION, google_firestore_v1beta1_Value, bytes_value, bytes_value, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ArrayValue_fields[2] = { - PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_ArrayValue, values, values, &google_firestore_v1beta1_Value_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_MapValue_fields[2] = { - PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_MapValue, fields, fields, &google_firestore_v1beta1_MapValue_FieldsEntry_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_MapValue_FieldsEntry_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_MapValue_FieldsEntry, key, key, 0), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_MapValue_FieldsEntry, value, key, &google_firestore_v1beta1_Value_fields), - PB_LAST_FIELD -}; - - -/* Check that field information fits in pb_field_t */ -#if !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_32BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in 8 or 16 bit - * field descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Document, create_time) < 65536 && pb_membersize(google_firestore_v1beta1_Document, update_time) < 65536 && pb_membersize(google_firestore_v1beta1_Document_FieldsEntry, value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, map_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, geo_point_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, array_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, timestamp_value) < 65536 && pb_membersize(google_firestore_v1beta1_MapValue_FieldsEntry, value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_Document_google_firestore_v1beta1_Document_FieldsEntry_google_firestore_v1beta1_Value_google_firestore_v1beta1_ArrayValue_google_firestore_v1beta1_MapValue_google_firestore_v1beta1_MapValue_FieldsEntry) -#endif - -#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in the default - * 8 bit descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Document, create_time) < 256 && pb_membersize(google_firestore_v1beta1_Document, update_time) < 256 && pb_membersize(google_firestore_v1beta1_Document_FieldsEntry, value) < 256 && pb_membersize(google_firestore_v1beta1_Value, map_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, geo_point_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, array_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, timestamp_value) < 256 && pb_membersize(google_firestore_v1beta1_MapValue_FieldsEntry, value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_Document_google_firestore_v1beta1_Document_FieldsEntry_google_firestore_v1beta1_Value_google_firestore_v1beta1_ArrayValue_google_firestore_v1beta1_MapValue_google_firestore_v1beta1_MapValue_FieldsEntry) -#endif - - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h deleted file mode 100644 index 5dab4155a4e..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9.1 */ - -#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_NANOPB_H_INCLUDED -#define PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_NANOPB_H_INCLUDED -#include - -#include "google/api/annotations.nanopb.h" - -#include "google/protobuf/struct.nanopb.h" - -#include "google/protobuf/timestamp.nanopb.h" - -#include "google/type/latlng.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - -/* Struct definitions */ -typedef struct _google_firestore_v1beta1_ArrayValue { - pb_size_t values_count; - struct _google_firestore_v1beta1_Value *values; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ArrayValue) */ -} google_firestore_v1beta1_ArrayValue; - -typedef struct _google_firestore_v1beta1_MapValue { - pb_size_t fields_count; - struct _google_firestore_v1beta1_MapValue_FieldsEntry *fields; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_MapValue) */ -} google_firestore_v1beta1_MapValue; - -typedef struct _google_firestore_v1beta1_Document { - pb_bytes_array_t *name; - pb_size_t fields_count; - struct _google_firestore_v1beta1_Document_FieldsEntry *fields; - google_protobuf_Timestamp create_time; - google_protobuf_Timestamp update_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Document) */ -} google_firestore_v1beta1_Document; - -typedef struct _google_firestore_v1beta1_Value { - pb_size_t which_value_type; - union { - bool boolean_value; - int64_t integer_value; - double double_value; - pb_bytes_array_t *reference_value; - google_firestore_v1beta1_MapValue map_value; - google_type_LatLng geo_point_value; - google_firestore_v1beta1_ArrayValue array_value; - google_protobuf_Timestamp timestamp_value; - google_protobuf_NullValue null_value; - pb_bytes_array_t *string_value; - pb_bytes_array_t *bytes_value; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Value) */ -} google_firestore_v1beta1_Value; - -typedef struct _google_firestore_v1beta1_Document_FieldsEntry { - pb_bytes_array_t *key; - google_firestore_v1beta1_Value value; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Document_FieldsEntry) */ -} google_firestore_v1beta1_Document_FieldsEntry; - -typedef struct _google_firestore_v1beta1_MapValue_FieldsEntry { - pb_bytes_array_t *key; - google_firestore_v1beta1_Value value; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_MapValue_FieldsEntry) */ -} google_firestore_v1beta1_MapValue_FieldsEntry; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define google_firestore_v1beta1_Document_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_Document_FieldsEntry_init_default {NULL, google_firestore_v1beta1_Value_init_default} -#define google_firestore_v1beta1_Value_init_default {0, {0}} -#define google_firestore_v1beta1_ArrayValue_init_default {0, NULL} -#define google_firestore_v1beta1_MapValue_init_default {0, NULL} -#define google_firestore_v1beta1_MapValue_FieldsEntry_init_default {NULL, google_firestore_v1beta1_Value_init_default} -#define google_firestore_v1beta1_Document_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_Document_FieldsEntry_init_zero {NULL, google_firestore_v1beta1_Value_init_zero} -#define google_firestore_v1beta1_Value_init_zero {0, {0}} -#define google_firestore_v1beta1_ArrayValue_init_zero {0, NULL} -#define google_firestore_v1beta1_MapValue_init_zero {0, NULL} -#define google_firestore_v1beta1_MapValue_FieldsEntry_init_zero {NULL, google_firestore_v1beta1_Value_init_zero} - -/* Field tags (for use in manual encoding/decoding) */ -#define google_firestore_v1beta1_ArrayValue_values_tag 1 -#define google_firestore_v1beta1_MapValue_fields_tag 1 -#define google_firestore_v1beta1_Document_name_tag 1 -#define google_firestore_v1beta1_Document_fields_tag 2 -#define google_firestore_v1beta1_Document_create_time_tag 3 -#define google_firestore_v1beta1_Document_update_time_tag 4 -#define google_firestore_v1beta1_Value_boolean_value_tag 1 -#define google_firestore_v1beta1_Value_integer_value_tag 2 -#define google_firestore_v1beta1_Value_double_value_tag 3 -#define google_firestore_v1beta1_Value_reference_value_tag 5 -#define google_firestore_v1beta1_Value_map_value_tag 6 -#define google_firestore_v1beta1_Value_geo_point_value_tag 8 -#define google_firestore_v1beta1_Value_array_value_tag 9 -#define google_firestore_v1beta1_Value_timestamp_value_tag 10 -#define google_firestore_v1beta1_Value_null_value_tag 11 -#define google_firestore_v1beta1_Value_string_value_tag 17 -#define google_firestore_v1beta1_Value_bytes_value_tag 18 -#define google_firestore_v1beta1_Document_FieldsEntry_key_tag 1 -#define google_firestore_v1beta1_Document_FieldsEntry_value_tag 2 -#define google_firestore_v1beta1_MapValue_FieldsEntry_key_tag 1 -#define google_firestore_v1beta1_MapValue_FieldsEntry_value_tag 2 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t google_firestore_v1beta1_Document_fields[5]; -extern const pb_field_t google_firestore_v1beta1_Document_FieldsEntry_fields[3]; -extern const pb_field_t google_firestore_v1beta1_Value_fields[12]; -extern const pb_field_t google_firestore_v1beta1_ArrayValue_fields[2]; -extern const pb_field_t google_firestore_v1beta1_MapValue_fields[2]; -extern const pb_field_t google_firestore_v1beta1_MapValue_FieldsEntry_fields[3]; - -/* Maximum encoded size of messages (where known) */ -/* google_firestore_v1beta1_Document_size depends on runtime parameters */ -/* google_firestore_v1beta1_Document_FieldsEntry_size depends on runtime parameters */ -/* google_firestore_v1beta1_Value_size depends on runtime parameters */ -/* google_firestore_v1beta1_ArrayValue_size depends on runtime parameters */ -/* google_firestore_v1beta1_MapValue_size depends on runtime parameters */ -/* google_firestore_v1beta1_MapValue_FieldsEntry_size depends on runtime parameters */ - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define DOCUMENT_MESSAGES \ - - -#endif - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ - -#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.cc deleted file mode 100644 index ab9937e540e..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.cc +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9.1 */ - -#include "firestore.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - - -const pb_field_t google_firestore_v1beta1_GetDocumentRequest_fields[5] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_GetDocumentRequest, name, name, 0), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_GetDocumentRequest, mask, name, &google_firestore_v1beta1_DocumentMask_fields), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 3, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1beta1_GetDocumentRequest, transaction, mask, 0), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_GetDocumentRequest, read_time, mask, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListDocumentsRequest_fields[10] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_ListDocumentsRequest, parent, parent, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListDocumentsRequest, collection_id, parent, 0), - PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, page_size, collection_id, 0), - PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListDocumentsRequest, page_token, page_size, 0), - PB_FIELD( 6, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListDocumentsRequest, order_by, page_token, 0), - PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, mask, order_by, &google_firestore_v1beta1_DocumentMask_fields), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 8, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1beta1_ListDocumentsRequest, transaction, mask, 0), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 10, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields), - PB_FIELD( 12, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, show_missing, read_time, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListDocumentsResponse_fields[3] = { - PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_ListDocumentsResponse, documents, documents, &google_firestore_v1beta1_Document_fields), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListDocumentsResponse, next_page_token, documents, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_CreateDocumentRequest_fields[6] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_CreateDocumentRequest, parent, parent, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_CreateDocumentRequest, collection_id, parent, 0), - PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_CreateDocumentRequest, document_id, collection_id, 0), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CreateDocumentRequest, document, document_id, &google_firestore_v1beta1_Document_fields), - PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CreateDocumentRequest, mask, document, &google_firestore_v1beta1_DocumentMask_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_UpdateDocumentRequest_fields[5] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_UpdateDocumentRequest, document, document, &google_firestore_v1beta1_Document_fields), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, update_mask, document, &google_firestore_v1beta1_DocumentMask_fields), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, mask, update_mask, &google_firestore_v1beta1_DocumentMask_fields), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, current_document, mask, &google_firestore_v1beta1_Precondition_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DeleteDocumentRequest_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_DeleteDocumentRequest, name, name, 0), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DeleteDocumentRequest, current_document, name, &google_firestore_v1beta1_Precondition_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_BatchGetDocumentsRequest_fields[7] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_BatchGetDocumentsRequest, database, database, 0), - PB_FIELD( 2, BYTES , REPEATED, POINTER , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, documents, database, 0), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, mask, documents, &google_firestore_v1beta1_DocumentMask_fields), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, transaction, mask, 0), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction, mask, &google_firestore_v1beta1_TransactionOptions_fields), - PB_ANONYMOUS_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_BatchGetDocumentsRequest, read_time, mask, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_BatchGetDocumentsResponse_fields[5] = { - PB_ANONYMOUS_ONEOF_FIELD(result, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_BatchGetDocumentsResponse, found, found, &google_firestore_v1beta1_Document_fields), - PB_ANONYMOUS_ONEOF_FIELD(result, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1beta1_BatchGetDocumentsResponse, missing, missing, 0), - PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_BatchGetDocumentsResponse, transaction, missing, 0), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsResponse, read_time, transaction, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_BeginTransactionRequest_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_BeginTransactionRequest, database, database, 0), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BeginTransactionRequest, options, database, &google_firestore_v1beta1_TransactionOptions_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_BeginTransactionResponse_fields[2] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_BeginTransactionResponse, transaction, transaction, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_CommitRequest_fields[4] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_CommitRequest, database, database, 0), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_CommitRequest, writes, database, &google_firestore_v1beta1_Write_fields), - PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_CommitRequest, transaction, writes, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_CommitResponse_fields[3] = { - PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_CommitResponse, write_results, write_results, &google_firestore_v1beta1_WriteResult_fields), - PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CommitResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_RollbackRequest_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_RollbackRequest, database, database, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_RollbackRequest, transaction, database, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_RunQueryRequest_fields[6] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_RunQueryRequest, parent, parent, 0), - PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_RunQueryRequest, structured_query, parent, &google_firestore_v1beta1_StructuredQuery_fields), - PB_ONEOF_FIELD(consistency_selector, 5, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1beta1_RunQueryRequest, transaction, query_type.structured_query, 0), - PB_ONEOF_FIELD(consistency_selector, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_RunQueryRequest, new_transaction, query_type.structured_query, &google_firestore_v1beta1_TransactionOptions_fields), - PB_ONEOF_FIELD(consistency_selector, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_RunQueryRequest, read_time, query_type.structured_query, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_RunQueryResponse_fields[5] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_RunQueryResponse, document, document, &google_firestore_v1beta1_Document_fields), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_RunQueryResponse, transaction, document, 0), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields), - PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryResponse, skipped_results, read_time, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_WriteRequest_fields[6] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_WriteRequest, database, database, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_WriteRequest, stream_id, database, 0), - PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_WriteRequest, writes, stream_id, &google_firestore_v1beta1_Write_fields), - PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_WriteRequest, stream_token, writes, 0), - PB_FIELD( 5, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_WriteRequest, labels, stream_token, &google_firestore_v1beta1_WriteRequest_LabelsEntry_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_WriteRequest_LabelsEntry_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_WriteRequest_LabelsEntry, key, key, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_WriteRequest_LabelsEntry, value, key, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_WriteResponse_fields[5] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_WriteResponse, stream_id, stream_id, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_WriteResponse, stream_token, stream_id, 0), - PB_FIELD( 3, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_WriteResponse, write_results, stream_token, &google_firestore_v1beta1_WriteResult_fields), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_WriteResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListenRequest_fields[5] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_ListenRequest, database, database, 0), - PB_ANONYMOUS_ONEOF_FIELD(target_change, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_ListenRequest, add_target, database, &google_firestore_v1beta1_Target_fields), - PB_ANONYMOUS_ONEOF_FIELD(target_change, 3, INT32 , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenRequest, remove_target, database, 0), - PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_ListenRequest, labels, remove_target, &google_firestore_v1beta1_ListenRequest_LabelsEntry_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListenRequest_LabelsEntry_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_ListenRequest_LabelsEntry, key, key, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListenRequest_LabelsEntry, value, key, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListenResponse_fields[6] = { - PB_ANONYMOUS_ONEOF_FIELD(response_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_ListenResponse, target_change, target_change, &google_firestore_v1beta1_TargetChange_fields), - PB_ANONYMOUS_ONEOF_FIELD(response_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_change, document_change, &google_firestore_v1beta1_DocumentChange_fields), - PB_ANONYMOUS_ONEOF_FIELD(response_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_delete, document_delete, &google_firestore_v1beta1_DocumentDelete_fields), - PB_ANONYMOUS_ONEOF_FIELD(response_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, filter, filter, &google_firestore_v1beta1_ExistenceFilter_fields), - PB_ANONYMOUS_ONEOF_FIELD(response_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_remove, document_remove, &google_firestore_v1beta1_DocumentRemove_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Target_fields[7] = { - PB_ONEOF_FIELD(target_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Target, query, query, &google_firestore_v1beta1_Target_QueryTarget_fields), - PB_ONEOF_FIELD(target_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Target, documents, documents, &google_firestore_v1beta1_Target_DocumentsTarget_fields), - PB_ONEOF_FIELD(resume_type, 4, BYTES , ONEOF, POINTER , OTHER, google_firestore_v1beta1_Target, resume_token, target_type.documents, 0), - PB_ONEOF_FIELD(resume_type, 11, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Target, read_time, target_type.documents, &google_protobuf_Timestamp_fields), - PB_FIELD( 5, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Target, target_id, resume_type.read_time, 0), - PB_FIELD( 6, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Target, once, target_id, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Target_DocumentsTarget_fields[2] = { - PB_FIELD( 2, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1beta1_Target_DocumentsTarget, documents, documents, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Target_QueryTarget_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_Target_QueryTarget, parent, parent, 0), - PB_ANONYMOUS_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_Target_QueryTarget, structured_query, parent, &google_firestore_v1beta1_StructuredQuery_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_TargetChange_fields[6] = { - PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_TargetChange, target_change_type, target_change_type, 0), - PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1beta1_TargetChange, target_ids, target_change_type, 0), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_TargetChange, cause, target_ids, &google_rpc_Status_fields), - PB_FIELD( 4, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_TargetChange, resume_token, cause, 0), - PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_TargetChange, read_time, resume_token, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListCollectionIdsRequest_fields[4] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_ListCollectionIdsRequest, parent, parent, 0), - PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListCollectionIdsRequest, page_size, parent, 0), - PB_FIELD( 3, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListCollectionIdsRequest, page_token, page_size, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ListCollectionIdsResponse_fields[3] = { - PB_FIELD( 1, BYTES , REPEATED, POINTER , FIRST, google_firestore_v1beta1_ListCollectionIdsResponse, collection_ids, collection_ids, 0), - PB_FIELD( 2, BYTES , SINGULAR, POINTER , OTHER, google_firestore_v1beta1_ListCollectionIdsResponse, next_page_token, collection_ids, 0), - PB_LAST_FIELD -}; - - - -/* Check that field information fits in pb_field_t */ -#if !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_32BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in 8 or 16 bit - * field descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_GetDocumentRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_GetDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, update_mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_DeleteDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, found) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_BeginTransactionRequest, options) < 65536 && pb_membersize(google_firestore_v1beta1_CommitResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, query_type.structured_query) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, consistency_selector.new_transaction) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, consistency_selector.read_time) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, document) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_WriteResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1beta1_ListenRequest, add_target) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, target_change) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_change) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_delete) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, filter) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_remove) < 65536 && pb_membersize(google_firestore_v1beta1_Target, target_type.query) < 65536 && pb_membersize(google_firestore_v1beta1_Target, target_type.documents) < 65536 && pb_membersize(google_firestore_v1beta1_Target, resume_type.read_time) < 65536 && pb_membersize(google_firestore_v1beta1_Target_QueryTarget, structured_query) < 65536 && pb_membersize(google_firestore_v1beta1_TargetChange, cause) < 65536 && pb_membersize(google_firestore_v1beta1_TargetChange, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_GetDocumentRequest_google_firestore_v1beta1_ListDocumentsRequest_google_firestore_v1beta1_ListDocumentsResponse_google_firestore_v1beta1_CreateDocumentRequest_google_firestore_v1beta1_UpdateDocumentRequest_google_firestore_v1beta1_DeleteDocumentRequest_google_firestore_v1beta1_BatchGetDocumentsRequest_google_firestore_v1beta1_BatchGetDocumentsResponse_google_firestore_v1beta1_BeginTransactionRequest_google_firestore_v1beta1_BeginTransactionResponse_google_firestore_v1beta1_CommitRequest_google_firestore_v1beta1_CommitResponse_google_firestore_v1beta1_RollbackRequest_google_firestore_v1beta1_RunQueryRequest_google_firestore_v1beta1_RunQueryResponse_google_firestore_v1beta1_WriteRequest_google_firestore_v1beta1_WriteRequest_LabelsEntry_google_firestore_v1beta1_WriteResponse_google_firestore_v1beta1_ListenRequest_google_firestore_v1beta1_ListenRequest_LabelsEntry_google_firestore_v1beta1_ListenResponse_google_firestore_v1beta1_Target_google_firestore_v1beta1_Target_DocumentsTarget_google_firestore_v1beta1_Target_QueryTarget_google_firestore_v1beta1_TargetChange_google_firestore_v1beta1_ListCollectionIdsRequest_google_firestore_v1beta1_ListCollectionIdsResponse) -#endif - -#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in the default - * 8 bit descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_GetDocumentRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_GetDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, update_mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1beta1_DeleteDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, found) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, read_time) < 256 && pb_membersize(google_firestore_v1beta1_BeginTransactionRequest, options) < 256 && pb_membersize(google_firestore_v1beta1_CommitResponse, commit_time) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, query_type.structured_query) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, consistency_selector.new_transaction) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, consistency_selector.read_time) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, document) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, read_time) < 256 && pb_membersize(google_firestore_v1beta1_WriteResponse, commit_time) < 256 && pb_membersize(google_firestore_v1beta1_ListenRequest, add_target) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, target_change) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_change) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_delete) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, filter) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, document_remove) < 256 && pb_membersize(google_firestore_v1beta1_Target, target_type.query) < 256 && pb_membersize(google_firestore_v1beta1_Target, target_type.documents) < 256 && pb_membersize(google_firestore_v1beta1_Target, resume_type.read_time) < 256 && pb_membersize(google_firestore_v1beta1_Target_QueryTarget, structured_query) < 256 && pb_membersize(google_firestore_v1beta1_TargetChange, cause) < 256 && pb_membersize(google_firestore_v1beta1_TargetChange, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_GetDocumentRequest_google_firestore_v1beta1_ListDocumentsRequest_google_firestore_v1beta1_ListDocumentsResponse_google_firestore_v1beta1_CreateDocumentRequest_google_firestore_v1beta1_UpdateDocumentRequest_google_firestore_v1beta1_DeleteDocumentRequest_google_firestore_v1beta1_BatchGetDocumentsRequest_google_firestore_v1beta1_BatchGetDocumentsResponse_google_firestore_v1beta1_BeginTransactionRequest_google_firestore_v1beta1_BeginTransactionResponse_google_firestore_v1beta1_CommitRequest_google_firestore_v1beta1_CommitResponse_google_firestore_v1beta1_RollbackRequest_google_firestore_v1beta1_RunQueryRequest_google_firestore_v1beta1_RunQueryResponse_google_firestore_v1beta1_WriteRequest_google_firestore_v1beta1_WriteRequest_LabelsEntry_google_firestore_v1beta1_WriteResponse_google_firestore_v1beta1_ListenRequest_google_firestore_v1beta1_ListenRequest_LabelsEntry_google_firestore_v1beta1_ListenResponse_google_firestore_v1beta1_Target_google_firestore_v1beta1_Target_DocumentsTarget_google_firestore_v1beta1_Target_QueryTarget_google_firestore_v1beta1_TargetChange_google_firestore_v1beta1_ListCollectionIdsRequest_google_firestore_v1beta1_ListCollectionIdsResponse) -#endif - - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h deleted file mode 100644 index af1b6b8af6e..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h +++ /dev/null @@ -1,537 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9.1 */ - -#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_NANOPB_H_INCLUDED -#define PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_NANOPB_H_INCLUDED -#include - -#include "google/api/annotations.nanopb.h" - -#include "google/firestore/v1beta1/common.nanopb.h" - -#include "google/firestore/v1beta1/document.nanopb.h" - -#include "google/firestore/v1beta1/query.nanopb.h" - -#include "google/firestore/v1beta1/write.nanopb.h" - -#include "google/protobuf/empty.nanopb.h" - -#include "google/protobuf/timestamp.nanopb.h" - -#include "google/rpc/status.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - -/* Enum definitions */ -typedef enum _google_firestore_v1beta1_TargetChange_TargetChangeType { - google_firestore_v1beta1_TargetChange_TargetChangeType_NO_CHANGE = 0, - google_firestore_v1beta1_TargetChange_TargetChangeType_ADD = 1, - google_firestore_v1beta1_TargetChange_TargetChangeType_REMOVE = 2, - google_firestore_v1beta1_TargetChange_TargetChangeType_CURRENT = 3, - google_firestore_v1beta1_TargetChange_TargetChangeType_RESET = 4 -} google_firestore_v1beta1_TargetChange_TargetChangeType; -#define _google_firestore_v1beta1_TargetChange_TargetChangeType_MIN google_firestore_v1beta1_TargetChange_TargetChangeType_NO_CHANGE -#define _google_firestore_v1beta1_TargetChange_TargetChangeType_MAX google_firestore_v1beta1_TargetChange_TargetChangeType_RESET -#define _google_firestore_v1beta1_TargetChange_TargetChangeType_ARRAYSIZE ((google_firestore_v1beta1_TargetChange_TargetChangeType)(google_firestore_v1beta1_TargetChange_TargetChangeType_RESET+1)) - -/* Struct definitions */ -typedef struct _google_firestore_v1beta1_BeginTransactionResponse { - pb_bytes_array_t *transaction; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BeginTransactionResponse) */ -} google_firestore_v1beta1_BeginTransactionResponse; - -typedef struct _google_firestore_v1beta1_CommitRequest { - pb_bytes_array_t *database; - pb_size_t writes_count; - struct _google_firestore_v1beta1_Write *writes; - pb_bytes_array_t *transaction; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CommitRequest) */ -} google_firestore_v1beta1_CommitRequest; - -typedef struct _google_firestore_v1beta1_ListCollectionIdsResponse { - pb_size_t collection_ids_count; - pb_bytes_array_t **collection_ids; - pb_bytes_array_t *next_page_token; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListCollectionIdsResponse) */ -} google_firestore_v1beta1_ListCollectionIdsResponse; - -typedef struct _google_firestore_v1beta1_ListDocumentsResponse { - pb_size_t documents_count; - struct _google_firestore_v1beta1_Document *documents; - pb_bytes_array_t *next_page_token; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListDocumentsResponse) */ -} google_firestore_v1beta1_ListDocumentsResponse; - -typedef struct _google_firestore_v1beta1_ListenRequest_LabelsEntry { - pb_bytes_array_t *key; - pb_bytes_array_t *value; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenRequest_LabelsEntry) */ -} google_firestore_v1beta1_ListenRequest_LabelsEntry; - -typedef struct _google_firestore_v1beta1_RollbackRequest { - pb_bytes_array_t *database; - pb_bytes_array_t *transaction; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RollbackRequest) */ -} google_firestore_v1beta1_RollbackRequest; - -typedef struct _google_firestore_v1beta1_Target_DocumentsTarget { - pb_size_t documents_count; - pb_bytes_array_t **documents; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target_DocumentsTarget) */ -} google_firestore_v1beta1_Target_DocumentsTarget; - -typedef struct _google_firestore_v1beta1_WriteRequest { - pb_bytes_array_t *database; - pb_bytes_array_t *stream_id; - pb_size_t writes_count; - struct _google_firestore_v1beta1_Write *writes; - pb_bytes_array_t *stream_token; - pb_size_t labels_count; - struct _google_firestore_v1beta1_WriteRequest_LabelsEntry *labels; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteRequest) */ -} google_firestore_v1beta1_WriteRequest; - -typedef struct _google_firestore_v1beta1_WriteRequest_LabelsEntry { - pb_bytes_array_t *key; - pb_bytes_array_t *value; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteRequest_LabelsEntry) */ -} google_firestore_v1beta1_WriteRequest_LabelsEntry; - -typedef struct _google_firestore_v1beta1_BatchGetDocumentsRequest { - pb_bytes_array_t *database; - pb_size_t documents_count; - pb_bytes_array_t **documents; - google_firestore_v1beta1_DocumentMask mask; - pb_size_t which_consistency_selector; - union { - pb_bytes_array_t *transaction; - google_firestore_v1beta1_TransactionOptions new_transaction; - google_protobuf_Timestamp read_time; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BatchGetDocumentsRequest) */ -} google_firestore_v1beta1_BatchGetDocumentsRequest; - -typedef struct _google_firestore_v1beta1_BatchGetDocumentsResponse { - pb_size_t which_result; - union { - google_firestore_v1beta1_Document found; - pb_bytes_array_t *missing; - }; - pb_bytes_array_t *transaction; - google_protobuf_Timestamp read_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BatchGetDocumentsResponse) */ -} google_firestore_v1beta1_BatchGetDocumentsResponse; - -typedef struct _google_firestore_v1beta1_BeginTransactionRequest { - pb_bytes_array_t *database; - google_firestore_v1beta1_TransactionOptions options; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BeginTransactionRequest) */ -} google_firestore_v1beta1_BeginTransactionRequest; - -typedef struct _google_firestore_v1beta1_CommitResponse { - pb_size_t write_results_count; - struct _google_firestore_v1beta1_WriteResult *write_results; - google_protobuf_Timestamp commit_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CommitResponse) */ -} google_firestore_v1beta1_CommitResponse; - -typedef struct _google_firestore_v1beta1_CreateDocumentRequest { - pb_bytes_array_t *parent; - pb_bytes_array_t *collection_id; - pb_bytes_array_t *document_id; - google_firestore_v1beta1_Document document; - google_firestore_v1beta1_DocumentMask mask; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CreateDocumentRequest) */ -} google_firestore_v1beta1_CreateDocumentRequest; - -typedef struct _google_firestore_v1beta1_DeleteDocumentRequest { - pb_bytes_array_t *name; - google_firestore_v1beta1_Precondition current_document; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DeleteDocumentRequest) */ -} google_firestore_v1beta1_DeleteDocumentRequest; - -typedef struct _google_firestore_v1beta1_GetDocumentRequest { - pb_bytes_array_t *name; - google_firestore_v1beta1_DocumentMask mask; - pb_size_t which_consistency_selector; - union { - pb_bytes_array_t *transaction; - google_protobuf_Timestamp read_time; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_GetDocumentRequest) */ -} google_firestore_v1beta1_GetDocumentRequest; - -typedef struct _google_firestore_v1beta1_ListCollectionIdsRequest { - pb_bytes_array_t *parent; - int32_t page_size; - pb_bytes_array_t *page_token; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListCollectionIdsRequest) */ -} google_firestore_v1beta1_ListCollectionIdsRequest; - -typedef struct _google_firestore_v1beta1_ListDocumentsRequest { - pb_bytes_array_t *parent; - pb_bytes_array_t *collection_id; - int32_t page_size; - pb_bytes_array_t *page_token; - pb_bytes_array_t *order_by; - google_firestore_v1beta1_DocumentMask mask; - pb_size_t which_consistency_selector; - union { - pb_bytes_array_t *transaction; - google_protobuf_Timestamp read_time; - }; - bool show_missing; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListDocumentsRequest) */ -} google_firestore_v1beta1_ListDocumentsRequest; - -typedef struct _google_firestore_v1beta1_RunQueryRequest { - pb_bytes_array_t *parent; - pb_size_t which_query_type; - union { - google_firestore_v1beta1_StructuredQuery structured_query; - } query_type; - pb_size_t which_consistency_selector; - union { - pb_bytes_array_t *transaction; - google_firestore_v1beta1_TransactionOptions new_transaction; - google_protobuf_Timestamp read_time; - } consistency_selector; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RunQueryRequest) */ -} google_firestore_v1beta1_RunQueryRequest; - -typedef struct _google_firestore_v1beta1_RunQueryResponse { - google_firestore_v1beta1_Document document; - pb_bytes_array_t *transaction; - google_protobuf_Timestamp read_time; - int32_t skipped_results; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RunQueryResponse) */ -} google_firestore_v1beta1_RunQueryResponse; - -typedef struct _google_firestore_v1beta1_TargetChange { - google_firestore_v1beta1_TargetChange_TargetChangeType target_change_type; - pb_size_t target_ids_count; - int32_t *target_ids; - google_rpc_Status cause; - pb_bytes_array_t *resume_token; - google_protobuf_Timestamp read_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TargetChange) */ -} google_firestore_v1beta1_TargetChange; - -typedef struct _google_firestore_v1beta1_Target_QueryTarget { - pb_bytes_array_t *parent; - pb_size_t which_query_type; - union { - google_firestore_v1beta1_StructuredQuery structured_query; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target_QueryTarget) */ -} google_firestore_v1beta1_Target_QueryTarget; - -typedef struct _google_firestore_v1beta1_UpdateDocumentRequest { - google_firestore_v1beta1_Document document; - google_firestore_v1beta1_DocumentMask update_mask; - google_firestore_v1beta1_DocumentMask mask; - google_firestore_v1beta1_Precondition current_document; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_UpdateDocumentRequest) */ -} google_firestore_v1beta1_UpdateDocumentRequest; - -typedef struct _google_firestore_v1beta1_WriteResponse { - pb_bytes_array_t *stream_id; - pb_bytes_array_t *stream_token; - pb_size_t write_results_count; - struct _google_firestore_v1beta1_WriteResult *write_results; - google_protobuf_Timestamp commit_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteResponse) */ -} google_firestore_v1beta1_WriteResponse; - -typedef struct _google_firestore_v1beta1_ListenResponse { - pb_size_t which_response_type; - union { - google_firestore_v1beta1_TargetChange target_change; - google_firestore_v1beta1_DocumentChange document_change; - google_firestore_v1beta1_DocumentDelete document_delete; - google_firestore_v1beta1_ExistenceFilter filter; - google_firestore_v1beta1_DocumentRemove document_remove; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenResponse) */ -} google_firestore_v1beta1_ListenResponse; - -typedef struct _google_firestore_v1beta1_Target { - pb_size_t which_target_type; - union { - google_firestore_v1beta1_Target_QueryTarget query; - google_firestore_v1beta1_Target_DocumentsTarget documents; - } target_type; - pb_size_t which_resume_type; - union { - pb_bytes_array_t *resume_token; - google_protobuf_Timestamp read_time; - } resume_type; - int32_t target_id; - bool once; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target) */ -} google_firestore_v1beta1_Target; - -typedef struct _google_firestore_v1beta1_ListenRequest { - pb_bytes_array_t *database; - pb_size_t which_target_change; - union { - google_firestore_v1beta1_Target add_target; - int32_t remove_target; - }; - pb_size_t labels_count; - struct _google_firestore_v1beta1_ListenRequest_LabelsEntry *labels; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenRequest) */ -} google_firestore_v1beta1_ListenRequest; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define google_firestore_v1beta1_GetDocumentRequest_init_default {NULL, google_firestore_v1beta1_DocumentMask_init_default, 0, {NULL}} -#define google_firestore_v1beta1_ListDocumentsRequest_init_default {NULL, NULL, 0, NULL, NULL, google_firestore_v1beta1_DocumentMask_init_default, 0, {NULL}, 0} -#define google_firestore_v1beta1_ListDocumentsResponse_init_default {0, NULL, NULL} -#define google_firestore_v1beta1_CreateDocumentRequest_init_default {NULL, NULL, NULL, google_firestore_v1beta1_Document_init_default, google_firestore_v1beta1_DocumentMask_init_default} -#define google_firestore_v1beta1_UpdateDocumentRequest_init_default {google_firestore_v1beta1_Document_init_default, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_Precondition_init_default} -#define google_firestore_v1beta1_DeleteDocumentRequest_init_default {NULL, google_firestore_v1beta1_Precondition_init_default} -#define google_firestore_v1beta1_BatchGetDocumentsRequest_init_default {NULL, 0, NULL, google_firestore_v1beta1_DocumentMask_init_default, 0, {NULL}} -#define google_firestore_v1beta1_BatchGetDocumentsResponse_init_default {0, {google_firestore_v1beta1_Document_init_default}, NULL, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_BeginTransactionRequest_init_default {NULL, google_firestore_v1beta1_TransactionOptions_init_default} -#define google_firestore_v1beta1_BeginTransactionResponse_init_default {NULL} -#define google_firestore_v1beta1_CommitRequest_init_default {NULL, 0, NULL, NULL} -#define google_firestore_v1beta1_CommitResponse_init_default {0, NULL, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_RollbackRequest_init_default {NULL, NULL} -#define google_firestore_v1beta1_RunQueryRequest_init_default {NULL, 0, {google_firestore_v1beta1_StructuredQuery_init_default}, 0, {NULL}} -#define google_firestore_v1beta1_RunQueryResponse_init_default {google_firestore_v1beta1_Document_init_default, NULL, google_protobuf_Timestamp_init_default, 0} -#define google_firestore_v1beta1_WriteRequest_init_default {NULL, NULL, 0, NULL, NULL, 0, NULL} -#define google_firestore_v1beta1_WriteRequest_LabelsEntry_init_default {NULL, NULL} -#define google_firestore_v1beta1_WriteResponse_init_default {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_ListenRequest_init_default {NULL, 0, {google_firestore_v1beta1_Target_init_default}, 0, NULL} -#define google_firestore_v1beta1_ListenRequest_LabelsEntry_init_default {NULL, NULL} -#define google_firestore_v1beta1_ListenResponse_init_default {0, {google_firestore_v1beta1_TargetChange_init_default}} -#define google_firestore_v1beta1_Target_init_default {0, {google_firestore_v1beta1_Target_QueryTarget_init_default}, 0, {NULL}, 0, 0} -#define google_firestore_v1beta1_Target_DocumentsTarget_init_default {0, NULL} -#define google_firestore_v1beta1_Target_QueryTarget_init_default {NULL, 0, {google_firestore_v1beta1_StructuredQuery_init_default}} -#define google_firestore_v1beta1_TargetChange_init_default {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, 0, NULL, google_rpc_Status_init_default, NULL, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_ListCollectionIdsRequest_init_default {NULL, 0, NULL} -#define google_firestore_v1beta1_ListCollectionIdsResponse_init_default {0, NULL, NULL} -#define google_firestore_v1beta1_GetDocumentRequest_init_zero {NULL, google_firestore_v1beta1_DocumentMask_init_zero, 0, {NULL}} -#define google_firestore_v1beta1_ListDocumentsRequest_init_zero {NULL, NULL, 0, NULL, NULL, google_firestore_v1beta1_DocumentMask_init_zero, 0, {NULL}, 0} -#define google_firestore_v1beta1_ListDocumentsResponse_init_zero {0, NULL, NULL} -#define google_firestore_v1beta1_CreateDocumentRequest_init_zero {NULL, NULL, NULL, google_firestore_v1beta1_Document_init_zero, google_firestore_v1beta1_DocumentMask_init_zero} -#define google_firestore_v1beta1_UpdateDocumentRequest_init_zero {google_firestore_v1beta1_Document_init_zero, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_Precondition_init_zero} -#define google_firestore_v1beta1_DeleteDocumentRequest_init_zero {NULL, google_firestore_v1beta1_Precondition_init_zero} -#define google_firestore_v1beta1_BatchGetDocumentsRequest_init_zero {NULL, 0, NULL, google_firestore_v1beta1_DocumentMask_init_zero, 0, {NULL}} -#define google_firestore_v1beta1_BatchGetDocumentsResponse_init_zero {0, {google_firestore_v1beta1_Document_init_zero}, NULL, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_BeginTransactionRequest_init_zero {NULL, google_firestore_v1beta1_TransactionOptions_init_zero} -#define google_firestore_v1beta1_BeginTransactionResponse_init_zero {NULL} -#define google_firestore_v1beta1_CommitRequest_init_zero {NULL, 0, NULL, NULL} -#define google_firestore_v1beta1_CommitResponse_init_zero {0, NULL, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_RollbackRequest_init_zero {NULL, NULL} -#define google_firestore_v1beta1_RunQueryRequest_init_zero {NULL, 0, {google_firestore_v1beta1_StructuredQuery_init_zero}, 0, {NULL}} -#define google_firestore_v1beta1_RunQueryResponse_init_zero {google_firestore_v1beta1_Document_init_zero, NULL, google_protobuf_Timestamp_init_zero, 0} -#define google_firestore_v1beta1_WriteRequest_init_zero {NULL, NULL, 0, NULL, NULL, 0, NULL} -#define google_firestore_v1beta1_WriteRequest_LabelsEntry_init_zero {NULL, NULL} -#define google_firestore_v1beta1_WriteResponse_init_zero {NULL, NULL, 0, NULL, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_ListenRequest_init_zero {NULL, 0, {google_firestore_v1beta1_Target_init_zero}, 0, NULL} -#define google_firestore_v1beta1_ListenRequest_LabelsEntry_init_zero {NULL, NULL} -#define google_firestore_v1beta1_ListenResponse_init_zero {0, {google_firestore_v1beta1_TargetChange_init_zero}} -#define google_firestore_v1beta1_Target_init_zero {0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}, 0, {NULL}, 0, 0} -#define google_firestore_v1beta1_Target_DocumentsTarget_init_zero {0, NULL} -#define google_firestore_v1beta1_Target_QueryTarget_init_zero {NULL, 0, {google_firestore_v1beta1_StructuredQuery_init_zero}} -#define google_firestore_v1beta1_TargetChange_init_zero {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, 0, NULL, google_rpc_Status_init_zero, NULL, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_ListCollectionIdsRequest_init_zero {NULL, 0, NULL} -#define google_firestore_v1beta1_ListCollectionIdsResponse_init_zero {0, NULL, NULL} - -/* Field tags (for use in manual encoding/decoding) */ -#define google_firestore_v1beta1_BeginTransactionResponse_transaction_tag 1 -#define google_firestore_v1beta1_CommitRequest_database_tag 1 -#define google_firestore_v1beta1_CommitRequest_writes_tag 2 -#define google_firestore_v1beta1_CommitRequest_transaction_tag 3 -#define google_firestore_v1beta1_ListCollectionIdsResponse_collection_ids_tag 1 -#define google_firestore_v1beta1_ListCollectionIdsResponse_next_page_token_tag 2 -#define google_firestore_v1beta1_ListDocumentsResponse_documents_tag 1 -#define google_firestore_v1beta1_ListDocumentsResponse_next_page_token_tag 2 -#define google_firestore_v1beta1_ListenRequest_LabelsEntry_key_tag 1 -#define google_firestore_v1beta1_ListenRequest_LabelsEntry_value_tag 2 -#define google_firestore_v1beta1_RollbackRequest_database_tag 1 -#define google_firestore_v1beta1_RollbackRequest_transaction_tag 2 -#define google_firestore_v1beta1_Target_DocumentsTarget_documents_tag 2 -#define google_firestore_v1beta1_WriteRequest_database_tag 1 -#define google_firestore_v1beta1_WriteRequest_stream_id_tag 2 -#define google_firestore_v1beta1_WriteRequest_writes_tag 3 -#define google_firestore_v1beta1_WriteRequest_stream_token_tag 4 -#define google_firestore_v1beta1_WriteRequest_labels_tag 5 -#define google_firestore_v1beta1_WriteRequest_LabelsEntry_key_tag 1 -#define google_firestore_v1beta1_WriteRequest_LabelsEntry_value_tag 2 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_transaction_tag 4 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_new_transaction_tag 5 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_read_time_tag 7 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_database_tag 1 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_documents_tag 2 -#define google_firestore_v1beta1_BatchGetDocumentsRequest_mask_tag 3 -#define google_firestore_v1beta1_BatchGetDocumentsResponse_found_tag 1 -#define google_firestore_v1beta1_BatchGetDocumentsResponse_missing_tag 2 -#define google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag 3 -#define google_firestore_v1beta1_BatchGetDocumentsResponse_read_time_tag 4 -#define google_firestore_v1beta1_BeginTransactionRequest_database_tag 1 -#define google_firestore_v1beta1_BeginTransactionRequest_options_tag 2 -#define google_firestore_v1beta1_CommitResponse_write_results_tag 1 -#define google_firestore_v1beta1_CommitResponse_commit_time_tag 2 -#define google_firestore_v1beta1_CreateDocumentRequest_parent_tag 1 -#define google_firestore_v1beta1_CreateDocumentRequest_collection_id_tag 2 -#define google_firestore_v1beta1_CreateDocumentRequest_document_id_tag 3 -#define google_firestore_v1beta1_CreateDocumentRequest_document_tag 4 -#define google_firestore_v1beta1_CreateDocumentRequest_mask_tag 5 -#define google_firestore_v1beta1_DeleteDocumentRequest_name_tag 1 -#define google_firestore_v1beta1_DeleteDocumentRequest_current_document_tag 2 -#define google_firestore_v1beta1_GetDocumentRequest_transaction_tag 3 -#define google_firestore_v1beta1_GetDocumentRequest_read_time_tag 5 -#define google_firestore_v1beta1_GetDocumentRequest_name_tag 1 -#define google_firestore_v1beta1_GetDocumentRequest_mask_tag 2 -#define google_firestore_v1beta1_ListCollectionIdsRequest_parent_tag 1 -#define google_firestore_v1beta1_ListCollectionIdsRequest_page_size_tag 2 -#define google_firestore_v1beta1_ListCollectionIdsRequest_page_token_tag 3 -#define google_firestore_v1beta1_ListDocumentsRequest_transaction_tag 8 -#define google_firestore_v1beta1_ListDocumentsRequest_read_time_tag 10 -#define google_firestore_v1beta1_ListDocumentsRequest_parent_tag 1 -#define google_firestore_v1beta1_ListDocumentsRequest_collection_id_tag 2 -#define google_firestore_v1beta1_ListDocumentsRequest_page_size_tag 3 -#define google_firestore_v1beta1_ListDocumentsRequest_page_token_tag 4 -#define google_firestore_v1beta1_ListDocumentsRequest_order_by_tag 6 -#define google_firestore_v1beta1_ListDocumentsRequest_mask_tag 7 -#define google_firestore_v1beta1_ListDocumentsRequest_show_missing_tag 12 -#define google_firestore_v1beta1_RunQueryRequest_structured_query_tag 2 -#define google_firestore_v1beta1_RunQueryRequest_transaction_tag 5 -#define google_firestore_v1beta1_RunQueryRequest_new_transaction_tag 6 -#define google_firestore_v1beta1_RunQueryRequest_read_time_tag 7 -#define google_firestore_v1beta1_RunQueryRequest_parent_tag 1 -#define google_firestore_v1beta1_RunQueryResponse_transaction_tag 2 -#define google_firestore_v1beta1_RunQueryResponse_document_tag 1 -#define google_firestore_v1beta1_RunQueryResponse_read_time_tag 3 -#define google_firestore_v1beta1_RunQueryResponse_skipped_results_tag 4 -#define google_firestore_v1beta1_TargetChange_target_change_type_tag 1 -#define google_firestore_v1beta1_TargetChange_target_ids_tag 2 -#define google_firestore_v1beta1_TargetChange_cause_tag 3 -#define google_firestore_v1beta1_TargetChange_resume_token_tag 4 -#define google_firestore_v1beta1_TargetChange_read_time_tag 6 -#define google_firestore_v1beta1_Target_QueryTarget_structured_query_tag 2 -#define google_firestore_v1beta1_Target_QueryTarget_parent_tag 1 -#define google_firestore_v1beta1_UpdateDocumentRequest_document_tag 1 -#define google_firestore_v1beta1_UpdateDocumentRequest_update_mask_tag 2 -#define google_firestore_v1beta1_UpdateDocumentRequest_mask_tag 3 -#define google_firestore_v1beta1_UpdateDocumentRequest_current_document_tag 4 -#define google_firestore_v1beta1_WriteResponse_stream_id_tag 1 -#define google_firestore_v1beta1_WriteResponse_stream_token_tag 2 -#define google_firestore_v1beta1_WriteResponse_write_results_tag 3 -#define google_firestore_v1beta1_WriteResponse_commit_time_tag 4 -#define google_firestore_v1beta1_ListenResponse_target_change_tag 2 -#define google_firestore_v1beta1_ListenResponse_document_change_tag 3 -#define google_firestore_v1beta1_ListenResponse_document_delete_tag 4 -#define google_firestore_v1beta1_ListenResponse_filter_tag 5 -#define google_firestore_v1beta1_ListenResponse_document_remove_tag 6 -#define google_firestore_v1beta1_Target_query_tag 2 -#define google_firestore_v1beta1_Target_documents_tag 3 -#define google_firestore_v1beta1_Target_resume_token_tag 4 -#define google_firestore_v1beta1_Target_read_time_tag 11 -#define google_firestore_v1beta1_Target_target_id_tag 5 -#define google_firestore_v1beta1_Target_once_tag 6 -#define google_firestore_v1beta1_ListenRequest_add_target_tag 2 -#define google_firestore_v1beta1_ListenRequest_remove_target_tag 3 -#define google_firestore_v1beta1_ListenRequest_database_tag 1 -#define google_firestore_v1beta1_ListenRequest_labels_tag 4 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t google_firestore_v1beta1_GetDocumentRequest_fields[5]; -extern const pb_field_t google_firestore_v1beta1_ListDocumentsRequest_fields[10]; -extern const pb_field_t google_firestore_v1beta1_ListDocumentsResponse_fields[3]; -extern const pb_field_t google_firestore_v1beta1_CreateDocumentRequest_fields[6]; -extern const pb_field_t google_firestore_v1beta1_UpdateDocumentRequest_fields[5]; -extern const pb_field_t google_firestore_v1beta1_DeleteDocumentRequest_fields[3]; -extern const pb_field_t google_firestore_v1beta1_BatchGetDocumentsRequest_fields[7]; -extern const pb_field_t google_firestore_v1beta1_BatchGetDocumentsResponse_fields[5]; -extern const pb_field_t google_firestore_v1beta1_BeginTransactionRequest_fields[3]; -extern const pb_field_t google_firestore_v1beta1_BeginTransactionResponse_fields[2]; -extern const pb_field_t google_firestore_v1beta1_CommitRequest_fields[4]; -extern const pb_field_t google_firestore_v1beta1_CommitResponse_fields[3]; -extern const pb_field_t google_firestore_v1beta1_RollbackRequest_fields[3]; -extern const pb_field_t google_firestore_v1beta1_RunQueryRequest_fields[6]; -extern const pb_field_t google_firestore_v1beta1_RunQueryResponse_fields[5]; -extern const pb_field_t google_firestore_v1beta1_WriteRequest_fields[6]; -extern const pb_field_t google_firestore_v1beta1_WriteRequest_LabelsEntry_fields[3]; -extern const pb_field_t google_firestore_v1beta1_WriteResponse_fields[5]; -extern const pb_field_t google_firestore_v1beta1_ListenRequest_fields[5]; -extern const pb_field_t google_firestore_v1beta1_ListenRequest_LabelsEntry_fields[3]; -extern const pb_field_t google_firestore_v1beta1_ListenResponse_fields[6]; -extern const pb_field_t google_firestore_v1beta1_Target_fields[7]; -extern const pb_field_t google_firestore_v1beta1_Target_DocumentsTarget_fields[2]; -extern const pb_field_t google_firestore_v1beta1_Target_QueryTarget_fields[3]; -extern const pb_field_t google_firestore_v1beta1_TargetChange_fields[6]; -extern const pb_field_t google_firestore_v1beta1_ListCollectionIdsRequest_fields[4]; -extern const pb_field_t google_firestore_v1beta1_ListCollectionIdsResponse_fields[3]; - -/* Maximum encoded size of messages (where known) */ -/* google_firestore_v1beta1_GetDocumentRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListDocumentsRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListDocumentsResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_CreateDocumentRequest_size depends on runtime parameters */ -#define google_firestore_v1beta1_UpdateDocumentRequest_size (44 + google_firestore_v1beta1_Document_size + google_firestore_v1beta1_DocumentMask_size + google_firestore_v1beta1_DocumentMask_size) -/* google_firestore_v1beta1_DeleteDocumentRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_BatchGetDocumentsRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_BatchGetDocumentsResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_BeginTransactionRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_BeginTransactionResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_CommitRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_CommitResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_RollbackRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_RunQueryRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_RunQueryResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_WriteRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_WriteRequest_LabelsEntry_size depends on runtime parameters */ -/* google_firestore_v1beta1_WriteResponse_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListenRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListenRequest_LabelsEntry_size depends on runtime parameters */ -#define google_firestore_v1beta1_ListenResponse_size (0 + ((((google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) > google_firestore_v1beta1_TargetChange_size ? (google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) : google_firestore_v1beta1_TargetChange_size) > google_firestore_v1beta1_DocumentDelete_size ? ((google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) > google_firestore_v1beta1_TargetChange_size ? (google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) : google_firestore_v1beta1_TargetChange_size) : google_firestore_v1beta1_DocumentDelete_size) > 24 ? (((google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) > google_firestore_v1beta1_TargetChange_size ? (google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) : google_firestore_v1beta1_TargetChange_size) > google_firestore_v1beta1_DocumentDelete_size ? ((google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) > google_firestore_v1beta1_TargetChange_size ? (google_firestore_v1beta1_DocumentRemove_size > google_firestore_v1beta1_DocumentChange_size ? google_firestore_v1beta1_DocumentRemove_size : google_firestore_v1beta1_DocumentChange_size) : google_firestore_v1beta1_TargetChange_size) : google_firestore_v1beta1_DocumentDelete_size) : 24)) -/* google_firestore_v1beta1_Target_size depends on runtime parameters */ -/* google_firestore_v1beta1_Target_DocumentsTarget_size depends on runtime parameters */ -/* google_firestore_v1beta1_Target_QueryTarget_size depends on runtime parameters */ -/* google_firestore_v1beta1_TargetChange_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListCollectionIdsRequest_size depends on runtime parameters */ -/* google_firestore_v1beta1_ListCollectionIdsResponse_size depends on runtime parameters */ - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define FIRESTORE_MESSAGES \ - - -#endif - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ - -#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.cc deleted file mode 100644 index a3cc81500c3..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.cc +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9.1 */ - -#include "query.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - - -const pb_field_t google_firestore_v1beta1_StructuredQuery_fields[9] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery, select, select, &google_firestore_v1beta1_StructuredQuery_Projection_fields), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_StructuredQuery, from, select, &google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, where, from, &google_firestore_v1beta1_StructuredQuery_Filter_fields), - PB_FIELD( 4, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_StructuredQuery, order_by, where, &google_firestore_v1beta1_StructuredQuery_Order_fields), - PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, limit, order_by, &google_protobuf_Int32Value_fields), - PB_FIELD( 6, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, offset, limit, 0), - PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, start_at, offset, &google_firestore_v1beta1_Cursor_fields), - PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, end_at, start_at, &google_firestore_v1beta1_Cursor_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields[3] = { - PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_StructuredQuery_CollectionSelector, collection_id, collection_id, 0), - PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_CollectionSelector, all_descendants, collection_id, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_Filter_fields[4] = { - PB_ANONYMOUS_ONEOF_FIELD(filter_type, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_Filter, composite_filter, composite_filter, &google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields), - PB_ANONYMOUS_ONEOF_FIELD(filter_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_StructuredQuery_Filter, field_filter, field_filter, &google_firestore_v1beta1_StructuredQuery_FieldFilter_fields), - PB_ANONYMOUS_ONEOF_FIELD(filter_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_StructuredQuery_Filter, unary_filter, unary_filter, &google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields[3] = { - PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_CompositeFilter, op, op, 0), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_StructuredQuery_CompositeFilter, filters, op, &google_firestore_v1beta1_StructuredQuery_Filter_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldFilter_fields[4] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_FieldFilter, field, field, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), - PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_FieldFilter, op, field, 0), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_FieldFilter, value, op, &google_firestore_v1beta1_Value_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields[3] = { - PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_UnaryFilter, op, op, 0), - PB_ANONYMOUS_ONEOF_FIELD(operand_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_UnaryFilter, field, op, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_Order_fields[3] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_Order, field, field, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), - PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_Order, direction, field, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldReference_fields[2] = { - PB_FIELD( 2, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_StructuredQuery_FieldReference, field_path, field_path, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_StructuredQuery_Projection_fields[2] = { - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_StructuredQuery_Projection, fields, fields, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_Cursor_fields[3] = { - PB_FIELD( 1, MESSAGE , REPEATED, POINTER , FIRST, google_firestore_v1beta1_Cursor, values, values, &google_firestore_v1beta1_Value_fields), - PB_FIELD( 2, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Cursor, before, values, 0), - PB_LAST_FIELD -}; - - - - - - -/* Check that field information fits in pb_field_t */ -#if !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_32BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in 8 or 16 bit - * field descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_StructuredQuery, select) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, where) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, start_at) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, end_at) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, limit) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, composite_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, field_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, unary_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, field) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, value) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_UnaryFilter, field) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Order, field) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_StructuredQuery_google_firestore_v1beta1_StructuredQuery_CollectionSelector_google_firestore_v1beta1_StructuredQuery_Filter_google_firestore_v1beta1_StructuredQuery_CompositeFilter_google_firestore_v1beta1_StructuredQuery_FieldFilter_google_firestore_v1beta1_StructuredQuery_UnaryFilter_google_firestore_v1beta1_StructuredQuery_Order_google_firestore_v1beta1_StructuredQuery_FieldReference_google_firestore_v1beta1_StructuredQuery_Projection_google_firestore_v1beta1_Cursor) -#endif - -#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in the default - * 8 bit descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_StructuredQuery, select) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, where) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, start_at) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, end_at) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, limit) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, composite_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, field_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, unary_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, field) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, value) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_UnaryFilter, field) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Order, field) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_StructuredQuery_google_firestore_v1beta1_StructuredQuery_CollectionSelector_google_firestore_v1beta1_StructuredQuery_Filter_google_firestore_v1beta1_StructuredQuery_CompositeFilter_google_firestore_v1beta1_StructuredQuery_FieldFilter_google_firestore_v1beta1_StructuredQuery_UnaryFilter_google_firestore_v1beta1_StructuredQuery_Order_google_firestore_v1beta1_StructuredQuery_FieldReference_google_firestore_v1beta1_StructuredQuery_Projection_google_firestore_v1beta1_Cursor) -#endif - - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h deleted file mode 100644 index 26cd0dbd3e9..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h +++ /dev/null @@ -1,246 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9.1 */ - -#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_NANOPB_H_INCLUDED -#define PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_NANOPB_H_INCLUDED -#include - -#include "google/api/annotations.nanopb.h" - -#include "google/firestore/v1beta1/document.nanopb.h" - -#include "google/protobuf/wrappers.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - -/* Enum definitions */ -typedef enum _google_firestore_v1beta1_StructuredQuery_Direction { - google_firestore_v1beta1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED = 0, - google_firestore_v1beta1_StructuredQuery_Direction_ASCENDING = 1, - google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING = 2 -} google_firestore_v1beta1_StructuredQuery_Direction; -#define _google_firestore_v1beta1_StructuredQuery_Direction_MIN google_firestore_v1beta1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED -#define _google_firestore_v1beta1_StructuredQuery_Direction_MAX google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING -#define _google_firestore_v1beta1_StructuredQuery_Direction_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_Direction)(google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING+1)) - -typedef enum _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator { - google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0, - google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND = 1 -} google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator; -#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED -#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND -#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator)(google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND+1)) - -typedef enum _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator { - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED = 0, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_LESS_THAN = 1, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL = 2, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_GREATER_THAN = 3, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL = 4, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_EQUAL = 5, - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS = 7 -} google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator; -#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED -#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS -#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator)(google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_ARRAY_CONTAINS+1)) - -typedef enum _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator { - google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED = 0, - google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NAN = 2, - google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL = 3 -} google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator; -#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED -#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL -#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator)(google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL+1)) - -/* Struct definitions */ -typedef struct _google_firestore_v1beta1_StructuredQuery_FieldReference { - pb_bytes_array_t *field_path; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_FieldReference) */ -} google_firestore_v1beta1_StructuredQuery_FieldReference; - -typedef struct _google_firestore_v1beta1_StructuredQuery_Projection { - pb_size_t fields_count; - struct _google_firestore_v1beta1_StructuredQuery_FieldReference *fields; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Projection) */ -} google_firestore_v1beta1_StructuredQuery_Projection; - -typedef struct _google_firestore_v1beta1_Cursor { - pb_size_t values_count; - struct _google_firestore_v1beta1_Value *values; - bool before; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Cursor) */ -} google_firestore_v1beta1_Cursor; - -typedef struct _google_firestore_v1beta1_StructuredQuery_CollectionSelector { - pb_bytes_array_t *collection_id; - bool all_descendants; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_CollectionSelector) */ -} google_firestore_v1beta1_StructuredQuery_CollectionSelector; - -typedef struct _google_firestore_v1beta1_StructuredQuery_CompositeFilter { - google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator op; - pb_size_t filters_count; - struct _google_firestore_v1beta1_StructuredQuery_Filter *filters; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_CompositeFilter) */ -} google_firestore_v1beta1_StructuredQuery_CompositeFilter; - -typedef struct _google_firestore_v1beta1_StructuredQuery_FieldFilter { - google_firestore_v1beta1_StructuredQuery_FieldReference field; - google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator op; - google_firestore_v1beta1_Value value; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_FieldFilter) */ -} google_firestore_v1beta1_StructuredQuery_FieldFilter; - -typedef struct _google_firestore_v1beta1_StructuredQuery_Order { - google_firestore_v1beta1_StructuredQuery_FieldReference field; - google_firestore_v1beta1_StructuredQuery_Direction direction; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Order) */ -} google_firestore_v1beta1_StructuredQuery_Order; - -typedef struct _google_firestore_v1beta1_StructuredQuery_UnaryFilter { - google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator op; - pb_size_t which_operand_type; - union { - google_firestore_v1beta1_StructuredQuery_FieldReference field; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_UnaryFilter) */ -} google_firestore_v1beta1_StructuredQuery_UnaryFilter; - -typedef struct _google_firestore_v1beta1_StructuredQuery_Filter { - pb_size_t which_filter_type; - union { - google_firestore_v1beta1_StructuredQuery_CompositeFilter composite_filter; - google_firestore_v1beta1_StructuredQuery_FieldFilter field_filter; - google_firestore_v1beta1_StructuredQuery_UnaryFilter unary_filter; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Filter) */ -} google_firestore_v1beta1_StructuredQuery_Filter; - -typedef struct _google_firestore_v1beta1_StructuredQuery { - google_firestore_v1beta1_StructuredQuery_Projection select; - pb_size_t from_count; - struct _google_firestore_v1beta1_StructuredQuery_CollectionSelector *from; - google_firestore_v1beta1_StructuredQuery_Filter where; - pb_size_t order_by_count; - struct _google_firestore_v1beta1_StructuredQuery_Order *order_by; - google_protobuf_Int32Value limit; - int32_t offset; - google_firestore_v1beta1_Cursor start_at; - google_firestore_v1beta1_Cursor end_at; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery) */ -} google_firestore_v1beta1_StructuredQuery; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define google_firestore_v1beta1_StructuredQuery_init_default {google_firestore_v1beta1_StructuredQuery_Projection_init_default, 0, NULL, google_firestore_v1beta1_StructuredQuery_Filter_init_default, 0, NULL, google_protobuf_Int32Value_init_default, 0, google_firestore_v1beta1_Cursor_init_default, google_firestore_v1beta1_Cursor_init_default} -#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_default {NULL, 0} -#define google_firestore_v1beta1_StructuredQuery_Filter_init_default {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default}} -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL} -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_default} -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_default {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default}} -#define google_firestore_v1beta1_StructuredQuery_Order_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} -#define google_firestore_v1beta1_StructuredQuery_FieldReference_init_default {NULL} -#define google_firestore_v1beta1_StructuredQuery_Projection_init_default {0, NULL} -#define google_firestore_v1beta1_Cursor_init_default {0, NULL, 0} -#define google_firestore_v1beta1_StructuredQuery_init_zero {google_firestore_v1beta1_StructuredQuery_Projection_init_zero, 0, NULL, google_firestore_v1beta1_StructuredQuery_Filter_init_zero, 0, NULL, google_protobuf_Int32Value_init_zero, 0, google_firestore_v1beta1_Cursor_init_zero, google_firestore_v1beta1_Cursor_init_zero} -#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_zero {NULL, 0} -#define google_firestore_v1beta1_StructuredQuery_Filter_init_zero {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero}} -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, 0, NULL} -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_zero} -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero}} -#define google_firestore_v1beta1_StructuredQuery_Order_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} -#define google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero {NULL} -#define google_firestore_v1beta1_StructuredQuery_Projection_init_zero {0, NULL} -#define google_firestore_v1beta1_Cursor_init_zero {0, NULL, 0} - -/* Field tags (for use in manual encoding/decoding) */ -#define google_firestore_v1beta1_StructuredQuery_FieldReference_field_path_tag 2 -#define google_firestore_v1beta1_StructuredQuery_Projection_fields_tag 2 -#define google_firestore_v1beta1_Cursor_values_tag 1 -#define google_firestore_v1beta1_Cursor_before_tag 2 -#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_collection_id_tag 2 -#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_all_descendants_tag 3 -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_op_tag 1 -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_filters_tag 2 -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_field_tag 1 -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_op_tag 2 -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_value_tag 3 -#define google_firestore_v1beta1_StructuredQuery_Order_field_tag 1 -#define google_firestore_v1beta1_StructuredQuery_Order_direction_tag 2 -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_field_tag 2 -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_op_tag 1 -#define google_firestore_v1beta1_StructuredQuery_Filter_composite_filter_tag 1 -#define google_firestore_v1beta1_StructuredQuery_Filter_field_filter_tag 2 -#define google_firestore_v1beta1_StructuredQuery_Filter_unary_filter_tag 3 -#define google_firestore_v1beta1_StructuredQuery_select_tag 1 -#define google_firestore_v1beta1_StructuredQuery_from_tag 2 -#define google_firestore_v1beta1_StructuredQuery_where_tag 3 -#define google_firestore_v1beta1_StructuredQuery_order_by_tag 4 -#define google_firestore_v1beta1_StructuredQuery_start_at_tag 7 -#define google_firestore_v1beta1_StructuredQuery_end_at_tag 8 -#define google_firestore_v1beta1_StructuredQuery_offset_tag 6 -#define google_firestore_v1beta1_StructuredQuery_limit_tag 5 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_fields[9]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields[3]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Filter_fields[4]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields[3]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldFilter_fields[4]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields[3]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Order_fields[3]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldReference_fields[2]; -extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Projection_fields[2]; -extern const pb_field_t google_firestore_v1beta1_Cursor_fields[3]; - -/* Maximum encoded size of messages (where known) */ -/* google_firestore_v1beta1_StructuredQuery_size depends on runtime parameters */ -/* google_firestore_v1beta1_StructuredQuery_CollectionSelector_size depends on runtime parameters */ -#define google_firestore_v1beta1_StructuredQuery_Filter_size (0 + (((google_firestore_v1beta1_StructuredQuery_CompositeFilter_size > google_firestore_v1beta1_StructuredQuery_FieldFilter_size ? google_firestore_v1beta1_StructuredQuery_CompositeFilter_size : google_firestore_v1beta1_StructuredQuery_FieldFilter_size) > google_firestore_v1beta1_StructuredQuery_UnaryFilter_size ? (google_firestore_v1beta1_StructuredQuery_CompositeFilter_size > google_firestore_v1beta1_StructuredQuery_FieldFilter_size ? google_firestore_v1beta1_StructuredQuery_CompositeFilter_size : google_firestore_v1beta1_StructuredQuery_FieldFilter_size) : google_firestore_v1beta1_StructuredQuery_UnaryFilter_size) > 0 ? ((google_firestore_v1beta1_StructuredQuery_CompositeFilter_size > google_firestore_v1beta1_StructuredQuery_FieldFilter_size ? google_firestore_v1beta1_StructuredQuery_CompositeFilter_size : google_firestore_v1beta1_StructuredQuery_FieldFilter_size) > google_firestore_v1beta1_StructuredQuery_UnaryFilter_size ? (google_firestore_v1beta1_StructuredQuery_CompositeFilter_size > google_firestore_v1beta1_StructuredQuery_FieldFilter_size ? google_firestore_v1beta1_StructuredQuery_CompositeFilter_size : google_firestore_v1beta1_StructuredQuery_FieldFilter_size) : google_firestore_v1beta1_StructuredQuery_UnaryFilter_size) : 0)) -/* google_firestore_v1beta1_StructuredQuery_CompositeFilter_size depends on runtime parameters */ -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_size (14 + google_firestore_v1beta1_StructuredQuery_FieldReference_size + google_firestore_v1beta1_Value_size) -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_size (2 + (google_firestore_v1beta1_StructuredQuery_FieldReference_size > 0 ? google_firestore_v1beta1_StructuredQuery_FieldReference_size : 0)) -#define google_firestore_v1beta1_StructuredQuery_Order_size (8 + google_firestore_v1beta1_StructuredQuery_FieldReference_size) -/* google_firestore_v1beta1_StructuredQuery_FieldReference_size depends on runtime parameters */ -/* google_firestore_v1beta1_StructuredQuery_Projection_size depends on runtime parameters */ -/* google_firestore_v1beta1_Cursor_size depends on runtime parameters */ - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define QUERY_MESSAGES \ - - -#endif - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ - -#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.cc b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.cc deleted file mode 100644 index cf282372014..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.cc +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9.1 */ - -#include "write.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - - -const pb_field_t google_firestore_v1beta1_Write_fields[6] = { - PB_ANONYMOUS_ONEOF_FIELD(operation, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Write, update, update, &google_firestore_v1beta1_Document_fields), - PB_ANONYMOUS_ONEOF_FIELD(operation, 2, BYTES , ONEOF, POINTER , UNION, google_firestore_v1beta1_Write, delete_, delete_, 0), - PB_ANONYMOUS_ONEOF_FIELD(operation, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Write, transform, transform, &google_firestore_v1beta1_DocumentTransform_fields), - PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Write, update_mask, transform, &google_firestore_v1beta1_DocumentMask_fields), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Write, current_document, update_mask, &google_firestore_v1beta1_Precondition_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DocumentTransform_fields[3] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_DocumentTransform, document, document, 0), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_DocumentTransform, field_transforms, document, &google_firestore_v1beta1_DocumentTransform_FieldTransform_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DocumentTransform_FieldTransform_fields[6] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_DocumentTransform_FieldTransform, field_path, field_path, 0), - PB_ANONYMOUS_ONEOF_FIELD(transform_type, 2, ENUM , ONEOF, STATIC , OTHER, google_firestore_v1beta1_DocumentTransform_FieldTransform, set_to_server_value, field_path, 0), - PB_ANONYMOUS_ONEOF_FIELD(transform_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_DocumentTransform_FieldTransform, numeric_add, field_path, &google_firestore_v1beta1_Value_fields), - PB_ANONYMOUS_ONEOF_FIELD(transform_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_DocumentTransform_FieldTransform, append_missing_elements, field_path, &google_firestore_v1beta1_ArrayValue_fields), - PB_ANONYMOUS_ONEOF_FIELD(transform_type, 7, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_DocumentTransform_FieldTransform, remove_all_from_array, field_path, &google_firestore_v1beta1_ArrayValue_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_WriteResult_fields[3] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_WriteResult, update_time, update_time, &google_protobuf_Timestamp_fields), - PB_FIELD( 2, MESSAGE , REPEATED, POINTER , OTHER, google_firestore_v1beta1_WriteResult, transform_results, update_time, &google_firestore_v1beta1_Value_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DocumentChange_fields[4] = { - PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_DocumentChange, document, document, &google_firestore_v1beta1_Document_fields), - PB_FIELD( 5, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1beta1_DocumentChange, target_ids, document, 0), - PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1beta1_DocumentChange, removed_target_ids, target_ids, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DocumentDelete_fields[4] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_DocumentDelete, document, document, 0), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DocumentDelete, read_time, document, &google_protobuf_Timestamp_fields), - PB_FIELD( 6, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1beta1_DocumentDelete, removed_target_ids, read_time, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_DocumentRemove_fields[4] = { - PB_FIELD( 1, BYTES , SINGULAR, POINTER , FIRST, google_firestore_v1beta1_DocumentRemove, document, document, 0), - PB_FIELD( 2, INT32 , REPEATED, POINTER , OTHER, google_firestore_v1beta1_DocumentRemove, removed_target_ids, document, 0), - PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DocumentRemove, read_time, removed_target_ids, &google_protobuf_Timestamp_fields), - PB_LAST_FIELD -}; - -const pb_field_t google_firestore_v1beta1_ExistenceFilter_fields[3] = { - PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_ExistenceFilter, target_id, target_id, 0), - PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ExistenceFilter, count, target_id, 0), - PB_LAST_FIELD -}; - - - -/* Check that field information fits in pb_field_t */ -#if !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_32BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in 8 or 16 bit - * field descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Write, update) < 65536 && pb_membersize(google_firestore_v1beta1_Write, transform) < 65536 && pb_membersize(google_firestore_v1beta1_Write, update_mask) < 65536 && pb_membersize(google_firestore_v1beta1_Write, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, numeric_add) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, append_missing_elements) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, remove_all_from_array) < 65536 && pb_membersize(google_firestore_v1beta1_WriteResult, update_time) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentChange, document) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentDelete, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentRemove, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_Write_google_firestore_v1beta1_DocumentTransform_google_firestore_v1beta1_DocumentTransform_FieldTransform_google_firestore_v1beta1_WriteResult_google_firestore_v1beta1_DocumentChange_google_firestore_v1beta1_DocumentDelete_google_firestore_v1beta1_DocumentRemove_google_firestore_v1beta1_ExistenceFilter) -#endif - -#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) -/* If you get an error here, it means that you need to define PB_FIELD_16BIT - * compile-time option. You can do that in pb.h or on compiler command line. - * - * The reason you need to do this is that some of your messages contain tag - * numbers or field sizes that are larger than what can fit in the default - * 8 bit descriptors. - */ -PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Write, update) < 256 && pb_membersize(google_firestore_v1beta1_Write, transform) < 256 && pb_membersize(google_firestore_v1beta1_Write, update_mask) < 256 && pb_membersize(google_firestore_v1beta1_Write, current_document) < 256 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, numeric_add) < 256 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, append_missing_elements) < 256 && pb_membersize(google_firestore_v1beta1_DocumentTransform_FieldTransform, remove_all_from_array) < 256 && pb_membersize(google_firestore_v1beta1_WriteResult, update_time) < 256 && pb_membersize(google_firestore_v1beta1_DocumentChange, document) < 256 && pb_membersize(google_firestore_v1beta1_DocumentDelete, read_time) < 256 && pb_membersize(google_firestore_v1beta1_DocumentRemove, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_Write_google_firestore_v1beta1_DocumentTransform_google_firestore_v1beta1_DocumentTransform_FieldTransform_google_firestore_v1beta1_WriteResult_google_firestore_v1beta1_DocumentChange_google_firestore_v1beta1_DocumentDelete_google_firestore_v1beta1_DocumentRemove_google_firestore_v1beta1_ExistenceFilter) -#endif - - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h deleted file mode 100644 index 71f14e1c32a..00000000000 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright 2018 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9.1 */ - -#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_NANOPB_H_INCLUDED -#define PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_NANOPB_H_INCLUDED -#include - -#include "google/api/annotations.nanopb.h" - -#include "google/firestore/v1beta1/common.nanopb.h" - -#include "google/firestore/v1beta1/document.nanopb.h" - -#include "google/protobuf/timestamp.nanopb.h" - -namespace firebase { -namespace firestore { - -/* @@protoc_insertion_point(includes) */ -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - - -/* Enum definitions */ -typedef enum _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue { - google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED = 0, - google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME = 1 -} google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue; -#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED -#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MAX google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME -#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_ARRAYSIZE ((google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue)(google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME+1)) - -/* Struct definitions */ -typedef struct _google_firestore_v1beta1_DocumentTransform { - pb_bytes_array_t *document; - pb_size_t field_transforms_count; - struct _google_firestore_v1beta1_DocumentTransform_FieldTransform *field_transforms; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentTransform) */ -} google_firestore_v1beta1_DocumentTransform; - -typedef struct _google_firestore_v1beta1_DocumentChange { - google_firestore_v1beta1_Document document; - pb_size_t target_ids_count; - int32_t *target_ids; - pb_size_t removed_target_ids_count; - int32_t *removed_target_ids; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentChange) */ -} google_firestore_v1beta1_DocumentChange; - -typedef struct _google_firestore_v1beta1_DocumentDelete { - pb_bytes_array_t *document; - google_protobuf_Timestamp read_time; - pb_size_t removed_target_ids_count; - int32_t *removed_target_ids; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentDelete) */ -} google_firestore_v1beta1_DocumentDelete; - -typedef struct _google_firestore_v1beta1_DocumentRemove { - pb_bytes_array_t *document; - pb_size_t removed_target_ids_count; - int32_t *removed_target_ids; - google_protobuf_Timestamp read_time; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentRemove) */ -} google_firestore_v1beta1_DocumentRemove; - -typedef struct _google_firestore_v1beta1_DocumentTransform_FieldTransform { - pb_bytes_array_t *field_path; - pb_size_t which_transform_type; - union { - google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue set_to_server_value; - google_firestore_v1beta1_Value numeric_add; - google_firestore_v1beta1_ArrayValue append_missing_elements; - google_firestore_v1beta1_ArrayValue remove_all_from_array; - }; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentTransform_FieldTransform) */ -} google_firestore_v1beta1_DocumentTransform_FieldTransform; - -typedef struct _google_firestore_v1beta1_ExistenceFilter { - int32_t target_id; - int32_t count; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ExistenceFilter) */ -} google_firestore_v1beta1_ExistenceFilter; - -typedef struct _google_firestore_v1beta1_Write { - pb_size_t which_operation; - union { - google_firestore_v1beta1_Document update; - pb_bytes_array_t *delete_; - google_firestore_v1beta1_DocumentTransform transform; - }; - google_firestore_v1beta1_DocumentMask update_mask; - google_firestore_v1beta1_Precondition current_document; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Write) */ -} google_firestore_v1beta1_Write; - -typedef struct _google_firestore_v1beta1_WriteResult { - google_protobuf_Timestamp update_time; - pb_size_t transform_results_count; - struct _google_firestore_v1beta1_Value *transform_results; -/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteResult) */ -} google_firestore_v1beta1_WriteResult; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define google_firestore_v1beta1_Write_init_default {0, {google_firestore_v1beta1_Document_init_default}, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_Precondition_init_default} -#define google_firestore_v1beta1_DocumentTransform_init_default {NULL, 0, NULL} -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_default {NULL, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} -#define google_firestore_v1beta1_WriteResult_init_default {google_protobuf_Timestamp_init_default, 0, NULL} -#define google_firestore_v1beta1_DocumentChange_init_default {google_firestore_v1beta1_Document_init_default, 0, NULL, 0, NULL} -#define google_firestore_v1beta1_DocumentDelete_init_default {NULL, google_protobuf_Timestamp_init_default, 0, NULL} -#define google_firestore_v1beta1_DocumentRemove_init_default {NULL, 0, NULL, google_protobuf_Timestamp_init_default} -#define google_firestore_v1beta1_ExistenceFilter_init_default {0, 0} -#define google_firestore_v1beta1_Write_init_zero {0, {google_firestore_v1beta1_Document_init_zero}, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_Precondition_init_zero} -#define google_firestore_v1beta1_DocumentTransform_init_zero {NULL, 0, NULL} -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_zero {NULL, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} -#define google_firestore_v1beta1_WriteResult_init_zero {google_protobuf_Timestamp_init_zero, 0, NULL} -#define google_firestore_v1beta1_DocumentChange_init_zero {google_firestore_v1beta1_Document_init_zero, 0, NULL, 0, NULL} -#define google_firestore_v1beta1_DocumentDelete_init_zero {NULL, google_protobuf_Timestamp_init_zero, 0, NULL} -#define google_firestore_v1beta1_DocumentRemove_init_zero {NULL, 0, NULL, google_protobuf_Timestamp_init_zero} -#define google_firestore_v1beta1_ExistenceFilter_init_zero {0, 0} - -/* Field tags (for use in manual encoding/decoding) */ -#define google_firestore_v1beta1_DocumentTransform_document_tag 1 -#define google_firestore_v1beta1_DocumentTransform_field_transforms_tag 2 -#define google_firestore_v1beta1_DocumentChange_document_tag 1 -#define google_firestore_v1beta1_DocumentChange_target_ids_tag 5 -#define google_firestore_v1beta1_DocumentChange_removed_target_ids_tag 6 -#define google_firestore_v1beta1_DocumentDelete_document_tag 1 -#define google_firestore_v1beta1_DocumentDelete_removed_target_ids_tag 6 -#define google_firestore_v1beta1_DocumentDelete_read_time_tag 4 -#define google_firestore_v1beta1_DocumentRemove_document_tag 1 -#define google_firestore_v1beta1_DocumentRemove_removed_target_ids_tag 2 -#define google_firestore_v1beta1_DocumentRemove_read_time_tag 4 -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_set_to_server_value_tag 2 -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_numeric_add_tag 3 -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_append_missing_elements_tag 6 -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_remove_all_from_array_tag 7 -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_field_path_tag 1 -#define google_firestore_v1beta1_ExistenceFilter_target_id_tag 1 -#define google_firestore_v1beta1_ExistenceFilter_count_tag 2 -#define google_firestore_v1beta1_Write_update_tag 1 -#define google_firestore_v1beta1_Write_delete_tag 2 -#define google_firestore_v1beta1_Write_transform_tag 6 -#define google_firestore_v1beta1_Write_update_mask_tag 3 -#define google_firestore_v1beta1_Write_current_document_tag 4 -#define google_firestore_v1beta1_WriteResult_update_time_tag 1 -#define google_firestore_v1beta1_WriteResult_transform_results_tag 2 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t google_firestore_v1beta1_Write_fields[6]; -extern const pb_field_t google_firestore_v1beta1_DocumentTransform_fields[3]; -extern const pb_field_t google_firestore_v1beta1_DocumentTransform_FieldTransform_fields[6]; -extern const pb_field_t google_firestore_v1beta1_WriteResult_fields[3]; -extern const pb_field_t google_firestore_v1beta1_DocumentChange_fields[4]; -extern const pb_field_t google_firestore_v1beta1_DocumentDelete_fields[4]; -extern const pb_field_t google_firestore_v1beta1_DocumentRemove_fields[4]; -extern const pb_field_t google_firestore_v1beta1_ExistenceFilter_fields[3]; - -/* Maximum encoded size of messages (where known) */ -/* google_firestore_v1beta1_Write_size depends on runtime parameters */ -/* google_firestore_v1beta1_DocumentTransform_size depends on runtime parameters */ -/* google_firestore_v1beta1_DocumentTransform_FieldTransform_size depends on runtime parameters */ -/* google_firestore_v1beta1_WriteResult_size depends on runtime parameters */ -/* google_firestore_v1beta1_DocumentChange_size depends on runtime parameters */ -/* google_firestore_v1beta1_DocumentDelete_size depends on runtime parameters */ -/* google_firestore_v1beta1_DocumentRemove_size depends on runtime parameters */ -#define google_firestore_v1beta1_ExistenceFilter_size 22 - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define WRITE_MESSAGES \ - - -#endif - -} // namespace firestore -} // namespace firebase - -/* @@protoc_insertion_point(eof) */ - -#endif diff --git a/Firestore/Protos/objc/firestore/local/Target.pbobjc.h b/Firestore/Protos/objc/firestore/local/Target.pbobjc.h index bab0d7953dc..88d9bffd4aa 100644 --- a/Firestore/Protos/objc/firestore/local/Target.pbobjc.h +++ b/Firestore/Protos/objc/firestore/local/Target.pbobjc.h @@ -99,7 +99,7 @@ typedef GPB_ENUM(FSTPBTarget_TargetType_OneOfCase) { * The last snapshot version received from the Watch Service for this target. * * This is the same value as TargetChange.read_time - * https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L734 + * https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L734 **/ @property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *snapshotVersion; /** Test to see if @c snapshotVersion has been set. */ @@ -120,7 +120,7 @@ typedef GPB_ENUM(FSTPBTarget_TargetType_OneOfCase) { * the client should use the snapshot_version for its own purposes. * * This is the same value as TargetChange.resume_token - * https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L722 + * https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L722 **/ @property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken; diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h similarity index 96% rename from Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h rename to Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h index db889072f4c..0ffe06a09ea 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h +++ b/Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/common.proto +// source: google/firestore/v1/common.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -75,12 +75,12 @@ typedef GPB_ENUM(GCFSDocumentMask_FieldNumber) { * Used to restrict a get or update operation on a document to a subset of its * fields. * This is different from standard field masks, as this is always scoped to a - * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. + * [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. **/ @interface GCFSDocumentMask : GPBMessage /** - * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field + * The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field * path syntax reference. **/ @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *fieldPathsArray; diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.m similarity index 99% rename from Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m rename to Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.m index 6d78948ae2d..cf112ba64ce 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m +++ b/Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.m @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/common.proto +// source: google/firestore/v1/common.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -58,7 +58,7 @@ @implementation GCFSCommonRoot static GPBFileDescriptor *descriptor = NULL; if (!descriptor) { GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1" + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1" objcPrefix:@"GCFS" syntax:GPBFileSyntaxProto3]; } diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h similarity index 98% rename from Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h rename to Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h index a342976fcde..f474724626a 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h +++ b/Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/document.proto +// source: google/firestore/v1/document.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -231,7 +231,8 @@ typedef GPB_ENUM(GCFSValue_ValueType_OneOfCase) { /** * An array value. * - * Cannot contain another array value. + * Cannot directly contain another array value, though can contain an + * map which contains another array. **/ @property(nonatomic, readwrite, strong, null_resettable) GCFSArrayValue *arrayValue; diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.m similarity index 99% rename from Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m rename to Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.m index 4b3a0838e6f..0d1c2dab487 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m +++ b/Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.m @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/document.proto +// source: google/firestore/v1/document.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -61,7 +61,7 @@ @implementation GCFSDocumentRoot static GPBFileDescriptor *descriptor = NULL; if (!descriptor) { GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1" + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1" objcPrefix:@"GCFS" syntax:GPBFileSyntaxProto3]; } diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h similarity index 95% rename from Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h rename to Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h index 5d143dd1aff..8833c84f001 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h +++ b/Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/firestore.proto +// source: google/firestore/v1/firestore.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -143,7 +143,7 @@ typedef GPB_ENUM(GCFSGetDocumentRequest_ConsistencySelector_OneOfCase) { }; /** - * The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. + * The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. **/ @interface GCFSGetDocumentRequest : GPBMessage @@ -206,7 +206,7 @@ typedef GPB_ENUM(GCFSListDocumentsRequest_ConsistencySelector_OneOfCase) { }; /** - * The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. + * The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. **/ @interface GCFSListDocumentsRequest : GPBMessage @@ -263,8 +263,8 @@ typedef GPB_ENUM(GCFSListDocumentsRequest_ConsistencySelector_OneOfCase) { /** * If the list should show missing documents. A missing document is a * document that does not exist but has sub-documents. These documents will - * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time], - * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set. + * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + * or [Document.update_time][google.firestore.v1.Document.update_time] set. * * Requests with `show_missing` may not specify `where` or * `order_by`. @@ -286,7 +286,7 @@ typedef GPB_ENUM(GCFSListDocumentsResponse_FieldNumber) { }; /** - * The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. + * The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. **/ @interface GCFSListDocumentsResponse : GPBMessage @@ -311,7 +311,7 @@ typedef GPB_ENUM(GCFSCreateDocumentRequest_FieldNumber) { }; /** - * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. + * The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. **/ @interface GCFSCreateDocumentRequest : GPBMessage @@ -359,7 +359,7 @@ typedef GPB_ENUM(GCFSUpdateDocumentRequest_FieldNumber) { }; /** - * The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. + * The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. **/ @interface GCFSUpdateDocumentRequest : GPBMessage @@ -412,7 +412,7 @@ typedef GPB_ENUM(GCFSDeleteDocumentRequest_FieldNumber) { }; /** - * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. + * The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. **/ @interface GCFSDeleteDocumentRequest : GPBMessage @@ -451,7 +451,7 @@ typedef GPB_ENUM(GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase) { }; /** - * The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. + * The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. **/ @interface GCFSBatchGetDocumentsRequest : GPBMessage @@ -527,7 +527,7 @@ typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_Result_OneOfCase) { }; /** - * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. + * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. **/ @interface GCFSBatchGetDocumentsResponse : GPBMessage @@ -549,7 +549,7 @@ typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_Result_OneOfCase) { /** * The transaction that was started as part of this request. * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request. + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. **/ @property(nonatomic, readwrite, copy, null_resettable) NSData *transaction; @@ -578,7 +578,7 @@ typedef GPB_ENUM(GCFSBeginTransactionRequest_FieldNumber) { }; /** - * The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. + * The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. **/ @interface GCFSBeginTransactionRequest : GPBMessage @@ -605,7 +605,7 @@ typedef GPB_ENUM(GCFSBeginTransactionResponse_FieldNumber) { }; /** - * The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. + * The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. **/ @interface GCFSBeginTransactionResponse : GPBMessage @@ -623,7 +623,7 @@ typedef GPB_ENUM(GCFSCommitRequest_FieldNumber) { }; /** - * The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. + * The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. **/ @interface GCFSCommitRequest : GPBMessage @@ -655,7 +655,7 @@ typedef GPB_ENUM(GCFSCommitResponse_FieldNumber) { }; /** - * The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. + * The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. **/ @interface GCFSCommitResponse : GPBMessage @@ -684,7 +684,7 @@ typedef GPB_ENUM(GCFSRollbackRequest_FieldNumber) { }; /** - * The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. + * The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. **/ @interface GCFSRollbackRequest : GPBMessage @@ -722,7 +722,7 @@ typedef GPB_ENUM(GCFSRunQueryRequest_ConsistencySelector_OneOfCase) { }; /** - * The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. + * The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. **/ @interface GCFSRunQueryRequest : GPBMessage @@ -786,14 +786,14 @@ typedef GPB_ENUM(GCFSRunQueryResponse_FieldNumber) { }; /** - * The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. + * The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. **/ @interface GCFSRunQueryResponse : GPBMessage /** * The transaction that was started as part of this request. * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request. + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. * If set, no other fields will be set in this response. **/ @property(nonatomic, readwrite, copy, null_resettable) NSData *transaction; @@ -838,7 +838,7 @@ typedef GPB_ENUM(GCFSWriteRequest_FieldNumber) { }; /** - * The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write]. + * The request for [Firestore.Write][google.firestore.v1.Firestore.Write]. * * The first request creates a stream, or resumes an existing one from a token. * @@ -881,7 +881,7 @@ typedef GPB_ENUM(GCFSWriteRequest_FieldNumber) { * A stream token that was previously sent by the server. * * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has * received responses up to this token. After sending this token, earlier * tokens may not be used anymore. * @@ -912,7 +912,7 @@ typedef GPB_ENUM(GCFSWriteResponse_FieldNumber) { }; /** - * The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write]. + * The response for [Firestore.Write][google.firestore.v1.Firestore.Write]. **/ @interface GCFSWriteResponse : GPBMessage @@ -963,7 +963,7 @@ typedef GPB_ENUM(GCFSListenRequest_TargetChange_OneOfCase) { }; /** - * A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen] + * A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen] **/ @interface GCFSListenRequest : GPBMessage @@ -1014,7 +1014,7 @@ typedef GPB_ENUM(GCFSListenResponse_ResponseType_OneOfCase) { }; /** - * The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. + * The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen]. **/ @interface GCFSListenResponse : GPBMessage @@ -1024,14 +1024,14 @@ typedef GPB_ENUM(GCFSListenResponse_ResponseType_OneOfCase) { /** Targets have changed. */ @property(nonatomic, readwrite, strong, null_resettable) GCFSTargetChange *targetChange; -/** A [Document][google.firestore.v1beta1.Document] has changed. */ +/** A [Document][google.firestore.v1.Document] has changed. */ @property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentChange *documentChange; -/** A [Document][google.firestore.v1beta1.Document] has been deleted. */ +/** A [Document][google.firestore.v1.Document] has been deleted. */ @property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentDelete *documentDelete; /** - * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer + * A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer * relevant to that target). **/ @property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentRemove *documentRemove; @@ -1098,7 +1098,7 @@ typedef GPB_ENUM(GCFSTarget_ResumeType_OneOfCase) { @property(nonatomic, readonly) GCFSTarget_ResumeType_OneOfCase resumeTypeOneOfCase; /** - * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target. + * A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. * * Using a resume token with a different target is unsupported and may fail. **/ @@ -1285,7 +1285,7 @@ typedef GPB_ENUM(GCFSListCollectionIdsRequest_FieldNumber) { }; /** - * The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. + * The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. **/ @interface GCFSListCollectionIdsRequest : GPBMessage @@ -1302,7 +1302,7 @@ typedef GPB_ENUM(GCFSListCollectionIdsRequest_FieldNumber) { /** * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse]. + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. **/ @property(nonatomic, readwrite, copy, null_resettable) NSString *pageToken; @@ -1316,7 +1316,7 @@ typedef GPB_ENUM(GCFSListCollectionIdsResponse_FieldNumber) { }; /** - * The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. + * The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. **/ @interface GCFSListCollectionIdsResponse : GPBMessage diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.m similarity index 99% rename from Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m rename to Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.m index 8d185bd54b4..8ab8ca1d015 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m +++ b/Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.m @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/firestore.proto +// source: google/firestore/v1/firestore.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -65,7 +65,7 @@ @implementation GCFSFirestoreRoot static GPBFileDescriptor *descriptor = NULL; if (!descriptor) { GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1" + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1" objcPrefix:@"GCFS" syntax:GPBFileSyntaxProto3]; } diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h similarity index 99% rename from Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h rename to Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h index 3445ec446ff..e4ff487ac3d 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h +++ b/Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/query.proto +// source: google/firestore/v1/query.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.m similarity index 99% rename from Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m rename to Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.m index d84f9499481..ef716bbd2f7 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m +++ b/Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.m @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/query.proto +// source: google/firestore/v1/query.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -59,7 +59,7 @@ @implementation GCFSQueryRoot static GPBFileDescriptor *descriptor = NULL; if (!descriptor) { GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1" + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1" objcPrefix:@"GCFS" syntax:GPBFileSyntaxProto3]; } diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h similarity index 83% rename from Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h rename to Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h index 96ea073cb14..8d1b546636c 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h +++ b/Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/write.proto +// source: google/firestore/v1/write.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -202,7 +202,9 @@ typedef GPB_ENUM(GCFSDocumentTransform_FieldNumber) { typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_FieldNumber) { GCFSDocumentTransform_FieldTransform_FieldNumber_FieldPath = 1, GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue = 2, - GCFSDocumentTransform_FieldTransform_FieldNumber_NumericAdd = 3, + GCFSDocumentTransform_FieldTransform_FieldNumber_Increment = 3, + GCFSDocumentTransform_FieldTransform_FieldNumber_Maximum = 4, + GCFSDocumentTransform_FieldTransform_FieldNumber_Minimum = 5, GCFSDocumentTransform_FieldTransform_FieldNumber_AppendMissingElements = 6, GCFSDocumentTransform_FieldTransform_FieldNumber_RemoveAllFromArray_p = 7, }; @@ -210,7 +212,9 @@ typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_FieldNumber) { typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) { GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_GPBUnsetOneOfCase = 0, GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_SetToServerValue = 2, - GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_NumericAdd = 3, + GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_Increment = 3, + GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_Maximum = 4, + GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_Minimum = 5, GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_AppendMissingElements = 6, GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_RemoveAllFromArray_p = 7, }; @@ -221,7 +225,7 @@ typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) { @interface GCFSDocumentTransform_FieldTransform : GPBMessage /** - * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax + * The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax * reference. **/ @property(nonatomic, readwrite, copy, null_resettable) NSString *fieldPath; @@ -244,7 +248,39 @@ typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) { * If there is positive/negative integer overflow, the field is resolved * to the largest magnitude positive/negative integer. **/ -@property(nonatomic, readwrite, strong, null_resettable) GCFSValue *numericAdd; +@property(nonatomic, readwrite, strong, null_resettable) GCFSValue *increment; + +/** + * Sets the field to the maximum of its current value and the given value. + * + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSValue *maximum; + +/** + * Sets the field to the minimum of its current value and the given value. + * + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GCFSValue *minimum; /** * Append the given elements in order if they are not already present in @@ -319,7 +355,7 @@ typedef GPB_ENUM(GCFSWriteResult_FieldNumber) { @property(nonatomic, readwrite) BOOL hasUpdateTime; /** - * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the + * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the * same order. **/ @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *transformResultsArray; @@ -337,18 +373,18 @@ typedef GPB_ENUM(GCFSDocumentChange_FieldNumber) { }; /** - * A [Document][google.firestore.v1beta1.Document] has changed. + * A [Document][google.firestore.v1.Document] has changed. * - * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that - * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document]. + * May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that + * ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. * - * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical + * Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical * change, if multiple targets are affected. **/ @interface GCFSDocumentChange : GPBMessage /** - * The new state of the [Document][google.firestore.v1beta1.Document]. + * The new state of the [Document][google.firestore.v1.Document]. * * If `mask` is set, contains only fields that were updated or added. **/ @@ -377,17 +413,17 @@ typedef GPB_ENUM(GCFSDocumentDelete_FieldNumber) { }; /** - * A [Document][google.firestore.v1beta1.Document] has been deleted. + * A [Document][google.firestore.v1.Document] has been deleted. * - * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the - * last of which deleted the [Document][google.firestore.v1beta1.Document]. + * May be the result of multiple [writes][google.firestore.v1.Write], including updates, the + * last of which deleted the [Document][google.firestore.v1.Document]. * - * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical + * Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical * delete, if multiple targets are affected. **/ @interface GCFSDocumentDelete : GPBMessage -/** The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. */ +/** The resource name of the [Document][google.firestore.v1.Document] that was deleted. */ @property(nonatomic, readwrite, copy, null_resettable) NSString *document; /** A set of target IDs for targets that previously matched this entity. */ @@ -415,18 +451,18 @@ typedef GPB_ENUM(GCFSDocumentRemove_FieldNumber) { }; /** - * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets. + * A [Document][google.firestore.v1.Document] has been removed from the view of the targets. * * Sent if the document is no longer relevant to a target and is out of view. * Can be sent instead of a DocumentDelete or a DocumentChange if the server * can not send the new value of the document. * - * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical + * Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical * write or delete, if multiple targets are affected. **/ @interface GCFSDocumentRemove : GPBMessage -/** The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. */ +/** The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. */ @property(nonatomic, readwrite, copy, null_resettable) NSString *document; /** A set of target IDs for targets that previously matched this document. */ @@ -461,7 +497,7 @@ typedef GPB_ENUM(GCFSExistenceFilter_FieldNumber) { @property(nonatomic, readwrite) int32_t targetId; /** - * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. + * The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. * * If different from the count of documents in the client that match, the * client must manually determine which documents no longer match the target. diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.m similarity index 96% rename from Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m rename to Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.m index 147810250ba..1114421abb0 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m +++ b/Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.m @@ -15,7 +15,7 @@ */ // Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/firestore/v1beta1/write.proto +// source: google/firestore/v1/write.proto // This CPP symbol can be defined to use imports that match up to the framework // imports needed when using CocoaPods. @@ -60,7 +60,7 @@ @implementation GCFSWriteRoot static GPBFileDescriptor *descriptor = NULL; if (!descriptor) { GPB_DEBUG_CHECK_RUNTIME_VERSIONS(); - descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1" + descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1" objcPrefix:@"GCFS" syntax:GPBFileSyntaxProto3]; } @@ -227,7 +227,9 @@ @implementation GCFSDocumentTransform_FieldTransform @dynamic transformTypeOneOfCase; @dynamic fieldPath; @dynamic setToServerValue; -@dynamic numericAdd; +@dynamic increment; +@dynamic maximum; +@dynamic minimum; @dynamic appendMissingElements; @dynamic removeAllFromArray_p; @@ -235,7 +237,9 @@ @implementation GCFSDocumentTransform_FieldTransform uint32_t _has_storage_[2]; GCFSDocumentTransform_FieldTransform_ServerValue setToServerValue; NSString *fieldPath; - GCFSValue *numericAdd; + GCFSValue *increment; + GCFSValue *maximum; + GCFSValue *minimum; GCFSArrayValue *appendMissingElements; GCFSArrayValue *removeAllFromArray_p; } GCFSDocumentTransform_FieldTransform__storage_; @@ -265,11 +269,29 @@ + (GPBDescriptor *)descriptor { .dataType = GPBDataTypeEnum, }, { - .name = "numericAdd", + .name = "increment", .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue), - .number = GCFSDocumentTransform_FieldTransform_FieldNumber_NumericAdd, + .number = GCFSDocumentTransform_FieldTransform_FieldNumber_Increment, .hasIndex = -1, - .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, numericAdd), + .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, increment), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "maximum", + .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue), + .number = GCFSDocumentTransform_FieldTransform_FieldNumber_Maximum, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, maximum), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "minimum", + .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue), + .number = GCFSDocumentTransform_FieldTransform_FieldNumber_Minimum, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, minimum), .flags = GPBFieldOptional, .dataType = GPBDataTypeMessage, }, diff --git a/Firestore/Protos/protos/firestore/local/maybe_document.proto b/Firestore/Protos/protos/firestore/local/maybe_document.proto index e76d5e7d9fd..43f577c2df1 100644 --- a/Firestore/Protos/protos/firestore/local/maybe_document.proto +++ b/Firestore/Protos/protos/firestore/local/maybe_document.proto @@ -21,7 +21,7 @@ option java_package = "com.google.firebase.firestore.proto"; option objc_class_prefix = "FSTPB"; -import "google/firestore/v1beta1/document.proto"; +import "google/firestore/v1/document.proto"; import "google/protobuf/timestamp.proto"; // A message indicating that the document is known to not exist. @@ -54,7 +54,7 @@ message MaybeDocument { NoDocument no_document = 1; // The document (if it exists). - google.firestore.v1beta1.Document document = 2; + google.firestore.v1.Document document = 2; // Used if the document is known to exist but its data is unknown. UnknownDocument unknown_document = 3; diff --git a/Firestore/Protos/protos/firestore/local/mutation.proto b/Firestore/Protos/protos/firestore/local/mutation.proto index 9de9a6bdaf5..9decab4017a 100644 --- a/Firestore/Protos/protos/firestore/local/mutation.proto +++ b/Firestore/Protos/protos/firestore/local/mutation.proto @@ -14,7 +14,7 @@ syntax = "proto3"; -import "google/firestore/v1beta1/write.proto"; +import "google/firestore/v1/write.proto"; import "google/protobuf/timestamp.proto"; package firestore.client; @@ -51,7 +51,7 @@ message WriteBatch { int32 batch_id = 1; // A list of writes to apply. All writes will be applied atomically. - repeated google.firestore.v1beta1.Write writes = 2; + repeated google.firestore.v1.Write writes = 2; // The local time at which the write batch was initiated. google.protobuf.Timestamp local_write_time = 3; @@ -66,5 +66,5 @@ message WriteBatch { // non-idempotent write before the write is removed from the queue. // // These writes are never sent to the backend. - repeated google.firestore.v1beta1.Write base_writes = 4; + repeated google.firestore.v1.Write base_writes = 4; } diff --git a/Firestore/Protos/protos/firestore/local/target.proto b/Firestore/Protos/protos/firestore/local/target.proto index a0cd25b8a2d..08509e61184 100644 --- a/Firestore/Protos/protos/firestore/local/target.proto +++ b/Firestore/Protos/protos/firestore/local/target.proto @@ -21,7 +21,7 @@ option java_package = "com.google.firebase.firestore.proto"; option objc_class_prefix = "FSTPB"; -import "google/firestore/v1beta1/firestore.proto"; +import "google/firestore/v1/firestore.proto"; import "google/protobuf/timestamp.proto"; // A Target is a long-lived data structure representing a resumable listen on a @@ -36,7 +36,7 @@ message Target { // The last snapshot version received from the Watch Service for this target. // // This is the same value as TargetChange.read_time - // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L734 + // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L734 google.protobuf.Timestamp snapshot_version = 2; // An opaque, server-assigned token that allows watching a query to be @@ -53,7 +53,7 @@ message Target { // the client should use the snapshot_version for its own purposes. // // This is the same value as TargetChange.resume_token - // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1beta1/firestore.proto#L722 + // https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/firestore.proto#L722 bytes resume_token = 3; // A sequence number representing the last time this query was listened to, @@ -73,10 +73,10 @@ message Target { // The server-side type of target to listen to. oneof target_type { // A target specified by a query. - google.firestore.v1beta1.Target.QueryTarget query = 5; + google.firestore.v1.Target.QueryTarget query = 5; // A target specified by a set of document names. - google.firestore.v1beta1.Target.DocumentsTarget documents = 6; + google.firestore.v1.Target.DocumentsTarget documents = 6; } } diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/common.proto b/Firestore/Protos/protos/google/firestore/v1/common.proto similarity index 88% rename from Firestore/Protos/protos/google/firestore/v1beta1/common.proto rename to Firestore/Protos/protos/google/firestore/v1/common.proto index 5ceb7b9fe68..81419e0fe91 100644 --- a/Firestore/Protos/protos/google/firestore/v1beta1/common.proto +++ b/Firestore/Protos/protos/google/firestore/v1/common.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,19 +11,20 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; -package google.firestore.v1beta1; +package google.firestore.v1; import "google/api/annotations.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; option java_multiple_files = true; option java_outer_classname = "CommonProto"; -option java_package = "com.google.firestore.v1beta1"; +option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; @@ -32,9 +33,9 @@ option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; // Used to restrict a get or update operation on a document to a subset of its // fields. // This is different from standard field masks, as this is always scoped to a -// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value]. +// [Document][google.firestore.v1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1.Value]. message DocumentMask { - // The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field + // The list of field paths in the mask. See [Document.fields][google.firestore.v1.Document.fields] for a field // path syntax reference. repeated string field_paths = 1; } diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/document.proto b/Firestore/Protos/protos/google/firestore/v1/document.proto similarity index 95% rename from Firestore/Protos/protos/google/firestore/v1beta1/document.proto rename to Firestore/Protos/protos/google/firestore/v1/document.proto index cd84c7a8c10..35b36853296 100644 --- a/Firestore/Protos/protos/google/firestore/v1beta1/document.proto +++ b/Firestore/Protos/protos/google/firestore/v1/document.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,10 +11,11 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; -package google.firestore.v1beta1; +package google.firestore.v1; import "google/api/annotations.proto"; import "google/protobuf/struct.proto"; @@ -22,10 +23,10 @@ import "google/protobuf/timestamp.proto"; import "google/type/latlng.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; option java_multiple_files = true; option java_outer_classname = "DocumentProto"; -option java_package = "com.google.firestore.v1beta1"; +option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; @@ -123,7 +124,8 @@ message Value { // An array value. // - // Cannot contain another array value. + // Cannot directly contain another array value, though can contain an + // map which contains another array. ArrayValue array_value = 9; // A map value. diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto b/Firestore/Protos/protos/google/firestore/v1/firestore.proto similarity index 86% rename from Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto rename to Firestore/Protos/protos/google/firestore/v1/firestore.proto index c7e85610e1d..dc86934f53b 100644 --- a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto +++ b/Firestore/Protos/protos/google/firestore/v1/firestore.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,32 +11,30 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; -package google.firestore.v1beta1; +package google.firestore.v1; import "google/api/annotations.proto"; -import "google/firestore/v1beta1/common.proto"; -import "google/firestore/v1beta1/document.proto"; -import "google/firestore/v1beta1/query.proto"; -import "google/firestore/v1beta1/write.proto"; +import "google/firestore/v1/common.proto"; +import "google/firestore/v1/document.proto"; +import "google/firestore/v1/query.proto"; +import "google/firestore/v1/write.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/status.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; option java_multiple_files = true; option java_outer_classname = "FirestoreProto"; -option java_package = "com.google.firestore.v1beta1"; +option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; - // Specification of the Firestore API. - - // The Cloud Firestore service. // // This service exposes several types of comparable timestamps: @@ -57,21 +55,21 @@ service Firestore { // Gets a single document. rpc GetDocument(GetDocumentRequest) returns (Document) { option (google.api.http) = { - get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" + get: "/v1/{name=projects/*/databases/*/documents/*/**}" }; } // Lists documents. rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) { option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" + get: "/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" }; } // Creates a new document. rpc CreateDocument(CreateDocumentRequest) returns (Document) { option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}" + post: "/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}" body: "document" }; } @@ -79,7 +77,7 @@ service Firestore { // Updates or inserts a document. rpc UpdateDocument(UpdateDocumentRequest) returns (Document) { option (google.api.http) = { - patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" + patch: "/v1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" }; } @@ -87,7 +85,7 @@ service Firestore { // Deletes a document. rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" + delete: "/v1/{name=projects/*/databases/*/documents/*/**}" }; } @@ -97,7 +95,7 @@ service Firestore { // same order that they were requested. rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" + post: "/v1/{database=projects/*/databases/*}/documents:batchGet" body: "*" }; } @@ -105,7 +103,7 @@ service Firestore { // Starts a new transaction. rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" + post: "/v1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" }; } @@ -113,7 +111,7 @@ service Firestore { // Commits a transaction, while optionally updating documents. rpc Commit(CommitRequest) returns (CommitResponse) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" + post: "/v1/{database=projects/*/databases/*}/documents:commit" body: "*" }; } @@ -121,7 +119,7 @@ service Firestore { // Rolls back a transaction. rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" + post: "/v1/{database=projects/*/databases/*}/documents:rollback" body: "*" }; } @@ -129,10 +127,10 @@ service Firestore { // Runs a query. rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) { option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery" + post: "/v1/{parent=projects/*/databases/*/documents}:runQuery" body: "*" additional_bindings { - post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:runQuery" + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery" body: "*" } }; @@ -141,7 +139,7 @@ service Firestore { // Streams batches of document updates and deletes, in order. rpc Write(stream WriteRequest) returns (stream WriteResponse) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:write" + post: "/v1/{database=projects/*/databases/*}/documents:write" body: "*" }; } @@ -149,7 +147,7 @@ service Firestore { // Listens to changes. rpc Listen(stream ListenRequest) returns (stream ListenResponse) { option (google.api.http) = { - post: "/v1beta1/{database=projects/*/databases/*}/documents:listen" + post: "/v1/{database=projects/*/databases/*}/documents:listen" body: "*" }; } @@ -157,17 +155,17 @@ service Firestore { // Lists all the collection IDs underneath a document. rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) { option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" + post: "/v1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" additional_bindings { - post: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds" + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds" body: "*" } }; } } -// The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument]. +// The request for [Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument]. message GetDocumentRequest { // The resource name of the Document to get. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -191,7 +189,7 @@ message GetDocumentRequest { } } -// The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The request for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -233,15 +231,15 @@ message ListDocumentsRequest { // If the list should show missing documents. A missing document is a // document that does not exist but has sub-documents. These documents will - // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time], - // or [Document.update_time][google.firestore.v1beta1.Document.update_time] set. + // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1.Document.create_time], + // or [Document.update_time][google.firestore.v1.Document.update_time] set. // // Requests with `show_missing` may not specify `where` or // `order_by`. bool show_missing = 12; } -// The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments]. +// The response for [Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments]. message ListDocumentsResponse { // The Documents found. repeated Document documents = 1; @@ -250,7 +248,7 @@ message ListDocumentsResponse { string next_page_token = 2; } -// The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument]. +// The request for [Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument]. message CreateDocumentRequest { // The parent resource. For example: // `projects/{project_id}/databases/{database_id}/documents` or @@ -275,7 +273,7 @@ message CreateDocumentRequest { DocumentMask mask = 5; } -// The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument]. +// The request for [Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument]. message UpdateDocumentRequest { // The updated document. // Creates the document if it does not already exist. @@ -301,7 +299,7 @@ message UpdateDocumentRequest { Precondition current_document = 4; } -// The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument]. +// The request for [Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument]. message DeleteDocumentRequest { // The resource name of the Document to delete. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -312,7 +310,7 @@ message DeleteDocumentRequest { Precondition current_document = 2; } -// The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The request for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -348,7 +346,7 @@ message BatchGetDocumentsRequest { } } -// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments]. +// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments]. message BatchGetDocumentsResponse { // A single result. // This can be empty if the server is just returning a transaction. @@ -363,7 +361,7 @@ message BatchGetDocumentsResponse { // The transaction that was started as part of this request. // Will only be set in the first response, and only if - // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request. + // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] was set in the request. bytes transaction = 3; // The time at which the document was read. @@ -373,7 +371,7 @@ message BatchGetDocumentsResponse { google.protobuf.Timestamp read_time = 4; } -// The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The request for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -384,13 +382,13 @@ message BeginTransactionRequest { TransactionOptions options = 2; } -// The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction]. +// The response for [Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction]. message BeginTransactionResponse { // The transaction that was started. bytes transaction = 1; } -// The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The request for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. message CommitRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -405,7 +403,7 @@ message CommitRequest { bytes transaction = 3; } -// The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit]. +// The response for [Firestore.Commit][google.firestore.v1.Firestore.Commit]. message CommitResponse { // The result of applying the writes. // @@ -417,7 +415,7 @@ message CommitResponse { google.protobuf.Timestamp commit_time = 2; } -// The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback]. +// The request for [Firestore.Rollback][google.firestore.v1.Firestore.Rollback]. message RollbackRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -427,7 +425,7 @@ message RollbackRequest { bytes transaction = 2; } -// The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The request for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. message RunQueryRequest { // The parent resource name. In the format: // `projects/{project_id}/databases/{database_id}/documents` or @@ -461,11 +459,11 @@ message RunQueryRequest { } } -// The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery]. +// The response for [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery]. message RunQueryResponse { // The transaction that was started as part of this request. // Can only be set in the first response, and only if - // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request. + // [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] was set in the request. // If set, no other fields will be set in this response. bytes transaction = 2; @@ -487,7 +485,7 @@ message RunQueryResponse { int32 skipped_results = 4; } -// The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write]. +// The request for [Firestore.Write][google.firestore.v1.Firestore.Write]. // // The first request creates a stream, or resumes an existing one from a token. // @@ -519,7 +517,7 @@ message WriteRequest { // A stream token that was previously sent by the server. // // The client should set this field to the token from the most recent - // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has + // [WriteResponse][google.firestore.v1.WriteResponse] it has received. This acknowledges that the client has // received responses up to this token. After sending this token, earlier // tokens may not be used anymore. // @@ -536,7 +534,7 @@ message WriteRequest { map labels = 5; } -// The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write]. +// The response for [Firestore.Write][google.firestore.v1.Firestore.Write]. message WriteResponse { // The ID of the stream. // Only set on the first message, when a new stream was created. @@ -558,7 +556,7 @@ message WriteResponse { google.protobuf.Timestamp commit_time = 4; } -// A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen] +// A request for [Firestore.Listen][google.firestore.v1.Firestore.Listen] message ListenRequest { // The database name. In the format: // `projects/{project_id}/databases/{database_id}`. @@ -577,20 +575,20 @@ message ListenRequest { map labels = 4; } -// The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]. +// The response for [Firestore.Listen][google.firestore.v1.Firestore.Listen]. message ListenResponse { // The supported responses. oneof response_type { // Targets have changed. TargetChange target_change = 2; - // A [Document][google.firestore.v1beta1.Document] has changed. + // A [Document][google.firestore.v1.Document] has changed. DocumentChange document_change = 3; - // A [Document][google.firestore.v1beta1.Document] has been deleted. + // A [Document][google.firestore.v1.Document] has been deleted. DocumentDelete document_delete = 4; - // A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer + // A [Document][google.firestore.v1.Document] has been removed from a target (because it is no longer // relevant to that target). DocumentRemove document_remove = 6; @@ -645,7 +643,7 @@ message Target { // If not specified, all matching Documents are returned before any // subsequent changes. oneof resume_type { - // A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target. + // A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. // // Using a resume token with a different target is unsupported and may fail. bytes resume_token = 4; @@ -737,7 +735,7 @@ message TargetChange { google.protobuf.Timestamp read_time = 6; } -// The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The request for [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsRequest { // The parent document. In the format: // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. @@ -749,11 +747,11 @@ message ListCollectionIdsRequest { int32 page_size = 2; // A page token. Must be a value from - // [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse]. + // [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. string page_token = 3; } -// The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds]. +// The response from [Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds]. message ListCollectionIdsResponse { // The collection ids. repeated string collection_ids = 1; diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/query.proto b/Firestore/Protos/protos/google/firestore/v1/query.proto similarity index 97% rename from Firestore/Protos/protos/google/firestore/v1beta1/query.proto rename to Firestore/Protos/protos/google/firestore/v1/query.proto index 5f5b0cfd4bd..f660b95748a 100644 --- a/Firestore/Protos/protos/google/firestore/v1beta1/query.proto +++ b/Firestore/Protos/protos/google/firestore/v1/query.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,20 +11,21 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; -package google.firestore.v1beta1; +package google.firestore.v1; import "google/api/annotations.proto"; -import "google/firestore/v1beta1/document.proto"; +import "google/firestore/v1/document.proto"; import "google/protobuf/wrappers.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; option java_multiple_files = true; option java_outer_classname = "QueryProto"; -option java_package = "com.google.firestore.v1beta1"; +option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/write.proto b/Firestore/Protos/protos/google/firestore/v1/write.proto similarity index 70% rename from Firestore/Protos/protos/google/firestore/v1beta1/write.proto rename to Firestore/Protos/protos/google/firestore/v1/write.proto index 015f507bbae..5b1ea918538 100644 --- a/Firestore/Protos/protos/google/firestore/v1beta1/write.proto +++ b/Firestore/Protos/protos/google/firestore/v1/write.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google Inc. +// 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. @@ -11,21 +11,22 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// syntax = "proto3"; -package google.firestore.v1beta1; +package google.firestore.v1; import "google/api/annotations.proto"; -import "google/firestore/v1beta1/common.proto"; -import "google/firestore/v1beta1/document.proto"; +import "google/firestore/v1/common.proto"; +import "google/firestore/v1/document.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Firestore.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore"; +option go_package = "google.golang.org/genproto/googleapis/firestore/v1;firestore"; option java_multiple_files = true; option java_outer_classname = "WriteProto"; -option java_package = "com.google.firestore.v1beta1"; +option java_package = "com.google.firestore.v1"; option objc_class_prefix = "GCFS"; option php_namespace = "Google\\Cloud\\Firestore\\V1beta1"; @@ -80,7 +81,7 @@ message DocumentTransform { REQUEST_TIME = 1; } - // The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax + // The path of the field. See [Document.fields][google.firestore.v1.Document.fields] for the field path syntax // reference. string field_path = 1; @@ -99,7 +100,35 @@ message DocumentTransform { // representation of double values follow IEEE 754 semantics. // If there is positive/negative integer overflow, the field is resolved // to the largest magnitude positive/negative integer. - Value numeric_add = 3; + Value increment = 3; + + // Sets the field to the maximum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the given value. + // If a maximum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the larger operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + // zero input value is always the stored value. + // The maximum of any numeric value x and NaN is NaN. + Value maximum = 4; + + // Sets the field to the minimum of its current value and the given value. + // + // This must be an integer or a double value. + // If the field is not an integer or double, or if the field does not yet + // exist, the transformation will set the field to the input value. + // If a minimum operation is applied where the field and the input value + // are of mixed types (that is - one is an integer and one is a double) + // the field takes on the type of the smaller operand. If the operands are + // equivalent (e.g. 3 and 3.0), the field does not change. + // 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + // zero input value is always the stored value. + // The minimum of any numeric value x and NaN is NaN. + Value minimum = 5; // Append the given elements in order if they are not already present in // the current field value. @@ -147,20 +176,20 @@ message WriteResult { // previous update_time. google.protobuf.Timestamp update_time = 1; - // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the + // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], in the // same order. repeated Value transform_results = 2; } -// A [Document][google.firestore.v1beta1.Document] has changed. +// A [Document][google.firestore.v1.Document] has changed. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that -// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1.Write], including deletes, that +// ultimately resulted in a new value for the [Document][google.firestore.v1.Document]. // -// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical +// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical // change, if multiple targets are affected. message DocumentChange { - // The new state of the [Document][google.firestore.v1beta1.Document]. + // The new state of the [Document][google.firestore.v1.Document]. // // If `mask` is set, contains only fields that were updated or added. Document document = 1; @@ -172,15 +201,15 @@ message DocumentChange { repeated int32 removed_target_ids = 6; } -// A [Document][google.firestore.v1beta1.Document] has been deleted. +// A [Document][google.firestore.v1.Document] has been deleted. // -// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the -// last of which deleted the [Document][google.firestore.v1beta1.Document]. +// May be the result of multiple [writes][google.firestore.v1.Write], including updates, the +// last of which deleted the [Document][google.firestore.v1.Document]. // -// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical +// Multiple [DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical // delete, if multiple targets are affected. message DocumentDelete { - // The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. + // The resource name of the [Document][google.firestore.v1.Document] that was deleted. string document = 1; // A set of target IDs for targets that previously matched this entity. @@ -192,16 +221,16 @@ message DocumentDelete { google.protobuf.Timestamp read_time = 4; } -// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets. +// A [Document][google.firestore.v1.Document] has been removed from the view of the targets. // // Sent if the document is no longer relevant to a target and is out of view. // Can be sent instead of a DocumentDelete or a DocumentChange if the server // can not send the new value of the document. // -// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical +// Multiple [DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical // write or delete, if multiple targets are affected. message DocumentRemove { - // The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. + // The resource name of the [Document][google.firestore.v1.Document] that has gone out of view. string document = 1; // A set of target IDs for targets that previously matched this document. @@ -218,7 +247,7 @@ message ExistenceFilter { // The target ID to which this filter applies. int32 target_id = 1; - // The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id]. + // The total count of documents that match [target_id][google.firestore.v1.ExistenceFilter.target_id]. // // If different from the count of documents in the client that match, the // client must manually determine which documents no longer match the target. diff --git a/Firestore/Source/Local/FSTLocalSerializer.h b/Firestore/Source/Local/FSTLocalSerializer.h index b75f3e6b7ed..3c57a35d364 100644 --- a/Firestore/Source/Local/FSTLocalSerializer.h +++ b/Firestore/Source/Local/FSTLocalSerializer.h @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Serializer for values stored in the LocalStore. * - * Note that FSTLocalSerializer currently delegates to the serializer for the Firestore v1beta1 RPC + * Note that FSTLocalSerializer currently delegates to the serializer for the Firestore v1 RPC * protocol to save implementation time and code duplication. We'll need to revisit this when the * RPC protocol we use diverges from local storage. */ diff --git a/Firestore/Source/Local/FSTLocalSerializer.mm b/Firestore/Source/Local/FSTLocalSerializer.mm index 2d69fbd86de..3b9a34f52ae 100644 --- a/Firestore/Source/Local/FSTLocalSerializer.mm +++ b/Firestore/Source/Local/FSTLocalSerializer.mm @@ -22,7 +22,7 @@ #import "Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h" #import "Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h" #import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h" #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" @@ -103,9 +103,8 @@ - (FSTMaybeDocument *)decodedMaybeDocument:(FSTPBMaybeDocument *)proto { } /** - * Encodes a Document for local storage. This differs from the v1beta1 RPC serializer for - * Documents in that it preserves the updateTime, which is considered an output only value by the - * server. + * Encodes a Document for local storage. This differs from the v1 RPC serializer for Documents in + * that it preserves the updateTime, which is considered an output only value by the server. */ - (GCFSDocument *)encodedDocument:(FSTDocument *)document { FSTSerializerBeta *remoteSerializer = self.remoteSerializer; diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index a53dda775ec..65192fd6812 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -21,11 +21,11 @@ #include #include -#import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Common.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Query.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Write.pbobjc.h" #import "Firestore/Protos/objc/google/rpc/Status.pbobjc.h" #import "Firestore/Protos/objc/google/type/Latlng.pbobjc.h" diff --git a/Firestore/core/src/firebase/firestore/local/local_serializer.cc b/Firestore/core/src/firebase/firestore/local/local_serializer.cc index 99154967460..d2da46b1c4a 100644 --- a/Firestore/core/src/firebase/firestore/local/local_serializer.cc +++ b/Firestore/core/src/firebase/firestore/local/local_serializer.cc @@ -22,7 +22,7 @@ #include "Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h" #include "Firestore/Protos/nanopb/firestore/local/target.nanopb.h" -#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h" #include "Firestore/core/src/firebase/firestore/core/query.h" #include "Firestore/core/src/firebase/firestore/model/field_value.h" #include "Firestore/core/src/firebase/firestore/model/no_document.h" @@ -113,7 +113,7 @@ std::unique_ptr LocalSerializer::DecodeMaybeDocument( void LocalSerializer::EncodeDocument(Writer* writer, const Document& doc) const { // Encode Document.name - writer->WriteTag({PB_WT_STRING, google_firestore_v1beta1_Document_name_tag}); + writer->WriteTag({PB_WT_STRING, google_firestore_v1_Document_name_tag}); writer->WriteString(rpc_serializer_.EncodeKey(doc.key())); // Encode Document.fields (unless it's empty) @@ -121,14 +121,14 @@ void LocalSerializer::EncodeDocument(Writer* writer, if (!object_value.internal_value.empty()) { rpc_serializer_.EncodeObjectMap( writer, object_value.internal_value, - google_firestore_v1beta1_Document_fields_tag, - google_firestore_v1beta1_Document_FieldsEntry_key_tag, - google_firestore_v1beta1_Document_FieldsEntry_value_tag); + google_firestore_v1_Document_fields_tag, + google_firestore_v1_Document_FieldsEntry_key_tag, + google_firestore_v1_Document_FieldsEntry_value_tag); } // Encode Document.update_time writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Document_update_time_tag}); + {PB_WT_STRING, google_firestore_v1_Document_update_time_tag}); writer->WriteNestedMessage([&](Writer* writer) { rpc_serializer_.EncodeVersion(writer, doc.version()); }); diff --git a/Firestore/core/src/firebase/firestore/local/local_serializer.h b/Firestore/core/src/firebase/firestore/local/local_serializer.h index 4fe4cd02e33..daab01b6e1e 100644 --- a/Firestore/core/src/firebase/firestore/local/local_serializer.h +++ b/Firestore/core/src/firebase/firestore/local/local_serializer.h @@ -39,9 +39,9 @@ namespace local { * @brief Serializer for values stored in the LocalStore. * * Note that local::LocalSerializer currently delegates to the - * remote::Serializer (for the Firestore v1beta1 RPC protocol) to save - * implementation time and code duplication. We'll need to revisit this when the - * RPC protocol we use diverges from local storage. + * remote::Serializer (for the Firestore v1 RPC protocol) to save implementation + * time and code duplication. We'll need to revisit this when the RPC protocol + * we use diverges from local storage. */ class LocalSerializer { public: @@ -104,7 +104,7 @@ class LocalSerializer { private: /** - * Encodes a Document for local storage. This differs from the v1beta1 RPC + * Encodes a Document for local storage. This differs from the v1 RPC * serializer for Documents in that it preserves the updateTime, which is * considered an output only value by the server. */ diff --git a/Firestore/core/src/firebase/firestore/model/field_path.cc b/Firestore/core/src/firebase/firestore/model/field_path.cc index 43e281d004f..b1dcad75a65 100644 --- a/Firestore/core/src/firebase/firestore/model/field_path.cc +++ b/Firestore/core/src/firebase/firestore/model/field_path.cc @@ -79,11 +79,6 @@ struct JoinEscaped { } // namespace FieldPath FieldPath::FromServerFormat(const absl::string_view path) { - // TODO(b/37244157): Once we move to v1beta1, we should make this more - // strict. Right now, it allows non-identifier path components, even if they - // aren't escaped. Technically, this will mangle paths with backticks in - // them used in v1alpha1, but that's fine. - SegmentsT segments; std::string segment; segment.reserve(path.size()); @@ -124,8 +119,6 @@ FieldPath FieldPath::FromServerFormat(const absl::string_view path) { break; case '\\': - // TODO(b/37244157): Make this a user-facing exception once we - // finalize field escaping. HARD_ASSERT(i + 1 != path.size(), "Trailing escape characters not allowed in %s", path); ++i; diff --git a/Firestore/core/src/firebase/firestore/nanopb/reader.cc b/Firestore/core/src/firebase/firestore/nanopb/reader.cc index fdc49330d92..0faeda32ede 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/reader.cc +++ b/Firestore/core/src/firebase/firestore/nanopb/reader.cc @@ -16,7 +16,7 @@ #include "Firestore/core/src/firebase/firestore/nanopb/reader.h" -#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/src/firebase/firestore/nanopb/tag.h b/Firestore/core/src/firebase/firestore/nanopb/tag.h index f9ad828e4de..7df689d05a1 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/tag.h +++ b/Firestore/core/src/firebase/firestore/nanopb/tag.h @@ -29,7 +29,7 @@ namespace nanopb { * field_number is one of the field tags that nanopb generates based off of * the proto messages. They're typically named in the format: * ____tag, e.g. - * google_firestore_v1beta1_Document_name_tag. + * google_firestore_v1_Document_name_tag. */ struct Tag { Tag() { diff --git a/Firestore/core/src/firebase/firestore/nanopb/writer.cc b/Firestore/core/src/firebase/firestore/nanopb/writer.cc index e4ba31013fb..d7ee9af08bb 100644 --- a/Firestore/core/src/firebase/firestore/nanopb/writer.cc +++ b/Firestore/core/src/firebase/firestore/nanopb/writer.cc @@ -16,7 +16,7 @@ #include "Firestore/core/src/firebase/firestore/nanopb/writer.h" -#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" namespace firebase { diff --git a/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt b/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt index 3b493ad92d3..175cbe96e4e 100644 --- a/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt +++ b/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt @@ -47,7 +47,7 @@ cc_select( # into the binary by converting it to a char array. add_custom_command( OUTPUT grpc_root_certificates_generated.h grpc_root_certificates_generated.cc - COMMAND ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py + COMMAND python ${FIREBASE_SOURCE_DIR}/scripts/binary_to_array.py --output_header=grpc_root_certificates_generated.h --output_source=grpc_root_certificates_generated.cc --cpp_namespace=firebase::firestore::remote diff --git a/Firestore/core/src/firebase/firestore/remote/datastore.mm b/Firestore/core/src/firebase/firestore/remote/datastore.mm index 59cca4456ac..bad609fb7c8 100644 --- a/Firestore/core/src/firebase/firestore/remote/datastore.mm +++ b/Firestore/core/src/firebase/firestore/remote/datastore.mm @@ -52,9 +52,8 @@ namespace { -const auto kRpcNameCommit = "/google.firestore.v1beta1.Firestore/Commit"; -const auto kRpcNameLookup = - "/google.firestore.v1beta1.Firestore/BatchGetDocuments"; +const auto kRpcNameCommit = "/google.firestore.v1.Firestore/Commit"; +const auto kRpcNameLookup = "/google.firestore.v1.Firestore/BatchGetDocuments"; std::unique_ptr CreateExecutor() { auto queue = dispatch_queue_create("com.google.firebase.firestore.rpc", diff --git a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h index 8c7cbb951ba..0349f04a8ff 100644 --- a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h +++ b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.h @@ -31,7 +31,7 @@ #include "Firestore/core/src/firebase/firestore/util/status.h" #include "grpcpp/support/byte_buffer.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" #import "Firestore/Source/Core/FSTTypes.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTMutation.h" diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc index 4fd71c10737..1582c5642ea 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.cc +++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc @@ -24,8 +24,8 @@ #include #include -#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h" -#include "Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1/document.nanopb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1/firestore.nanopb.h" #include "Firestore/core/include/firebase/firestore/firestore_errors.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" #include "Firestore/core/src/firebase/firestore/model/document.h" @@ -60,19 +60,19 @@ using firebase::firestore::nanopb::Tag; using firebase::firestore::nanopb::Writer; using firebase::firestore::util::Status; -// Aliases for nanopb's equivalent of google::firestore::v1beta1. This shorten +// Aliases for nanopb's equivalent of google::firestore::v1. This shorten // the symbols and allows them to fit on one line. -namespace v1beta1 { +namespace v1 { constexpr uint32_t StructuredQuery_CollectionSelector_collection_id_tag = // NOLINTNEXTLINE(whitespace/line_length) - google_firestore_v1beta1_StructuredQuery_CollectionSelector_collection_id_tag; + google_firestore_v1_StructuredQuery_CollectionSelector_collection_id_tag; constexpr uint32_t StructuredQuery_CollectionSelector_all_descendants_tag = // NOLINTNEXTLINE(whitespace/line_length) - google_firestore_v1beta1_StructuredQuery_CollectionSelector_all_descendants_tag; + google_firestore_v1_StructuredQuery_CollectionSelector_all_descendants_tag; -} // namespace v1beta1 +} // namespace v1 // TODO(rsgowman): Move this down below the anon namespace void Serializer::EncodeTimestamp(Writer* writer, @@ -138,16 +138,16 @@ absl::optional DecodeFieldsEntry( absl::optional DecodeMapValueFieldsEntry( Reader* reader) { - return DecodeFieldsEntry( - reader, google_firestore_v1beta1_MapValue_FieldsEntry_key_tag, - google_firestore_v1beta1_MapValue_FieldsEntry_value_tag); + return DecodeFieldsEntry(reader, + google_firestore_v1_MapValue_FieldsEntry_key_tag, + google_firestore_v1_MapValue_FieldsEntry_value_tag); } absl::optional DecodeDocumentFieldsEntry( Reader* reader) { - return DecodeFieldsEntry( - reader, google_firestore_v1beta1_Document_FieldsEntry_key_tag, - google_firestore_v1beta1_Document_FieldsEntry_value_tag); + return DecodeFieldsEntry(reader, + google_firestore_v1_Document_FieldsEntry_key_tag, + google_firestore_v1_Document_FieldsEntry_value_tag); } absl::optional DecodeMapValue(Reader* reader) { @@ -155,7 +155,7 @@ absl::optional DecodeMapValue(Reader* reader) { while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_MapValue_fields_tag: { + case google_firestore_v1_MapValue_fields_tag: { absl::optional fv = reader->ReadNestedMessage( DecodeMapValueFieldsEntry); @@ -246,10 +246,10 @@ absl::optional DecodeCollectionSelector( while (reader->good()) { switch (reader->ReadTag()) { - case v1beta1::StructuredQuery_CollectionSelector_collection_id_tag: + case v1::StructuredQuery_CollectionSelector_collection_id_tag: collection_selector.collection_id = reader->ReadString(); break; - case v1beta1::StructuredQuery_CollectionSelector_all_descendants_tag: + case v1::StructuredQuery_CollectionSelector_all_descendants_tag: collection_selector.all_descendants = reader->ReadBool(); break; default: @@ -265,7 +265,7 @@ absl::optional DecodeStructuredQuery(Reader* reader) { while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_StructuredQuery_from_tag: { + case google_firestore_v1_StructuredQuery_from_tag: { absl::optional collection_selector = reader->ReadNestedMessage( @@ -298,39 +298,38 @@ void Serializer::EncodeFieldValue(Writer* writer, switch (field_value.type()) { case FieldValue::Type::Null: writer->WriteTag( - {PB_WT_VARINT, google_firestore_v1beta1_Value_null_value_tag}); + {PB_WT_VARINT, google_firestore_v1_Value_null_value_tag}); writer->WriteNull(); break; case FieldValue::Type::Boolean: writer->WriteTag( - {PB_WT_VARINT, google_firestore_v1beta1_Value_boolean_value_tag}); + {PB_WT_VARINT, google_firestore_v1_Value_boolean_value_tag}); writer->WriteBool(field_value.boolean_value()); break; case FieldValue::Type::Integer: writer->WriteTag( - {PB_WT_VARINT, google_firestore_v1beta1_Value_integer_value_tag}); + {PB_WT_VARINT, google_firestore_v1_Value_integer_value_tag}); writer->WriteInteger(field_value.integer_value()); break; case FieldValue::Type::String: writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Value_string_value_tag}); + {PB_WT_STRING, google_firestore_v1_Value_string_value_tag}); writer->WriteString(field_value.string_value()); break; case FieldValue::Type::Timestamp: writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Value_timestamp_value_tag}); + {PB_WT_STRING, google_firestore_v1_Value_timestamp_value_tag}); writer->WriteNestedMessage([&field_value](Writer* writer) { EncodeTimestamp(writer, field_value.timestamp_value()); }); break; case FieldValue::Type::Object: - writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Value_map_value_tag}); + writer->WriteTag({PB_WT_STRING, google_firestore_v1_Value_map_value_tag}); writer->WriteNestedMessage([&field_value](Writer* writer) { EncodeMapValue(writer, field_value.object_value()); }); @@ -355,24 +354,24 @@ absl::optional Serializer::DecodeFieldValue(Reader* reader) { while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_Value_null_value_tag: + case google_firestore_v1_Value_null_value_tag: reader->ReadNull(); result = FieldValue::Null(); break; - case google_firestore_v1beta1_Value_boolean_value_tag: + case google_firestore_v1_Value_boolean_value_tag: result = FieldValue::FromBoolean(reader->ReadBool()); break; - case google_firestore_v1beta1_Value_integer_value_tag: + case google_firestore_v1_Value_integer_value_tag: result = FieldValue::FromInteger(reader->ReadInteger()); break; - case google_firestore_v1beta1_Value_string_value_tag: + case google_firestore_v1_Value_string_value_tag: result = FieldValue::FromString(reader->ReadString()); break; - case google_firestore_v1beta1_Value_timestamp_value_tag: { + case google_firestore_v1_Value_timestamp_value_tag: { absl::optional timestamp = reader->ReadNestedMessage(DecodeTimestamp); if (reader->status().ok()) @@ -380,7 +379,7 @@ absl::optional Serializer::DecodeFieldValue(Reader* reader) { break; } - case google_firestore_v1beta1_Value_map_value_tag: { + case google_firestore_v1_Value_map_value_tag: { // TODO(rsgowman): We should merge the existing map (if any) with the // newly parsed map. absl::optional optional_map = @@ -389,11 +388,11 @@ absl::optional Serializer::DecodeFieldValue(Reader* reader) { break; } - case google_firestore_v1beta1_Value_double_value_tag: - case google_firestore_v1beta1_Value_bytes_value_tag: - case google_firestore_v1beta1_Value_reference_value_tag: - case google_firestore_v1beta1_Value_geo_point_value_tag: - case google_firestore_v1beta1_Value_array_value_tag: + case google_firestore_v1_Value_double_value_tag: + case google_firestore_v1_Value_bytes_value_tag: + case google_firestore_v1_Value_reference_value_tag: + case google_firestore_v1_Value_geo_point_value_tag: + case google_firestore_v1_Value_array_value_tag: // TODO(b/74243929): Implement remaining types. HARD_FAIL("Unhandled message field number (tag): %i.", reader->last_tag().field_number); @@ -424,15 +423,15 @@ void Serializer::EncodeDocument(Writer* writer, const DocumentKey& key, const ObjectValue& object_value) const { // Encode Document.name - writer->WriteTag({PB_WT_STRING, google_firestore_v1beta1_Document_name_tag}); + writer->WriteTag({PB_WT_STRING, google_firestore_v1_Document_name_tag}); writer->WriteString(EncodeKey(key)); // Encode Document.fields (unless it's empty) if (!object_value.internal_value.empty()) { EncodeObjectMap(writer, object_value.internal_value, - google_firestore_v1beta1_Document_fields_tag, - google_firestore_v1beta1_Document_FieldsEntry_key_tag, - google_firestore_v1beta1_Document_FieldsEntry_value_tag); + google_firestore_v1_Document_fields_tag, + google_firestore_v1_Document_FieldsEntry_key_tag, + google_firestore_v1_Document_FieldsEntry_value_tag); } // Skip Document.create_time and Document.update_time, since they're @@ -461,7 +460,7 @@ std::unique_ptr Serializer::DecodeBatchGetDocumentsResponse( while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_BatchGetDocumentsResponse_found_tag: + case google_firestore_v1_BatchGetDocumentsResponse_found_tag: // 'found' and 'missing' are part of a oneof. The proto docs claim that // if both are set on the wire, the last one wins. missing = ""; @@ -472,7 +471,7 @@ std::unique_ptr Serializer::DecodeBatchGetDocumentsResponse( *this, &Serializer::DecodeDocument); break; - case google_firestore_v1beta1_BatchGetDocumentsResponse_missing_tag: + case google_firestore_v1_BatchGetDocumentsResponse_missing_tag: // 'found' and 'missing' are part of a oneof. The proto docs claim that // if both are set on the wire, the last one wins. found = nullptr; @@ -480,12 +479,12 @@ std::unique_ptr Serializer::DecodeBatchGetDocumentsResponse( missing = reader->ReadString(); break; - case google_firestore_v1beta1_BatchGetDocumentsResponse_read_time_tag: { + case google_firestore_v1_BatchGetDocumentsResponse_read_time_tag: { read_time = reader->ReadNestedMessage(DecodeTimestamp); break; } - case google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag: + case google_firestore_v1_BatchGetDocumentsResponse_transaction_tag: // This field is ignored by the client sdk, but we still need to extract // it. default: @@ -516,11 +515,11 @@ std::unique_ptr Serializer::DecodeDocument(Reader* reader) const { while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_Document_name_tag: + case google_firestore_v1_Document_name_tag: name = reader->ReadString(); break; - case google_firestore_v1beta1_Document_fields_tag: { + case google_firestore_v1_Document_fields_tag: { absl::optional fv = reader->ReadNestedMessage( DecodeDocumentFieldsEntry); @@ -533,7 +532,7 @@ std::unique_ptr Serializer::DecodeDocument(Reader* reader) const { break; } - case google_firestore_v1beta1_Document_update_time_tag: + case google_firestore_v1_Document_update_time_tag: // TODO(rsgowman): Rather than overwriting, we should instead merge with // the existing SnapshotVersion (if any). Less relevant here, since it's // just two numbers which are both expected to be present, but if the @@ -542,7 +541,7 @@ std::unique_ptr Serializer::DecodeDocument(Reader* reader) const { reader->ReadNestedMessage(DecodeSnapshotVersion); break; - case google_firestore_v1beta1_Document_create_time_tag: + case google_firestore_v1_Document_create_time_tag: // This field is ignored by the client sdk, but we still need to extract // it. default: @@ -562,14 +561,14 @@ void Serializer::EncodeQueryTarget(Writer* writer, std::string collection_id; if (query.path().empty()) { writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Target_QueryTarget_parent_tag}); + {PB_WT_STRING, google_firestore_v1_Target_QueryTarget_parent_tag}); writer->WriteString(EncodeQueryPath(ResourcePath::Empty())); } else { ResourcePath path = query.path(); HARD_ASSERT(path.size() % 2 != 0, "Document queries with filters are not supported."); writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_Target_QueryTarget_parent_tag}); + {PB_WT_STRING, google_firestore_v1_Target_QueryTarget_parent_tag}); writer->WriteString(EncodeQueryPath(path.PopLast())); collection_id = path.last_segment(); @@ -577,15 +576,15 @@ void Serializer::EncodeQueryTarget(Writer* writer, writer->WriteTag( {PB_WT_STRING, - google_firestore_v1beta1_Target_QueryTarget_structured_query_tag}); + google_firestore_v1_Target_QueryTarget_structured_query_tag}); writer->WriteNestedMessage([&](Writer* writer) { if (!collection_id.empty()) { writer->WriteTag( - {PB_WT_STRING, google_firestore_v1beta1_StructuredQuery_from_tag}); + {PB_WT_STRING, google_firestore_v1_StructuredQuery_from_tag}); writer->WriteNestedMessage([&](Writer* writer) { writer->WriteTag( {PB_WT_STRING, - v1beta1::StructuredQuery_CollectionSelector_collection_id_tag}); + v1::StructuredQuery_CollectionSelector_collection_id_tag}); writer->WriteString(collection_id); }); } @@ -620,11 +619,11 @@ absl::optional Serializer::DecodeQueryTarget(nanopb::Reader* reader) { while (reader->good()) { switch (reader->ReadTag()) { - case google_firestore_v1beta1_Target_QueryTarget_parent_tag: + case google_firestore_v1_Target_QueryTarget_parent_tag: path = DecodeQueryPath(reader->ReadString()); break; - case google_firestore_v1beta1_Target_QueryTarget_structured_query_tag: + case google_firestore_v1_Target_QueryTarget_structured_query_tag: query = reader->ReadNestedMessage(DecodeStructuredQuery); break; @@ -666,9 +665,9 @@ std::string Serializer::EncodeQueryPath(const ResourcePath& path) const { void Serializer::EncodeMapValue(Writer* writer, const ObjectValue& object_value) { EncodeObjectMap(writer, object_value.internal_value, - google_firestore_v1beta1_MapValue_fields_tag, - google_firestore_v1beta1_MapValue_FieldsEntry_key_tag, - google_firestore_v1beta1_MapValue_FieldsEntry_value_tag); + google_firestore_v1_MapValue_fields_tag, + google_firestore_v1_MapValue_FieldsEntry_key_tag, + google_firestore_v1_MapValue_FieldsEntry_value_tag); } void Serializer::EncodeObjectMap( diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.h b/Firestore/core/src/firebase/firestore/remote/serializer.h index 8685f417bba..e9f3973640e 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.h +++ b/Firestore/core/src/firebase/firestore/remote/serializer.h @@ -131,7 +131,7 @@ class Serializer { /** * @brief Converts the Query into bytes, representing a - * firestore::v1beta1::Target::QueryTarget. + * firestore::v1::Target::QueryTarget. * * Any errors that occur during encoding are fatal. * diff --git a/Firestore/core/src/firebase/firestore/remote/watch_stream.mm b/Firestore/core/src/firebase/firestore/remote/watch_stream.mm index 9e8d3ba75cc..3e248e53f02 100644 --- a/Firestore/core/src/firebase/firestore/remote/watch_stream.mm +++ b/Firestore/core/src/firebase/firestore/remote/watch_stream.mm @@ -19,7 +19,7 @@ #include "Firestore/core/src/firebase/firestore/util/log.h" #include "Firestore/core/src/firebase/firestore/util/status.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" namespace firebase { namespace firestore { @@ -64,8 +64,8 @@ std::unique_ptr WatchStream::CreateGrpcStream( GrpcConnection* grpc_connection, const Token& token) { - return grpc_connection->CreateStream( - "/google.firestore.v1beta1.Firestore/Listen", token, this); + return grpc_connection->CreateStream("/google.firestore.v1.Firestore/Listen", + token, this); } void WatchStream::TearDown(GrpcStream* grpc_stream) { diff --git a/Firestore/core/src/firebase/firestore/remote/write_stream.mm b/Firestore/core/src/firebase/firestore/remote/write_stream.mm index 3501e3de0e8..17f46a53e04 100644 --- a/Firestore/core/src/firebase/firestore/remote/write_stream.mm +++ b/Firestore/core/src/firebase/firestore/remote/write_stream.mm @@ -20,7 +20,7 @@ #include "Firestore/core/src/firebase/firestore/util/log.h" #include "Firestore/core/src/firebase/firestore/util/status.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" namespace firebase { namespace firestore { @@ -80,8 +80,8 @@ std::unique_ptr WriteStream::CreateGrpcStream( GrpcConnection* grpc_connection, const Token& token) { - return grpc_connection->CreateStream( - "/google.firestore.v1beta1.Firestore/Write", token, this); + return grpc_connection->CreateStream("/google.firestore.v1.Firestore/Write", + token, this); } void WriteStream::TearDown(GrpcStream* grpc_stream) { diff --git a/Firestore/core/test/firebase/firestore/local/local_serializer_test.cc b/Firestore/core/test/firebase/firestore/local/local_serializer_test.cc index 53501fb232e..95afcd1cc02 100644 --- a/Firestore/core/test/firebase/firestore/local/local_serializer_test.cc +++ b/Firestore/core/test/firebase/firestore/local/local_serializer_test.cc @@ -18,7 +18,7 @@ #include "Firestore/Protos/cpp/firestore/local/maybe_document.pb.h" #include "Firestore/Protos/cpp/firestore/local/target.pb.h" -#include "Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.h" +#include "Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h" #include "Firestore/core/src/firebase/firestore/core/query.h" #include "Firestore/core/src/firebase/firestore/local/query_data.h" #include "Firestore/core/src/firebase/firestore/model/field_value.h" @@ -38,7 +38,7 @@ namespace firebase { namespace firestore { namespace local { -namespace v1beta1 = google::firestore::v1beta1; +namespace v1 = google::firestore::v1; using core::Query; using ::google::protobuf::util::MessageDifferencer; using model::DatabaseId; @@ -205,7 +205,7 @@ TEST_F(LocalSerializerTest, EncodesDocumentAsMaybeDocument) { ::firestore::client::MaybeDocument maybe_doc_proto; maybe_doc_proto.mutable_document()->set_name( "projects/p/databases/d/documents/some/path"); - ::google::firestore::v1beta1::Value value_proto; + ::google::firestore::v1::Value value_proto; value_proto.set_string_value("bar"); maybe_doc_proto.mutable_document()->mutable_fields()->insert( {"foo", value_proto}); @@ -259,7 +259,7 @@ TEST_F(LocalSerializerTest, EncodesQueryData) { std::vector query_target_bytes; Writer writer = Writer::Wrap(&query_target_bytes); remote_serializer.EncodeQueryTarget(&writer, query_data.query()); - v1beta1::Target::QueryTarget queryTargetProto; + v1::Target::QueryTarget queryTargetProto; bool ok = queryTargetProto.ParseFromArray( query_target_bytes.data(), static_cast(query_target_bytes.size())); EXPECT_TRUE(ok); @@ -269,7 +269,7 @@ TEST_F(LocalSerializerTest, EncodesQueryData) { expected.set_last_listen_sequence_number(sequence_number); expected.mutable_snapshot_version()->set_nanos(1039000); expected.set_resume_token(resume_token.data(), resume_token.size()); - v1beta1::Target::QueryTarget* query_proto = expected.mutable_query(); + v1::Target::QueryTarget* query_proto = expected.mutable_query(); query_proto->set_parent(queryTargetProto.parent()); *query_proto->mutable_structured_query() = queryTargetProto.structured_query(); diff --git a/Firestore/core/test/firebase/firestore/remote/datastore_test.mm b/Firestore/core/test/firebase/firestore/remote/datastore_test.mm index 19692c05792..ee6a18b268f 100644 --- a/Firestore/core/test/firebase/firestore/remote/datastore_test.mm +++ b/Firestore/core/test/firebase/firestore/remote/datastore_test.mm @@ -26,8 +26,8 @@ #include "absl/memory/memory.h" #include "gtest/gtest.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Document.pbobjc.h" +#import "Firestore/Protos/objc/google/firestore/v1/Firestore.pbobjc.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc index 4250388911f..3731b624ce5 100644 --- a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc +++ b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc @@ -32,8 +32,8 @@ #include #include -#include "Firestore/Protos/cpp/google/firestore/v1beta1/document.pb.h" -#include "Firestore/Protos/cpp/google/firestore/v1beta1/firestore.pb.h" +#include "Firestore/Protos/cpp/google/firestore/v1/document.pb.h" +#include "Firestore/Protos/cpp/google/firestore/v1/firestore.pb.h" #include "Firestore/core/include/firebase/firestore/firestore_errors.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" #include "Firestore/core/src/firebase/firestore/model/field_value.h" @@ -49,7 +49,7 @@ #include "google/protobuf/util/message_differencer.h" #include "gtest/gtest.h" -namespace v1beta1 = google::firestore::v1beta1; +namespace v1 = google::firestore::v1; using firebase::Timestamp; using firebase::TimestampInternal; using firebase::firestore::FirestoreErrorCode; @@ -93,7 +93,7 @@ class SerializerTest : public ::testing::Test { Serializer serializer; void ExpectRoundTrip(const FieldValue& model, - const v1beta1::Value& proto, + const v1::Value& proto, FieldValue::Type type) { // First, serialize model with our (nanopb based) serializer, then // deserialize the resulting bytes with libprotobuf and ensure the result is @@ -109,7 +109,7 @@ class SerializerTest : public ::testing::Test { void ExpectRoundTrip(const DocumentKey& key, const FieldValue& value, const SnapshotVersion& update_time, - const v1beta1::BatchGetDocumentsResponse& proto) { + const v1::BatchGetDocumentsResponse& proto) { ExpectSerializationRoundTrip(key, value, update_time, proto); ExpectDeserializationRoundTrip(key, value, update_time, proto); } @@ -117,7 +117,7 @@ class SerializerTest : public ::testing::Test { void ExpectNoDocumentDeserializationRoundTrip( const DocumentKey& key, const SnapshotVersion& read_time, - const v1beta1::BatchGetDocumentsResponse& proto) { + const v1::BatchGetDocumentsResponse& proto) { ExpectDeserializationRoundTrip(key, absl::nullopt, read_time, proto); } @@ -166,10 +166,10 @@ class SerializerTest : public ::testing::Test { EXPECT_EQ(status.code(), reader.status().code()); } - v1beta1::Value ValueProto(std::nullptr_t) { + v1::Value ValueProto(std::nullptr_t) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::Null()); - v1beta1::Value proto; + v1::Value proto; bool ok = proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); @@ -200,44 +200,44 @@ class SerializerTest : public ::testing::Test { *byte = new_value; } - v1beta1::Value ValueProto(bool b) { + v1::Value ValueProto(bool b) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::FromBoolean(b)); - v1beta1::Value proto; + v1::Value proto; bool ok = proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); return proto; } - v1beta1::Value ValueProto(int64_t i) { + v1::Value ValueProto(int64_t i) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::FromInteger(i)); - v1beta1::Value proto; + v1::Value proto; bool ok = proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); return proto; } - v1beta1::Value ValueProto(const char* s) { + v1::Value ValueProto(const char* s) { return ValueProto(std::string(s)); } - v1beta1::Value ValueProto(const std::string& s) { + v1::Value ValueProto(const std::string& s) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::FromString(s)); - v1beta1::Value proto; + v1::Value proto; bool ok = proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); return proto; } - v1beta1::Value ValueProto(const Timestamp& ts) { + v1::Value ValueProto(const Timestamp& ts) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::FromTimestamp(ts)); - v1beta1::Value proto; + v1::Value proto; bool ok = proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); @@ -255,13 +255,13 @@ class SerializerTest : public ::testing::Test { * This method adds these ignored fields to the proto. */ void TouchIgnoredBatchGetDocumentsResponseFields( - v1beta1::BatchGetDocumentsResponse* proto) { + v1::BatchGetDocumentsResponse* proto) { proto->set_transaction("random bytes"); // TODO(rsgowman): This method currently assumes that this is a 'found' // document. We (probably) will need to adjust this to work with NoDocuments // too. - v1beta1::Document* doc_proto = proto->mutable_found(); + v1::Document* doc_proto = proto->mutable_found(); google::protobuf::Timestamp* create_time_proto = doc_proto->mutable_create_time(); create_time_proto->set_seconds(8765); @@ -270,11 +270,11 @@ class SerializerTest : public ::testing::Test { private: void ExpectSerializationRoundTrip(const FieldValue& model, - const v1beta1::Value& proto, + const v1::Value& proto, FieldValue::Type type) { EXPECT_EQ(type, model.type()); std::vector bytes = EncodeFieldValue(&serializer, model); - v1beta1::Value actual_proto; + v1::Value actual_proto; bool ok = actual_proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); @@ -282,7 +282,7 @@ class SerializerTest : public ::testing::Test { } void ExpectDeserializationRoundTrip(const FieldValue& model, - const v1beta1::Value& proto, + const v1::Value& proto, FieldValue::Type type) { size_t size = proto.ByteSizeLong(); std::vector bytes(size); @@ -301,9 +301,9 @@ class SerializerTest : public ::testing::Test { const DocumentKey& key, const FieldValue& value, const SnapshotVersion& update_time, - const v1beta1::BatchGetDocumentsResponse& proto) { + const v1::BatchGetDocumentsResponse& proto) { std::vector bytes = EncodeDocument(&serializer, key, value); - v1beta1::Document actual_proto; + v1::Document actual_proto; bool ok = actual_proto.ParseFromArray(bytes.data(), static_cast(bytes.size())); EXPECT_TRUE(ok); @@ -322,7 +322,7 @@ class SerializerTest : public ::testing::Test { proto.found().update_time().seconds()); EXPECT_EQ(update_time.timestamp().nanoseconds(), proto.found().update_time().nanos()); - v1beta1::BatchGetDocumentsResponse proto_copy{proto}; + v1::BatchGetDocumentsResponse proto_copy{proto}; proto_copy.mutable_found()->clear_update_time(); proto_copy.mutable_found()->clear_create_time(); @@ -334,7 +334,7 @@ class SerializerTest : public ::testing::Test { const DocumentKey& key, const absl::optional value, const SnapshotVersion& version, // either update_time or read_time - const v1beta1::BatchGetDocumentsResponse& proto) { + const v1::BatchGetDocumentsResponse& proto) { size_t size = proto.ByteSizeLong(); std::vector bytes(size); bool status = proto.SerializeToArray(bytes.data(), static_cast(size)); @@ -442,7 +442,7 @@ TEST_F(SerializerTest, EncodesTimestamps) { TEST_F(SerializerTest, EncodesEmptyMap) { FieldValue model = FieldValue::FromMap({}); - v1beta1::Value proto; + v1::Value proto; proto.mutable_map_value(); ExpectRoundTrip(model, proto, FieldValue::Type::Object); @@ -470,19 +470,19 @@ TEST_F(SerializerTest, EncodesNestedObjects) { })}, }); - v1beta1::Value inner_proto; - google::protobuf::Map* inner_fields = + v1::Value inner_proto; + google::protobuf::Map* inner_fields = inner_proto.mutable_map_value()->mutable_fields(); (*inner_fields)["e"] = ValueProto(std::numeric_limits::max()); - v1beta1::Value middle_proto; - google::protobuf::Map* middle_fields = + v1::Value middle_proto; + google::protobuf::Map* middle_fields = middle_proto.mutable_map_value()->mutable_fields(); (*middle_fields)["d"] = ValueProto(int64_t{100}); (*middle_fields)["nested"] = inner_proto; - v1beta1::Value proto; - google::protobuf::Map* fields = + v1::Value proto; + google::protobuf::Map* fields = proto.mutable_map_value()->mutable_fields(); (*fields)["b"] = ValueProto(true); (*fields)["i"] = ValueProto(int64_t{1}); @@ -508,35 +508,33 @@ TEST_F(SerializerTest, EncodesFieldValuesWithRepeatedEntries) { // have another alternative: nanopb. // // So we'll create a nanopb struct that *looks* like - // google_firestore_v1beta1_Value, and then populate and serialize it using + // google_firestore_v1_Value, and then populate and serialize it using // the normal nanopb mechanisms. This should give us a wire-compatible Value // message, but with multiple values set. // Copy of the real one (from the nanopb generated document.pb.h), but with // only boolean_value and integer_value. - struct google_firestore_v1beta1_Value_Fake { + struct google_firestore_v1_Value_Fake { bool boolean_value; int64_t integer_value; }; // Copy of the real one (from the nanopb generated document.pb.c), but with // only boolean_value and integer_value. - const pb_field_t google_firestore_v1beta1_Value_fields_Fake[3] = { - PB_FIELD(1, BOOL, SINGULAR, STATIC, FIRST, - google_firestore_v1beta1_Value_Fake, boolean_value, - boolean_value, 0), + const pb_field_t google_firestore_v1_Value_fields_Fake[3] = { + PB_FIELD(1, BOOL, SINGULAR, STATIC, FIRST, google_firestore_v1_Value_Fake, + boolean_value, boolean_value, 0), PB_FIELD(2, INT64, SINGULAR, STATIC, OTHER, - google_firestore_v1beta1_Value_Fake, integer_value, - boolean_value, 0), + google_firestore_v1_Value_Fake, integer_value, boolean_value, 0), PB_LAST_FIELD, }; // Craft the bytes. boolean_value has a smaller tag, so it'll get encoded // first. Implying integer_value should "win". - google_firestore_v1beta1_Value_Fake crafty_value{false, int64_t{42}}; + google_firestore_v1_Value_Fake crafty_value{false, int64_t{42}}; std::vector bytes(128); pb_ostream_t stream = pb_ostream_from_buffer(bytes.data(), bytes.size()); - pb_encode(&stream, google_firestore_v1beta1_Value_fields_Fake, &crafty_value); + pb_encode(&stream, google_firestore_v1_Value_fields_Fake, &crafty_value); bytes.resize(stream.bytes_written); // Decode the bytes into the model @@ -635,10 +633,10 @@ TEST_F(SerializerTest, BadFieldValueTagAndNoOtherTagPresent) { std::vector bytes = EncodeFieldValue(&serializer, FieldValue::Null()); - // The v1beta1::Value value_type oneof currently has tags - // up to 18. For this test, we'll pick a tag that's unlikely to be added in - // the near term but still fits within a uint8_t even when encoded. - // Specifically 31. 0xf8 represents field number 31 encoded as a varint. + // The v1::Value value_type oneof currently has tags up to 18. For this test, + // we'll pick a tag that's unlikely to be added in the near term but still + // fits within a uint8_t even when encoded. Specifically 31. 0xf8 represents + // field number 31 encoded as a varint. Mutate(&bytes[0], /*expected_initial_value=*/0x58, /*new_value=*/0xf8); ExpectFailedStatusDuringFieldValueDecode( @@ -654,7 +652,7 @@ TEST_F(SerializerTest, BadFieldValueTagWithOtherValidTagsPresent) { // Copy of the real one (from the nanopb generated document.pb.h), but with // only boolean_value and integer_value. - struct google_firestore_v1beta1_Value_Fake { + struct google_firestore_v1_Value_Fake { bool boolean_value; int64_t integer_value; }; @@ -663,23 +661,21 @@ TEST_F(SerializerTest, BadFieldValueTagWithOtherValidTagsPresent) { // only boolean_value and integer_value. Also modified such that integer_value // now has an invalid tag (instead of 2). const int invalid_tag = 31; - const pb_field_t google_firestore_v1beta1_Value_fields_Fake[3] = { - PB_FIELD(1, BOOL, SINGULAR, STATIC, FIRST, - google_firestore_v1beta1_Value_Fake, boolean_value, - boolean_value, 0), + const pb_field_t google_firestore_v1_Value_fields_Fake[3] = { + PB_FIELD(1, BOOL, SINGULAR, STATIC, FIRST, google_firestore_v1_Value_Fake, + boolean_value, boolean_value, 0), PB_FIELD(invalid_tag, INT64, SINGULAR, STATIC, OTHER, - google_firestore_v1beta1_Value_Fake, integer_value, - boolean_value, 0), + google_firestore_v1_Value_Fake, integer_value, boolean_value, 0), PB_LAST_FIELD, }; // Craft the bytes. boolean_value has a smaller tag, so it'll get encoded // first, normally implying integer_value should "win". Except that // integer_value isn't a valid tag, so it should be ignored here. - google_firestore_v1beta1_Value_Fake crafty_value{true, int64_t{42}}; + google_firestore_v1_Value_Fake crafty_value{true, int64_t{42}}; std::vector bytes(128); pb_ostream_t stream = pb_ostream_from_buffer(bytes.data(), bytes.size()); - pb_encode(&stream, google_firestore_v1beta1_Value_fields_Fake, &crafty_value); + pb_encode(&stream, google_firestore_v1_Value_fields_Fake, &crafty_value); bytes.resize(stream.bytes_written); // Decode the bytes into the model @@ -786,8 +782,8 @@ TEST_F(SerializerTest, EncodesEmptyDocument) { FieldValue empty_value = FieldValue::FromMap({}); SnapshotVersion update_time = SnapshotVersion{{1234, 5678}}; - v1beta1::BatchGetDocumentsResponse proto; - v1beta1::Document* doc_proto = proto.mutable_found(); + v1::BatchGetDocumentsResponse proto; + v1::Document* doc_proto = proto.mutable_found(); doc_proto->set_name(serializer.EncodeKey(key)); doc_proto->mutable_fields(); @@ -812,15 +808,15 @@ TEST_F(SerializerTest, EncodesNonEmptyDocument) { }); SnapshotVersion update_time = SnapshotVersion{{1234, 5678}}; - v1beta1::Value inner_proto; - google::protobuf::Map& inner_fields = + v1::Value inner_proto; + google::protobuf::Map& inner_fields = *inner_proto.mutable_map_value()->mutable_fields(); inner_fields["fourty-two"] = ValueProto(int64_t{42}); - v1beta1::BatchGetDocumentsResponse proto; - v1beta1::Document* doc_proto = proto.mutable_found(); + v1::BatchGetDocumentsResponse proto; + v1::Document* doc_proto = proto.mutable_found(); doc_proto->set_name(serializer.EncodeKey(key)); - google::protobuf::Map& m = + google::protobuf::Map& m = *doc_proto->mutable_fields(); m["foo"] = ValueProto("bar"); m["two"] = ValueProto(int64_t{2}); @@ -846,7 +842,7 @@ TEST_F(SerializerTest, // Copy of the real one (from the nanopb generated firestore.pb.h), but with // only "missing" (a field from the original proto) and an extra_field. - struct google_firestore_v1beta1_BatchGetDocumentsResponse_Fake { + struct google_firestore_v1_BatchGetDocumentsResponse_Fake { pb_callback_t missing; int64_t extra_field; }; @@ -856,18 +852,18 @@ TEST_F(SerializerTest, // now has a tag of 31. const int invalid_tag = 31; const pb_field_t - google_firestore_v1beta1_BatchGetDocumentsResponse_fields_Fake[3] = { + google_firestore_v1_BatchGetDocumentsResponse_fields_Fake[3] = { PB_FIELD(2, STRING, SINGULAR, CALLBACK, FIRST, - google_firestore_v1beta1_BatchGetDocumentsResponse_Fake, - missing, missing, 0), + google_firestore_v1_BatchGetDocumentsResponse_Fake, missing, + missing, 0), PB_FIELD(invalid_tag, INT64, SINGULAR, STATIC, OTHER, - google_firestore_v1beta1_BatchGetDocumentsResponse_Fake, + google_firestore_v1_BatchGetDocumentsResponse_Fake, extra_field, missing, 0), PB_LAST_FIELD, }; const char* missing_value = "projects/p/databases/d/documents/one/two"; - google_firestore_v1beta1_BatchGetDocumentsResponse_Fake crafty_value; + google_firestore_v1_BatchGetDocumentsResponse_Fake crafty_value; crafty_value.missing.funcs.encode = [](pb_ostream_t* stream, const pb_field_t* field, void* const* arg) { const char* missing_value = static_cast(*arg); @@ -881,8 +877,7 @@ TEST_F(SerializerTest, std::vector bytes(128); pb_ostream_t stream = pb_ostream_from_buffer(bytes.data(), bytes.size()); - pb_encode(&stream, - google_firestore_v1beta1_BatchGetDocumentsResponse_fields_Fake, + pb_encode(&stream, google_firestore_v1_BatchGetDocumentsResponse_fields_Fake, &crafty_value); bytes.resize(stream.bytes_written); @@ -909,7 +904,7 @@ TEST_F(SerializerTest, DecodesNoDocument) { SnapshotVersion read_time = SnapshotVersion{{/*seconds=*/1234, /*nanoseconds=*/5678}}; - v1beta1::BatchGetDocumentsResponse proto; + v1::BatchGetDocumentsResponse proto; proto.set_missing(serializer.EncodeKey(key)); google::protobuf::Timestamp* read_time_proto = proto.mutable_read_time(); read_time_proto->set_seconds(read_time.timestamp().seconds()); @@ -919,7 +914,7 @@ TEST_F(SerializerTest, DecodesNoDocument) { } TEST_F(SerializerTest, DecodeMaybeDocWithoutFoundOrMissingSetShouldFail) { - v1beta1::BatchGetDocumentsResponse proto; + v1::BatchGetDocumentsResponse proto; std::vector bytes(proto.ByteSizeLong()); bool status = From 05f43db0eedd5ab6b9a87f67fa57d97b9db1dfb2 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Fri, 21 Dec 2018 11:29:12 -0800 Subject: [PATCH 27/34] Add SymbolCollisionTest comment for ARCore (#2210) --- SymbolCollisionTest/Podfile | 1 + 1 file changed, 1 insertion(+) diff --git a/SymbolCollisionTest/Podfile b/SymbolCollisionTest/Podfile index ed076ea6c82..e9a2235ca66 100644 --- a/SymbolCollisionTest/Podfile +++ b/SymbolCollisionTest/Podfile @@ -31,6 +31,7 @@ target 'SymbolCollisionTest' do # pod 'FirebaseUI'. - requires use_frameworks! # Other Google Pods +# pod 'ARCore' Conflicts with FirebasePerformance via Clearcut and google-cast-sdk # pod 'Blockly' This is a Swift Pod and requires usage of use_frameworks! pod 'Crashlytics' pod 'DigitsMigrationHelper' From 466880b0944d5fc001d73cdda8e8157ab79c8453 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Fri, 21 Dec 2018 21:03:13 -0800 Subject: [PATCH 28/34] Continue work on ReferenceSet (#2213) * Migrate FSTDocumentReference to C++ * Change SortedSet template parameter ordering Makes it easier to specify a comparator without specifying what the empty member of the underlying map is. * Migrate MemoryMutationQueue to C++ references by key * migrate.py * CMake * Finish porting ReferenceSet * Swap reference set implementation * Port MemoryQueryCache to use ported ReferenceSet * Port FSTReferenceSetTest * Port usage for limbo document refs * Port LRU and LocalStore usages * Remove FSTReferenceSet and FSTDocumentReference * Style * Add newline --- .../Firestore.xcodeproj/project.pbxproj | 8 +- .../Local/FSTLRUGarbageCollectorTests.mm | 4 + .../Local/FSTLevelDBMutationQueueTests.mm | 4 + .../Tests/Local/FSTLevelDBQueryCacheTests.mm | 7 +- .../Local/FSTMemoryMutationQueueTests.mm | 7 +- .../Tests/Local/FSTMemoryQueryCacheTests.mm | 9 +- .../Example/Tests/Local/FSTQueryCacheTests.mm | 1 + .../Tests/Local/FSTReferenceSetTests.mm | 88 ----------- Firestore/Source/Core/FSTSyncEngine.mm | 22 +-- Firestore/Source/Local/FSTDocumentReference.h | 63 -------- .../Source/Local/FSTDocumentReference.mm | 95 ------------ Firestore/Source/Local/FSTLevelDB.mm | 9 +- Firestore/Source/Local/FSTLocalStore.mm | 19 ++- .../Source/Local/FSTMemoryMutationQueue.mm | 87 +++++------ .../Source/Local/FSTMemoryPersistence.mm | 15 +- Firestore/Source/Local/FSTMemoryQueryCache.mm | 1 - Firestore/Source/Local/FSTPersistence.h | 4 +- Firestore/Source/Local/FSTReferenceSet.h | 70 --------- Firestore/Source/Local/FSTReferenceSet.mm | 144 ------------------ .../firebase/firestore/immutable/sorted_set.h | 8 +- .../firebase/firestore/local/CMakeLists.txt | 4 + .../firestore/local/document_reference.cc | 69 +++++++++ .../firestore/local/document_reference.h | 97 ++++++++++++ .../firestore/local/memory_query_cache.h | 4 +- .../firestore/local/memory_query_cache.mm | 18 +-- .../firebase/firestore/local/reference_set.cc | 101 ++++++++++++ .../firebase/firestore/local/reference_set.h | 94 ++++++++++++ .../firestore/local/reference_set_test.cc | 84 ++++++++++ 28 files changed, 566 insertions(+), 570 deletions(-) delete mode 100644 Firestore/Example/Tests/Local/FSTReferenceSetTests.mm delete mode 100644 Firestore/Source/Local/FSTDocumentReference.h delete mode 100644 Firestore/Source/Local/FSTDocumentReference.mm delete mode 100644 Firestore/Source/Local/FSTReferenceSet.h delete mode 100644 Firestore/Source/Local/FSTReferenceSet.mm create mode 100644 Firestore/core/src/firebase/firestore/local/document_reference.cc create mode 100644 Firestore/core/src/firebase/firestore/local/document_reference.h create mode 100644 Firestore/core/src/firebase/firestore/local/reference_set.cc create mode 100644 Firestore/core/src/firebase/firestore/local/reference_set.h create mode 100644 Firestore/core/test/firebase/firestore/local/reference_set_test.cc diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj index 5fad47bf7ef..0f49daf6717 100644 --- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj +++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ /* Begin PBXBuildFile section */ 020AFD89BB40E5175838BB76 /* local_serializer_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = F8043813A5D16963EC02B182 /* local_serializer_test.cc */; }; 0535C1B65DADAE1CE47FA3CA /* string_format_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */; }; + 132E3483789344640A52F223 /* reference_set_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 132E32997D781B896672D30A /* reference_set_test.cc */; }; 132E3E53179DE287D875F3F2 /* FSTLevelDBTransactionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 132E36BB104830BD806351AC /* FSTLevelDBTransactionTests.mm */; }; 132E3EE56C143B2C9ACB6187 /* FSTLevelDBBenchmarkTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 132E3BB3D5C42282B4ACFB20 /* FSTLevelDBBenchmarkTests.mm */; }; 1CAA9012B25F975D445D5978 /* strerror_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 358C3B5FE573B1D60A4F7592 /* strerror_test.cc */; }; @@ -102,7 +103,6 @@ 5492E0AC2021552D00B64F25 /* FSTMutationQueueTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0962021552C00B64F25 /* FSTMutationQueueTests.mm */; }; 5492E0AD2021552D00B64F25 /* FSTMemoryMutationQueueTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0972021552C00B64F25 /* FSTMemoryMutationQueueTests.mm */; }; 5492E0AE2021552D00B64F25 /* FSTLevelDBQueryCacheTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0982021552C00B64F25 /* FSTLevelDBQueryCacheTests.mm */; }; - 5492E0AF2021552D00B64F25 /* FSTReferenceSetTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E09A2021552C00B64F25 /* FSTReferenceSetTests.mm */; }; 5492E0B12021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E09C2021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm */; }; 5492E0B92021555100B64F25 /* FSTDocumentKeyTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0B22021555000B64F25 /* FSTDocumentKeyTests.mm */; }; 5492E0BA2021555100B64F25 /* FSTDocumentSetTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5492E0B32021555100B64F25 /* FSTDocumentSetTests.mm */; }; @@ -300,6 +300,7 @@ 11984BA0A99D7A7ABA5B0D90 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.release.xcconfig"; sourceTree = ""; }; 1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_IntegrationTests_iOS/Pods-Firestore_IntegrationTests_iOS.debug.xcconfig"; sourceTree = ""; }; 12F4357299652983A615F886 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 132E32997D781B896672D30A /* reference_set_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = reference_set_test.cc; sourceTree = ""; }; 132E36BB104830BD806351AC /* FSTLevelDBTransactionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTLevelDBTransactionTests.mm; sourceTree = ""; }; 132E3BB3D5C42282B4ACFB20 /* FSTLevelDBBenchmarkTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTLevelDBBenchmarkTests.mm; sourceTree = ""; }; 2A0CF41BA5AED6049B0BEB2C /* type_traits_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = type_traits_apple_test.mm; sourceTree = ""; }; @@ -389,7 +390,6 @@ 5492E0972021552C00B64F25 /* FSTMemoryMutationQueueTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTMemoryMutationQueueTests.mm; sourceTree = ""; }; 5492E0982021552C00B64F25 /* FSTLevelDBQueryCacheTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTLevelDBQueryCacheTests.mm; sourceTree = ""; }; 5492E0992021552C00B64F25 /* FSTPersistenceTestHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FSTPersistenceTestHelpers.h; sourceTree = ""; }; - 5492E09A2021552C00B64F25 /* FSTReferenceSetTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTReferenceSetTests.mm; sourceTree = ""; }; 5492E09C2021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTRemoteDocumentCacheTests.mm; sourceTree = ""; }; 5492E0B22021555000B64F25 /* FSTDocumentKeyTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTDocumentKeyTests.mm; sourceTree = ""; }; 5492E0B32021555100B64F25 /* FSTDocumentSetTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTDocumentSetTests.mm; sourceTree = ""; }; @@ -768,6 +768,7 @@ 54995F6E205B6E12004EFFA0 /* leveldb_key_test.cc */, 332485C4DCC6BA0DBB5E31B7 /* leveldb_util_test.cc */, F8043813A5D16963EC02B182 /* local_serializer_test.cc */, + 132E32997D781B896672D30A /* reference_set_test.cc */, ); path = local; sourceTree = ""; @@ -1112,7 +1113,6 @@ 5492E08D2021552B00B64F25 /* FSTPersistenceTestHelpers.mm */, 5492E0952021552C00B64F25 /* FSTQueryCacheTests.h */, 5492E0892021552A00B64F25 /* FSTQueryCacheTests.mm */, - 5492E09A2021552C00B64F25 /* FSTReferenceSetTests.mm */, 5492E0852021552A00B64F25 /* FSTRemoteDocumentCacheTests.h */, 5492E09C2021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm */, ); @@ -1907,7 +1907,6 @@ 5492E0A22021552D00B64F25 /* FSTQueryCacheTests.mm in Sources */, 5492E064202154B900B64F25 /* FSTQueryListenerTests.mm in Sources */, 5492E068202154B900B64F25 /* FSTQueryTests.mm in Sources */, - 5492E0AF2021552D00B64F25 /* FSTReferenceSetTests.mm in Sources */, 5492E0B12021552D00B64F25 /* FSTRemoteDocumentCacheTests.mm in Sources */, 5492E0C92021557E00B64F25 /* FSTRemoteEventTests.mm in Sources */, 5492E0C72021557E00B64F25 /* FSTSerializerBetaTests.mm in Sources */, @@ -2001,6 +2000,7 @@ C80B10E79CDD7EF7843C321E /* type_traits_apple_test.mm in Sources */, ABC1D7DE2023A05300BA84F0 /* user_test.cc in Sources */, 544129DE21C2DDC800EFB9CC /* write.pb.cc in Sources */, + 132E3483789344640A52F223 /* reference_set_test.cc in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm index 296791b1ce9..58f4b41cd5f 100644 --- a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm +++ b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm @@ -31,6 +31,7 @@ #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Util/FSTClasses.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/precondition.h" @@ -42,6 +43,7 @@ using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; using firebase::firestore::local::LruResults; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeyHash; @@ -65,6 +67,7 @@ @implementation FSTLRUGarbageCollectorTests { FSTLRUGarbageCollector *_gc; ListenSequenceNumber _initialSequenceNumber; User _user; + ReferenceSet _additionalReferences; } - (void)setUp { @@ -85,6 +88,7 @@ - (BOOL)isTestBaseClass { - (void)newTestResourcesWithLruParams:(LruParams)lruParams { HARD_ASSERT(_persistence == nil, "Persistence already created"); _persistence = [self newPersistenceWithLruParams:lruParams]; + [_persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; _queryCache = [_persistence queryCache]; _documentCache = [_persistence remoteDocumentCache]; _mutationQueue = [_persistence mutationQueueForUser:_user]; diff --git a/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm index 2700c71677b..fe5a17c05eb 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBMutationQueueTests.mm @@ -28,6 +28,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/util/ordered_code.h" #include "absl/strings/string_view.h" #include "leveldb/db.h" @@ -36,6 +37,7 @@ using firebase::firestore::auth::User; using firebase::firestore::local::LevelDbMutationKey; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::BatchId; using firebase::firestore::util::OrderedCode; using leveldb::DB; @@ -68,11 +70,13 @@ @interface FSTLevelDBMutationQueueTests : FSTMutationQueueTests @implementation FSTLevelDBMutationQueueTests { FSTLevelDB *_db; + ReferenceSet _additionalReferences; } - (void)setUp { [super setUp]; _db = [FSTPersistenceTestHelpers levelDBPersistence]; + [_db.referenceDelegate addInMemoryPins:&_additionalReferences]; self.mutationQueue = [_db mutationQueueForUser:User("user")]; self.persistence = _db; diff --git a/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm index 88ad6e935dc..47141c61c33 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm @@ -26,11 +26,13 @@ #import "Firestore/Example/Tests/Local/FSTQueryCacheTests.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" using firebase::Timestamp; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::ListenSequenceNumber; using firebase::firestore::model::ResourcePath; @@ -48,13 +50,16 @@ @interface FSTLevelDBQueryCacheTests : FSTQueryCacheTests * FSTQueryCacheTests. This class is merely responsible for setting up and tearing down the * @a queryCache. */ -@implementation FSTLevelDBQueryCacheTests +@implementation FSTLevelDBQueryCacheTests { + ReferenceSet _additionalReferences; +} - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers levelDBPersistence]; self.queryCache = [self.persistence queryCache]; + [self.persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; } - (void)tearDown { diff --git a/Firestore/Example/Tests/Local/FSTMemoryMutationQueueTests.mm b/Firestore/Example/Tests/Local/FSTMemoryMutationQueueTests.mm index 67397b4be82..97b94afc20d 100644 --- a/Firestore/Example/Tests/Local/FSTMemoryMutationQueueTests.mm +++ b/Firestore/Example/Tests/Local/FSTMemoryMutationQueueTests.mm @@ -22,8 +22,10 @@ #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" using firebase::firestore::auth::User; +using firebase::firestore::local::ReferenceSet; @interface FSTMemoryMutationQueueTests : FSTMutationQueueTests @end @@ -32,12 +34,15 @@ @interface FSTMemoryMutationQueueTests : FSTMutationQueueTests * The tests for FSTMemoryMutationQueue are performed on the FSTMutationQueue protocol in * FSTMutationQueueTests. This class is merely responsible for setting up the @a mutationQueue. */ -@implementation FSTMemoryMutationQueueTests +@implementation FSTMemoryMutationQueueTests { + ReferenceSet _additionalReferences; +} - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers eagerGCMemoryPersistence]; + [self.persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; self.mutationQueue = [self.persistence mutationQueueForUser:User("user")]; } diff --git a/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm index 524a94b80ee..3fd4f703aa7 100644 --- a/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm @@ -21,6 +21,10 @@ #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #import "Firestore/Example/Tests/Local/FSTQueryCacheTests.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" + +using firebase::firestore::local::ReferenceSet; + NS_ASSUME_NONNULL_BEGIN @interface FSTMemoryQueryCacheTests : FSTQueryCacheTests @@ -31,13 +35,16 @@ @interface FSTMemoryQueryCacheTests : FSTQueryCacheTests * FSTQueryCacheTests. This class is merely responsible for setting up and tearing down the * @a queryCache. */ -@implementation FSTMemoryQueryCacheTests +@implementation FSTMemoryQueryCacheTests { + ReferenceSet _additionalReferences; +} - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers eagerGCMemoryPersistence]; self.queryCache = [self.persistence queryCache]; + [self.persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; } - (void)tearDown { diff --git a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm index e45dd209462..a908854f459 100644 --- a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm @@ -26,6 +26,7 @@ #import "Firestore/Example/Tests/Util/FSTHelpers.h" #import "Firestore/third_party/Immutable/Tests/FSTImmutableSortedSet+Testing.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" diff --git a/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm b/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm deleted file mode 100644 index c4e4f7cdbb5..00000000000 --- a/Firestore/Example/Tests/Local/FSTReferenceSetTests.mm +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTReferenceSet.h" - -#import - -#import "Firestore/Example/Tests/Util/FSTHelpers.h" - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" - -using firebase::firestore::model::DocumentKey; - -NS_ASSUME_NONNULL_BEGIN - -@interface FSTReferenceSetTests : XCTestCase -@end - -@implementation FSTReferenceSetTests - -- (void)testAddOrRemoveReferences { - DocumentKey key = FSTTestDocKey(@"foo/bar"); - - FSTReferenceSet *referenceSet = [[FSTReferenceSet alloc] init]; - XCTAssertTrue([referenceSet isEmpty]); - XCTAssertFalse([referenceSet containsKey:key]); - - [referenceSet addReferenceToKey:key forID:1]; - XCTAssertTrue([referenceSet containsKey:key]); - XCTAssertFalse([referenceSet isEmpty]); - - [referenceSet addReferenceToKey:key forID:2]; - XCTAssertTrue([referenceSet containsKey:key]); - - [referenceSet removeReferenceToKey:key forID:1]; - XCTAssertTrue([referenceSet containsKey:key]); - - [referenceSet removeReferenceToKey:key forID:3]; - XCTAssertTrue([referenceSet containsKey:key]); - - [referenceSet removeReferenceToKey:key forID:2]; - XCTAssertFalse([referenceSet containsKey:key]); - XCTAssertTrue([referenceSet isEmpty]); -} - -- (void)testRemoveAllReferencesForTargetID { - DocumentKey key1 = FSTTestDocKey(@"foo/bar"); - DocumentKey key2 = FSTTestDocKey(@"foo/baz"); - DocumentKey key3 = FSTTestDocKey(@"foo/blah"); - FSTReferenceSet *referenceSet = [[FSTReferenceSet alloc] init]; - - [referenceSet addReferenceToKey:key1 forID:1]; - [referenceSet addReferenceToKey:key2 forID:1]; - [referenceSet addReferenceToKey:key3 forID:2]; - XCTAssertFalse([referenceSet isEmpty]); - XCTAssertTrue([referenceSet containsKey:key1]); - XCTAssertTrue([referenceSet containsKey:key2]); - XCTAssertTrue([referenceSet containsKey:key3]); - - [referenceSet removeReferencesForID:1]; - XCTAssertFalse([referenceSet isEmpty]); - XCTAssertFalse([referenceSet containsKey:key1]); - XCTAssertFalse([referenceSet containsKey:key2]); - XCTAssertTrue([referenceSet containsKey:key3]); - - [referenceSet removeReferencesForID:2]; - XCTAssertTrue([referenceSet isEmpty]); - XCTAssertFalse([referenceSet containsKey:key1]); - XCTAssertFalse([referenceSet containsKey:key2]); - XCTAssertFalse([referenceSet containsKey:key3]); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Core/FSTSyncEngine.mm b/Firestore/Source/Core/FSTSyncEngine.mm index 69e2e6b2e87..c5ac31f0cbf 100644 --- a/Firestore/Source/Core/FSTSyncEngine.mm +++ b/Firestore/Source/Core/FSTSyncEngine.mm @@ -30,7 +30,6 @@ #import "Firestore/Source/Local/FSTLocalViewChanges.h" #import "Firestore/Source/Local/FSTLocalWriteResult.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTDocumentSet.h" #import "Firestore/Source/Model/FSTMutationBatch.h" @@ -38,6 +37,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_map.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" @@ -47,6 +47,7 @@ using firebase::firestore::auth::HashUser; using firebase::firestore::auth::User; using firebase::firestore::core::TargetIdGenerator; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; @@ -157,9 +158,6 @@ @interface FSTSyncEngine () @property(nonatomic, strong, readonly) NSMutableDictionary *queryViewsByTarget; -/** Used to track any documents that are currently in limbo. */ -@property(nonatomic, strong, readonly) FSTReferenceSet *limboDocumentRefs; - @end @implementation FSTSyncEngine { @@ -183,6 +181,9 @@ @implementation FSTSyncEngine { std::map _limboResolutionsByTarget; User _currentUser; + + /** Used to track any documents that are currently in limbo. */ + ReferenceSet _limboDocumentRefs; } - (instancetype)initWithLocalStore:(FSTLocalStore *)localStore @@ -195,7 +196,6 @@ - (instancetype)initWithLocalStore:(FSTLocalStore *)localStore _queryViewsByQuery = [NSMutableDictionary dictionary]; _queryViewsByTarget = [NSMutableDictionary dictionary]; - _limboDocumentRefs = [[FSTReferenceSet alloc] init]; _targetIdGenerator = TargetIdGenerator::SyncEngineTargetIdGenerator(); _currentUser = initialUser; } @@ -468,10 +468,10 @@ - (void)removeAndCleanupQuery:(FSTQueryView *)queryView { [self.queryViewsByQuery removeObjectForKey:queryView.query]; [self.queryViewsByTarget removeObjectForKey:@(queryView.targetID)]; - DocumentKeySet limboKeys = [self.limboDocumentRefs referencedKeysForID:queryView.targetID]; - [self.limboDocumentRefs removeReferencesForID:queryView.targetID]; + DocumentKeySet limboKeys = _limboDocumentRefs.ReferencedKeys(queryView.targetID); + _limboDocumentRefs.RemoveReferences(queryView.targetID); for (const DocumentKey &key : limboKeys) { - if (![self.limboDocumentRefs containsKey:key]) { + if (!_limboDocumentRefs.ContainsKey(key)) { // We removed the last reference for this key. [self removeLimboTargetForKey:key]; } @@ -531,14 +531,14 @@ - (void)updateTrackedLimboDocumentsWithChanges:(NSArray - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/types.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * An immutable value used to keep track of an association between some referencing target or batch - * and a document key that the target or batch references. - * - * A reference can be from either listen targets (identified by their TargetId) or mutation batches - * (identified by their BatchId). See FSTGarbageCollector for more details. - * - * Not to be confused with FIRDocumentReference. - */ -@interface FSTDocumentReference : NSObject - -/** Initializes the document reference with the given key and ID. */ -- (instancetype)initWithKey:(firebase::firestore::model::DocumentKey)key - ID:(int32_t)ID NS_DESIGNATED_INITIALIZER; - -- (instancetype)init NS_UNAVAILABLE; - -/** The document key that's the target of this reference. */ -- (const firebase::firestore::model::DocumentKey &)key; - -/** - * The targetID of a referring target or the batchID of a referring mutation batch. (Which this is - * depends upon which FSTReferenceSet this reference is a part of.) - */ -@property(nonatomic, assign, readonly) int32_t ID; - -@end - -#pragma mark Comparators - -/** Sorts document references by key then ID. */ -extern const NSComparator FSTDocumentReferenceComparatorByKey; - -/** Sorts document references by ID then key. */ -extern const NSComparator FSTDocumentReferenceComparatorByID; - -/** A callback for use when enumerating an FSTImmutableSortedSet of FSTDocumentReferences. */ -typedef void (^FSTDocumentReferenceBlock)(FSTDocumentReference *reference, BOOL *stop); - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTDocumentReference.mm b/Firestore/Source/Local/FSTDocumentReference.mm deleted file mode 100644 index bdba50b2f4e..00000000000 --- a/Firestore/Source/Local/FSTDocumentReference.mm +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTDocumentReference.h" - -#include - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/util/comparison.h" - -using firebase::firestore::model::DocumentKey; -using firebase::firestore::util::WrapCompare; - -NS_ASSUME_NONNULL_BEGIN - -@implementation FSTDocumentReference { - DocumentKey _key; -} - -- (instancetype)initWithKey:(DocumentKey)key ID:(int32_t)ID { - self = [super init]; - if (self) { - _key = std::move(key); - _ID = ID; - } - return self; -} - -- (BOOL)isEqual:(id)other { - if (other == self) return YES; - if (![[other class] isEqual:[self class]]) return NO; - - FSTDocumentReference *reference = (FSTDocumentReference *)other; - - return self.key == reference.key && self.ID == reference.ID; -} - -- (NSUInteger)hash { - NSUInteger result = [self.key hash]; - result = result * 31u + self.ID; - return result; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"", - self.key.ToString().c_str(), self.ID]; -} - -- (id)copyWithZone:(nullable NSZone *)zone { - // FSTDocumentReference is immutable - return self; -} - -- (const firebase::firestore::model::DocumentKey &)key { - return _key; -} - -@end - -#pragma mark Comparators - -/** Sorts document references by key then ID. */ -const NSComparator FSTDocumentReferenceComparatorByKey = - ^NSComparisonResult(FSTDocumentReference *left, FSTDocumentReference *right) { - NSComparisonResult result = CompareKeys(left.key, right.key); - if (result != NSOrderedSame) { - return result; - } - return WrapCompare(left.ID, right.ID); - }; - -/** Sorts document references by ID then key. */ -const NSComparator FSTDocumentReferenceComparatorByID = - ^NSComparisonResult(FSTDocumentReference *left, FSTDocumentReference *right) { - NSComparisonResult result = WrapCompare(left.ID, right.ID); - if (result != NSOrderedSame) { - return result; - } - return CompareKeys(left.key, right.key); - }; - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index 365b36fe5a5..c9b83995b27 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -24,7 +24,6 @@ #import "Firestore/Source/Local/FSTLRUGarbageCollector.h" #import "Firestore/Source/Local/FSTLevelDBMutationQueue.h" #import "Firestore/Source/Local/FSTLevelDBQueryCache.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #import "Firestore/Source/Remote/FSTSerializerBeta.h" #include "Firestore/core/include/firebase/firestore/firestore_errors.h" @@ -35,6 +34,7 @@ #include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_util.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" @@ -64,6 +64,7 @@ using firebase::firestore::local::LevelDbRemoteDocumentCache; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::local::LruParams; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DatabaseId; using firebase::firestore::model::DocumentKey; @@ -110,7 +111,7 @@ @implementation FSTLevelDBLRUDelegate { // This delegate should have the same lifetime as the persistence layer, but mark as // weak to avoid retain cycle. __weak FSTLevelDB *_db; - FSTReferenceSet *_additionalReferences; + ReferenceSet *_additionalReferences; ListenSequenceNumber _currentSequenceNumber; FSTListenSequence *_listenSequence; } @@ -145,7 +146,7 @@ - (ListenSequenceNumber)currentSequenceNumber { return _currentSequenceNumber; } -- (void)addInMemoryPins:(FSTReferenceSet *)set { +- (void)addInMemoryPins:(ReferenceSet *)set { // We should be able to assert that _additionalReferences is nil, but due to restarts in spec // tests it would fail. _additionalReferences = set; @@ -185,7 +186,7 @@ - (BOOL)mutationQueuesContainKey:(const DocumentKey &)docKey { } - (BOOL)isPinned:(const DocumentKey &)docKey { - if ([_additionalReferences containsKey:docKey]) { + if (_additionalReferences->ContainsKey(docKey)) { return YES; } if ([self mutationQueuesContainKey:docKey]) { diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index 684ce15543b..fcc8ffaa59f 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -30,7 +30,6 @@ #import "Firestore/Source/Local/FSTPersistence.h" #import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" @@ -39,6 +38,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" #include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @@ -47,6 +47,7 @@ using firebase::firestore::auth::User; using firebase::firestore::core::TargetIdGenerator; using firebase::firestore::local::LruResults; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; @@ -79,9 +80,6 @@ @interface FSTLocalStore () /** The "local" view of all documents (layering mutationQueue on top of remoteDocumentCache). */ @property(nonatomic, strong) FSTLocalDocumentsView *localDocuments; -/** The set of document references maintained by any local views. */ -@property(nonatomic, strong) FSTReferenceSet *localViewReferences; - /** Maps a query to the data about that query. */ @property(nonatomic, strong) id queryCache; @@ -95,6 +93,9 @@ @implementation FSTLocalStore { TargetIdGenerator _targetIDGenerator; /** The set of all cached remote documents. */ RemoteDocumentCache *_remoteDocumentCache; + + /** The set of document references maintained by any local views. */ + ReferenceSet _localViewReferences; } - (instancetype)initWithPersistence:(id)persistence @@ -106,8 +107,7 @@ - (instancetype)initWithPersistence:(id)persistence _queryCache = [persistence queryCache]; _localDocuments = [FSTLocalDocumentsView viewWithRemoteDocumentCache:_remoteDocumentCache mutationQueue:_mutationQueue]; - _localViewReferences = [[FSTReferenceSet alloc] init]; - [_persistence.referenceDelegate addInMemoryPins:_localViewReferences]; + [_persistence.referenceDelegate addInMemoryPins:&_localViewReferences]; _targetIDs = [NSMutableDictionary dictionary]; @@ -359,13 +359,12 @@ - (BOOL)shouldPersistQueryData:(FSTQueryData *)newQueryData - (void)notifyLocalViewChanges:(NSArray *)viewChanges { self.persistence.run("NotifyLocalViewChanges", [&]() { - FSTReferenceSet *localViewReferences = self.localViewReferences; for (FSTLocalViewChanges *viewChange in viewChanges) { for (const DocumentKey &key : viewChange.removedKeys) { [self->_persistence.referenceDelegate removeReference:key]; } - [localViewReferences addReferencesToKeys:viewChange.addedKeys forID:viewChange.targetID]; - [localViewReferences removeReferencesToKeys:viewChange.removedKeys forID:viewChange.targetID]; + _localViewReferences.AddReferences(viewChange.addedKeys, viewChange.targetID); + _localViewReferences.AddReferences(viewChange.removedKeys, viewChange.targetID); } }); } @@ -426,7 +425,7 @@ - (void)releaseQuery:(FSTQuery *)query { // query's target data from the reference delegate. Since this does not remove references // for locally mutated documents, we have to remove the target associations for these // documents manually. - DocumentKeySet removed = [self.localViewReferences removeReferencesForID:targetID]; + DocumentKeySet removed = _localViewReferences.RemoveReferences(targetID); for (const DocumentKey &key : removed) { [self.persistence.referenceDelegate removeReference:key]; } diff --git a/Firestore/Source/Local/FSTMemoryMutationQueue.mm b/Firestore/Source/Local/FSTMemoryMutationQueue.mm index 618e6efcd01..93e9d0dde9d 100644 --- a/Firestore/Source/Local/FSTMemoryMutationQueue.mm +++ b/Firestore/Source/Local/FSTMemoryMutationQueue.mm @@ -22,16 +22,18 @@ #import "Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h" #import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Local/FSTDocumentReference.h" #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Model/FSTMutationBatch.h" -#import "Firestore/third_party/Immutable/FSTImmutableSortedSet.h" +#include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/document_reference.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" +using firebase::firestore::immutable::SortedSet; +using firebase::firestore::local::DocumentReference; using firebase::firestore::model::BatchId; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeySet; @@ -63,9 +65,6 @@ @interface FSTMemoryMutationQueue () */ @property(nonatomic, strong, readonly) NSMutableArray *queue; -/** An ordered mapping between documents and the mutation batch IDs. */ -@property(nonatomic, strong) FSTImmutableSortedSet *batchesByDocumentKey; - /** The next value to use when assigning sequential IDs to each mutation batch. */ @property(nonatomic, assign) BatchId nextBatchID; @@ -81,16 +80,18 @@ @interface FSTMemoryMutationQueue () @end +using DocumentReferenceSet = SortedSet; + @implementation FSTMemoryMutationQueue { FSTMemoryPersistence *_persistence; + /** An ordered mapping between documents and the mutation batch IDs. */ + DocumentReferenceSet _batchesByDocumentKey; } - (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence { if (self = [super init]) { _persistence = persistence; _queue = [NSMutableArray array]; - _batchesByDocumentKey = - [FSTImmutableSortedSet setWithComparator:FSTDocumentReferenceComparatorByKey]; _nextBatchID = 1; _highestAcknowledgedBatchID = kFSTBatchIDUnknown; @@ -162,12 +163,9 @@ - (FSTMutationBatch *)addMutationBatchWithWriteTime:(FIRTimestamp *)localWriteTi [queue addObject:batch]; // Track references by document key. - FSTImmutableSortedSet *references = self.batchesByDocumentKey; for (FSTMutation *mutation in batch.mutations) { - references = [references - setByAddingObject:[[FSTDocumentReference alloc] initWithKey:mutation.key ID:batchID]]; + _batchesByDocumentKey = _batchesByDocumentKey.insert(DocumentReference{mutation.key, batchID}); } - self.batchesByDocumentKey = references; return batch; } @@ -204,41 +202,32 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { - (NSArray *)allMutationBatchesAffectingDocumentKey: (const DocumentKey &)documentKey { - FSTDocumentReference *start = [[FSTDocumentReference alloc] initWithKey:documentKey ID:0]; - NSMutableArray *result = [NSMutableArray array]; - FSTDocumentReferenceBlock block = ^(FSTDocumentReference *reference, BOOL *stop) { - if (documentKey != reference.key) { - *stop = YES; - return; - } - FSTMutationBatch *batch = [self lookupMutationBatch:reference.ID]; + DocumentReference start{documentKey, 0}; + for (const auto &reference : _batchesByDocumentKey.values_from(start)) { + if (documentKey != reference.key()) break; + + FSTMutationBatch *batch = [self lookupMutationBatch:reference.ref_id()]; HARD_ASSERT(batch, "Batches in the index must exist in the main table"); [result addObject:batch]; - }; + } - [self.batchesByDocumentKey enumerateObjectsFrom:start to:nil usingBlock:block]; return result; } - (NSArray *)allMutationBatchesAffectingDocumentKeys: (const DocumentKeySet &)documentKeys { // First find the set of affected batch IDs. - __block std::set batchIDs; + std::set batchIDs; for (const DocumentKey &key : documentKeys) { - FSTDocumentReference *start = [[FSTDocumentReference alloc] initWithKey:key ID:0]; + DocumentReference start{key, 0}; - FSTDocumentReferenceBlock block = ^(FSTDocumentReference *reference, BOOL *stop) { - if (key != reference.key) { - *stop = YES; - return; - } + for (const auto &reference : _batchesByDocumentKey.values_from(start)) { + if (key != reference.key()) break; - batchIDs.insert(reference.ID); - }; - - [self.batchesByDocumentKey enumerateObjectsFrom:start to:nil usingBlock:block]; + batchIDs.insert(reference.ref_id()); + } } return [self allMutationBatchesWithBatchIDs:batchIDs]; @@ -256,28 +245,25 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { if (!DocumentKey::IsDocumentKey(startPath)) { startPath = startPath.Append(""); } - FSTDocumentReference *start = - [[FSTDocumentReference alloc] initWithKey:DocumentKey{startPath} ID:0]; + DocumentReference start{DocumentKey{startPath}, 0}; // Find unique batchIDs referenced by all documents potentially matching the query. - __block std::set uniqueBatchIDs; - FSTDocumentReferenceBlock block = ^(FSTDocumentReference *reference, BOOL *stop) { - const ResourcePath &rowKeyPath = reference.key.path(); + std::set uniqueBatchIDs; + for (const auto &reference : _batchesByDocumentKey.values_from(start)) { + const ResourcePath &rowKeyPath = reference.key().path(); if (!prefix.IsPrefixOf(rowKeyPath)) { - *stop = YES; - return; + break; } // Rows with document keys more than one segment longer than the query path can't be matches. // For example, a query on 'rooms' can't match the document /rooms/abc/messages/xyx. // TODO(mcg): we'll need a different scanner when we implement ancestor queries. if (rowKeyPath.size() != immediateChildrenPathLength) { - return; + continue; } - uniqueBatchIDs.insert(reference.ID); + uniqueBatchIDs.insert(reference.ref_id()); }; - [self.batchesByDocumentKey enumerateObjectsFrom:start to:nil usingBlock:block]; return [self allMutationBatchesWithBatchIDs:uniqueBatchIDs]; } @@ -311,20 +297,18 @@ - (void)removeMutationBatch:(FSTMutationBatch *)batch { [queue removeObjectAtIndex:0]; // Remove entries from the index too. - FSTImmutableSortedSet *references = self.batchesByDocumentKey; for (FSTMutation *mutation in batch.mutations) { const DocumentKey &key = mutation.key; [_persistence.referenceDelegate removeMutationReference:key]; - FSTDocumentReference *reference = [[FSTDocumentReference alloc] initWithKey:key ID:batchID]; - references = [references setByRemovingObject:reference]; + DocumentReference reference{key, batchID}; + _batchesByDocumentKey = _batchesByDocumentKey.erase(reference); } - self.batchesByDocumentKey = references; } - (void)performConsistencyCheck { if (self.queue.count == 0) { - HARD_ASSERT([self.batchesByDocumentKey isEmpty], + HARD_ASSERT(_batchesByDocumentKey.empty(), "Document leak -- detected dangling mutation references when queue is empty."); } } @@ -334,12 +318,11 @@ - (void)performConsistencyCheck { - (BOOL)containsKey:(const DocumentKey &)key { // Create a reference with a zero ID as the start position to find any document reference with // this key. - FSTDocumentReference *reference = [[FSTDocumentReference alloc] initWithKey:key ID:0]; + DocumentReference reference{key, 0}; - NSEnumerator *enumerator = - [self.batchesByDocumentKey objectEnumeratorFrom:reference]; - FSTDocumentReference *_Nullable firstReference = [enumerator nextObject]; - return firstReference && firstReference.key == reference.key; + auto range = _batchesByDocumentKey.values_from(reference); + auto begin = range.begin(); + return begin != range.end() && begin->key() == key; } #pragma mark - Helpers diff --git a/Firestore/Source/Local/FSTMemoryPersistence.mm b/Firestore/Source/Local/FSTMemoryPersistence.mm index d246f2a9c60..2f04f630c89 100644 --- a/Firestore/Source/Local/FSTMemoryPersistence.mm +++ b/Firestore/Source/Local/FSTMemoryPersistence.mm @@ -24,11 +24,11 @@ #import "Firestore/Source/Core/FSTListenSequence.h" #import "Firestore/Source/Local/FSTMemoryMutationQueue.h" #import "Firestore/Source/Local/FSTMemoryQueryCache.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #include "absl/memory/memory.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/util/hard_assert.h" @@ -36,6 +36,7 @@ using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; using firebase::firestore::local::MemoryRemoteDocumentCache; +using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::DocumentKey; using firebase::firestore::model::DocumentKeyHash; using firebase::firestore::model::ListenSequenceNumber; @@ -156,7 +157,7 @@ @implementation FSTMemoryLRUReferenceDelegate { // Tracks sequence numbers of when documents are used. Equivalent to sentinel rows in // the leveldb implementation. std::unordered_map _sequenceNumbers; - FSTReferenceSet *_additionalReferences; + ReferenceSet *_additionalReferences; FSTLRUGarbageCollector *_gc; FSTListenSequence *_listenSequence; ListenSequenceNumber _currentSequenceNumber; @@ -189,7 +190,7 @@ - (ListenSequenceNumber)currentSequenceNumber { return _currentSequenceNumber; } -- (void)addInMemoryPins:(FSTReferenceSet *)set { +- (void)addInMemoryPins:(ReferenceSet *)set { // Technically can't assert this, due to restartWithNoopGarbageCollector (for now...) // FSTAssert(_additionalReferences == nil, @"Overwriting additional references"); _additionalReferences = set; @@ -283,7 +284,7 @@ - (BOOL)isPinnedAtSequenceNumber:(ListenSequenceNumber)upperBound if ([self mutationQueuesContainKey:key]) { return YES; } - if ([_additionalReferences containsKey:key]) { + if (_additionalReferences->ContainsKey(key)) { return YES; } if ([_persistence.queryCache containsKey:key]) { @@ -317,7 +318,7 @@ @implementation FSTMemoryEagerReferenceDelegate { // This delegate should have the same lifetime as the persistence layer, but mark as // weak to avoid retain cycle. __weak FSTMemoryPersistence *_persistence; - FSTReferenceSet *_additionalReferences; + ReferenceSet *_additionalReferences; } - (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence { @@ -331,7 +332,7 @@ - (ListenSequenceNumber)currentSequenceNumber { return kFSTListenSequenceNumberInvalid; } -- (void)addInMemoryPins:(FSTReferenceSet *)set { +- (void)addInMemoryPins:(ReferenceSet *)set { // We should be able to assert that _additionalReferences is nil, but due to restarts in spec // tests it would fail. _additionalReferences = set; @@ -364,7 +365,7 @@ - (BOOL)isReferenced:(const DocumentKey &)key { if ([self mutationQueuesContainKey:key]) { return YES; } - if ([_additionalReferences containsKey:key]) { + if (_additionalReferences->ContainsKey(key)) { return YES; } return NO; diff --git a/Firestore/Source/Local/FSTMemoryQueryCache.mm b/Firestore/Source/Local/FSTMemoryQueryCache.mm index 184735ad338..bf82940168f 100644 --- a/Firestore/Source/Local/FSTMemoryQueryCache.mm +++ b/Firestore/Source/Local/FSTMemoryQueryCache.mm @@ -25,7 +25,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index 8c9b7a62136..e02780e14fc 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -17,6 +17,7 @@ #import #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @@ -24,7 +25,6 @@ #include "Firestore/core/src/firebase/firestore/util/status.h" @class FSTQueryData; -@class FSTReferenceSet; @protocol FSTMutationQueue; @protocol FSTQueryCache; @protocol FSTReferenceDelegate; @@ -122,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN * Registers an FSTReferenceSet of documents that should be considered 'referenced' and not eligible * for removal during garbage collection. */ -- (void)addInMemoryPins:(FSTReferenceSet *)set; +- (void)addInMemoryPins:(firebase::firestore::local::ReferenceSet *)set; /** * Notify the delegate that a target was removed. diff --git a/Firestore/Source/Local/FSTReferenceSet.h b/Firestore/Source/Local/FSTReferenceSet.h deleted file mode 100644 index deffa1d4580..00000000000 --- a/Firestore/Source/Local/FSTReferenceSet.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * A collection of references to a document from some kind of numbered entity (either a targetID or - * batchID). As references are added to or removed from the set corresponding events are emitted to - * a registered garbage collector. - * - * Each reference is represented by a FSTDocumentReference object. Each of them contains enough - * information to uniquely identify the reference. They are all stored primarily in a set sorted - * by key. A document is considered garbage if there's no references in that set (this can be - * efficiently checked thanks to sorting by key). - * - * FSTReferenceSet also keeps a secondary set that contains references sorted by IDs. This one is - * used to efficiently implement removal of all references by some target ID. - */ -@interface FSTReferenceSet : NSObject - -/** Returns YES if the reference set contains no references. */ -- (BOOL)isEmpty; - -/** Adds a reference to the given document key for the given ID. */ -- (void)addReferenceToKey:(const firebase::firestore::model::DocumentKey &)key forID:(int)ID; - -/** Add references to the given document keys for the given ID. */ -- (void)addReferencesToKeys:(const firebase::firestore::model::DocumentKeySet &)keys forID:(int)ID; - -/** Removes a reference to the given document key for the given ID. */ -- (void)removeReferenceToKey:(const firebase::firestore::model::DocumentKey &)key forID:(int)ID; - -/** Removes references to the given document keys for the given ID. */ -- (void)removeReferencesToKeys:(const firebase::firestore::model::DocumentKeySet &)keys - forID:(int)ID; - -/** Clears all references with a given ID. Calls -removeReferenceToKey: for each key removed. */ -- (firebase::firestore::model::DocumentKeySet)removeReferencesForID:(int)ID; - -/** Clears all references for all IDs. */ -- (void)removeAllReferences; - -/** Returns all of the document keys that have had references added for the given ID. */ -- (firebase::firestore::model::DocumentKeySet)referencedKeysForID:(int)ID; - -/** - * Checks to see if there are any references to a document with the given key. - */ -- (BOOL)containsKey:(const firebase::firestore::model::DocumentKey &)key; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTReferenceSet.mm b/Firestore/Source/Local/FSTReferenceSet.mm deleted file mode 100644 index 1bdf8389df6..00000000000 --- a/Firestore/Source/Local/FSTReferenceSet.mm +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTReferenceSet.h" - -#import "Firestore/Source/Local/FSTDocumentReference.h" -#import "Firestore/third_party/Immutable/FSTImmutableSortedSet.h" - -#include "Firestore/core/src/firebase/firestore/model/document_key.h" - -using firebase::firestore::model::DocumentKey; -using firebase::firestore::model::DocumentKeySet; - -NS_ASSUME_NONNULL_BEGIN - -#pragma mark - FSTReferenceSet - -@interface FSTReferenceSet () - -/** A set of outstanding references to a document sorted by key. */ -@property(nonatomic, strong) FSTImmutableSortedSet *referencesByKey; - -/** A set of outstanding references to a document sorted by target ID (or batch ID). */ -@property(nonatomic, strong) FSTImmutableSortedSet *referencesByID; - -@end - -@implementation FSTReferenceSet - -#pragma mark - Initializer - -- (instancetype)init { - self = [super init]; - if (self) { - _referencesByKey = - [FSTImmutableSortedSet setWithComparator:FSTDocumentReferenceComparatorByKey]; - _referencesByID = [FSTImmutableSortedSet setWithComparator:FSTDocumentReferenceComparatorByID]; - } - return self; -} - -#pragma mark - Testing helper methods - -- (BOOL)isEmpty { - return [self.referencesByKey isEmpty]; -} - -- (NSUInteger)count { - return self.referencesByKey.count; -} - -#pragma mark - Public methods - -- (void)addReferenceToKey:(const DocumentKey &)key forID:(int)ID { - FSTDocumentReference *reference = [[FSTDocumentReference alloc] initWithKey:key ID:ID]; - self.referencesByKey = [self.referencesByKey setByAddingObject:reference]; - self.referencesByID = [self.referencesByID setByAddingObject:reference]; -} - -- (void)addReferencesToKeys:(const DocumentKeySet &)keys forID:(int)ID { - for (const DocumentKey &key : keys) { - [self addReferenceToKey:key forID:ID]; - } -} - -- (void)removeReferenceToKey:(const DocumentKey &)key forID:(int)ID { - [self removeReference:[[FSTDocumentReference alloc] initWithKey:key ID:ID]]; -} - -- (void)removeReferencesToKeys:(const DocumentKeySet &)keys forID:(int)ID { - for (const DocumentKey &key : keys) { - [self removeReferenceToKey:key forID:ID]; - } -} - -- (DocumentKeySet)removeReferencesForID:(int)ID { - FSTDocumentReference *start = - [[FSTDocumentReference alloc] initWithKey:DocumentKey::Empty() ID:ID]; - FSTDocumentReference *end = - [[FSTDocumentReference alloc] initWithKey:DocumentKey::Empty() ID:(ID + 1)]; - - __block DocumentKeySet keys; - [self.referencesByID enumerateObjectsFrom:start - to:end - usingBlock:^(FSTDocumentReference *reference, BOOL *stop) { - [self removeReference:reference]; - keys = keys.insert(reference.key); - }]; - return keys; -} - -- (void)removeAllReferences { - for (FSTDocumentReference *reference in self.referencesByKey.objectEnumerator) { - [self removeReference:reference]; - } -} - -- (void)removeReference:(FSTDocumentReference *)reference { - self.referencesByKey = [self.referencesByKey setByRemovingObject:reference]; - self.referencesByID = [self.referencesByID setByRemovingObject:reference]; -} - -- (DocumentKeySet)referencedKeysForID:(int)ID { - FSTDocumentReference *start = - [[FSTDocumentReference alloc] initWithKey:DocumentKey::Empty() ID:ID]; - FSTDocumentReference *end = - [[FSTDocumentReference alloc] initWithKey:DocumentKey::Empty() ID:(ID + 1)]; - - __block DocumentKeySet keys; - [self.referencesByID enumerateObjectsFrom:start - to:end - usingBlock:^(FSTDocumentReference *reference, BOOL *stop) { - keys = keys.insert(reference.key); - }]; - return keys; -} - -- (BOOL)containsKey:(const DocumentKey &)key { - // Create a reference with a zero ID as the start position to find any document reference with - // this key. - FSTDocumentReference *reference = [[FSTDocumentReference alloc] initWithKey:key ID:0]; - - NSEnumerator *enumerator = - [self.referencesByKey objectEnumeratorFrom:reference]; - FSTDocumentReference *_Nullable firstReference = [enumerator nextObject]; - return firstReference && firstReference.key == reference.key; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/core/src/firebase/firestore/immutable/sorted_set.h b/Firestore/core/src/firebase/firestore/immutable/sorted_set.h index e4d340a0b5f..0b64a167836 100644 --- a/Firestore/core/src/firebase/firestore/immutable/sorted_set.h +++ b/Firestore/core/src/firebase/firestore/immutable/sorted_set.h @@ -43,8 +43,8 @@ struct Empty { } // namespace impl template , + typename V = impl::Empty, typename M = SortedMap> class SortedSet { public: @@ -146,9 +146,9 @@ class SortedSet { M map_; }; -template -SortedSet MakeSortedSet(const SortedMap& map) { - return SortedSet{map}; +template +SortedSet MakeSortedSet(const SortedMap& map) { + return SortedSet{map}; } } // namespace immutable diff --git a/Firestore/core/src/firebase/firestore/local/CMakeLists.txt b/Firestore/core/src/firebase/firestore/local/CMakeLists.txt index a36aa928d01..f27fcb2f82b 100644 --- a/Firestore/core/src/firebase/firestore/local/CMakeLists.txt +++ b/Firestore/core/src/firebase/firestore/local/CMakeLists.txt @@ -46,10 +46,14 @@ endif() cc_library( firebase_firestore_local SOURCES + document_reference.h + document_reference.cc local_serializer.h local_serializer.cc query_data.cc query_data.h + reference_set.cc + reference_set.h DEPENDS # TODO(b/111328563) Force nanopb first to work around ODR violations protobuf-nanopb diff --git a/Firestore/core/src/firebase/firestore/local/document_reference.cc b/Firestore/core/src/firebase/firestore/local/document_reference.cc new file mode 100644 index 00000000000..e3f1794ed18 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/document_reference.cc @@ -0,0 +1,69 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include "Firestore/core/src/firebase/firestore/local/document_reference.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/util/comparison.h" +#include "Firestore/core/src/firebase/firestore/util/hashing.h" + +namespace firebase { +namespace firestore { +namespace local { + +using model::DocumentKey; +using util::ComparisonResult; + +bool operator==(const DocumentReference& lhs, const DocumentReference& rhs) { + return lhs.key_ == rhs.key_ && lhs.ref_id_ == rhs.ref_id_; +} + +size_t DocumentReference::Hash() const { + return util::Hash(key_.ToString(), ref_id_); +} + +std::string DocumentReference::ToString() const { + return util::StringFormat("", + key_.ToString(), ref_id_); +} + +/** Sorts document references by key then ID. */ +bool DocumentReference::ByKey::operator()(const DocumentReference& lhs, + const DocumentReference& rhs) const { + util::Comparator key_less; + if (key_less(lhs.key_, rhs.key_)) return true; + if (key_less(rhs.key_, lhs.key_)) return false; + + util::Comparator id_less; + return id_less(lhs.ref_id_, rhs.ref_id_); +} + +/** Sorts document references by ID then key. */ +bool DocumentReference::ById::operator()(const DocumentReference& lhs, + const DocumentReference& rhs) const { + util::Comparator id_less; + if (id_less(lhs.ref_id_, rhs.ref_id_)) return true; + if (id_less(rhs.ref_id_, lhs.ref_id_)) return false; + + util::Comparator key_less; + return key_less(lhs.key_, rhs.key_); +} + +} // namespace local +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/local/document_reference.h b/Firestore/core/src/firebase/firestore/local/document_reference.h new file mode 100644 index 00000000000..3160ca42788 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/document_reference.h @@ -0,0 +1,97 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_DOCUMENT_REFERENCE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_DOCUMENT_REFERENCE_H_ + +#include +#include + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" +#include "Firestore/core/src/firebase/firestore/util/comparison.h" + +namespace firebase { +namespace firestore { +namespace local { + +/** + * An immutable value used to keep track of an association between some + * referencing target or batch and a document key that the target or batch + * references. + * + * A reference can be from either listen targets (identified by their TargetId) + * or mutation batches (identified by their BatchId). See FSTGarbageCollector + * for more details. + * + * Not to be confused with FIRDocumentReference. + */ +class DocumentReference { + public: + DocumentReference() { + } + + /** Initializes the document reference with the given key and Id. */ + DocumentReference(model::DocumentKey key, int32_t ref_id) + : key_{std::move(key)}, ref_id_{ref_id} { + } + + /** The document key that's the target of this reference. */ + const model::DocumentKey& key() const { + return key_; + } + + /** + * The targetId of a referring target or the batchId of a referring mutation + * batch. (Which this is depends upon which FSTReferenceSet this reference is + * a part of.) + */ + int32_t ref_id() const { + return ref_id_; + } + + friend bool operator==(const DocumentReference& lhs, + const DocumentReference& rhs); + + size_t Hash() const; + + std::string ToString() const; + + /** Sorts document references by key then Id. */ + struct ByKey : public util::Comparator { + bool operator()(const DocumentReference& lhs, + const DocumentReference& rhs) const; + }; + + /** Sorts document references by Id then key. */ + struct ById : public util::Comparator { + bool operator()(const DocumentReference& lhs, + const DocumentReference& rhs) const; + }; + + private: + model::DocumentKey key_; + + // PORTING NOTE: this is `id` on other platforms but that's a reserved word in + // Objective-C++. + int32_t ref_id_ = 0; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_DOCUMENT_REFERENCE_H_ diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h index 3afd5328085..659ce0d458d 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h @@ -26,6 +26,7 @@ #include #include +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @@ -34,7 +35,6 @@ @class FSTMemoryPersistence; @class FSTQuery; @class FSTQueryData; -@class FSTReferenceSet; NS_ASSUME_NONNULL_BEGIN @@ -107,7 +107,7 @@ class MemoryQueryCache { NSMutableDictionary* queries_; /** A ordered bidirectional mapping between documents and the remote target * IDs. */ - FSTReferenceSet* references_; + ReferenceSet references_; }; } // namespace local diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm index 78762713d71..862b6632598 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm @@ -21,7 +21,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Local/FSTReferenceSet.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" using firebase::firestore::model::DocumentKey; @@ -41,8 +40,7 @@ highest_listen_sequence_number_(ListenSequenceNumber(0)), highest_target_id_(TargetId(0)), last_remote_snapshot_version_(SnapshotVersion::None()), - queries_([NSMutableDictionary dictionary]), - references_([[FSTReferenceSet alloc] init]) { + queries_([NSMutableDictionary dictionary]) { } void MemoryQueryCache::AddTarget(FSTQueryData* query_data) { @@ -62,7 +60,7 @@ void MemoryQueryCache::RemoveTarget(FSTQueryData* query_data) { [queries_ removeObjectForKey:query_data.query]; - [references_ removeReferencesForID:query_data.targetID]; + references_.RemoveReferences(query_data.targetID); } FSTQueryData* _Nullable MemoryQueryCache::GetTarget(FSTQuery* query) { @@ -85,7 +83,7 @@ if (queryData.sequenceNumber <= upper_bound) { if (live_targets[@(queryData.targetID)] == nil) { [toRemove addObject:query]; - [references_ removeReferencesForID:queryData.targetID]; + references_.RemoveReferences(queryData.targetID); } } }]; @@ -95,7 +93,7 @@ void MemoryQueryCache::AddMatchingKeys(const DocumentKeySet& keys, TargetId target_id) { - [references_ addReferencesToKeys:keys forID:target_id]; + references_.AddReferences(keys, target_id); for (const DocumentKey& key : keys) { [persistence_.referenceDelegate addReference:key]; } @@ -103,22 +101,22 @@ void MemoryQueryCache::RemoveMatchingKeys(const DocumentKeySet& keys, TargetId target_id) { - [references_ removeReferencesToKeys:keys forID:target_id]; + references_.RemoveReferences(keys, target_id); for (const DocumentKey& key : keys) { [persistence_.referenceDelegate removeReference:key]; } } void MemoryQueryCache::RemoveAllKeysForTarget(TargetId target_id) { - [references_ removeReferencesForID:target_id]; + references_.RemoveReferences(target_id); } DocumentKeySet MemoryQueryCache::GetMatchingKeys(TargetId target_id) { - return [references_ referencedKeysForID:target_id]; + return references_.ReferencedKeys(target_id); } bool MemoryQueryCache::Contains(const DocumentKey& key) { - return [references_ containsKey:key]; + return references_.ContainsKey(key); } size_t MemoryQueryCache::CalculateByteSize(FSTLocalSerializer* serializer) { diff --git a/Firestore/core/src/firebase/firestore/local/reference_set.cc b/Firestore/core/src/firebase/firestore/local/reference_set.cc new file mode 100644 index 00000000000..9529b1ffed7 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/reference_set.cc @@ -0,0 +1,101 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" +#include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/document_reference.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" + +namespace firebase { +namespace firestore { +namespace local { + +using model::DocumentKey; +using model::DocumentKeySet; + +void ReferenceSet::AddReference(const DocumentKey& key, int id) { + DocumentReference reference{key, id}; + by_key_ = by_key_.insert(reference); + by_id_ = by_id_.insert(reference); +} + +void ReferenceSet::AddReferences(const DocumentKeySet& keys, int id) { + for (const DocumentKey& key : keys) { + AddReference(key, id); + } +} + +void ReferenceSet::RemoveReference(const DocumentKey& key, int id) { + RemoveReference(DocumentReference{key, id}); +} + +void ReferenceSet::RemoveReferences( + const firebase::firestore::model::DocumentKeySet& keys, int id) { + for (const DocumentKey& key : keys) { + RemoveReference(key, id); + } +} + +DocumentKeySet ReferenceSet::RemoveReferences(int id) { + DocumentReference start{DocumentKey::Empty(), id}; + DocumentReference end{DocumentKey::Empty(), id + 1}; + + DocumentKeySet removed{}; + + auto initial = by_id_; + for (const auto& reference : initial.values_in(start, end)) { + RemoveReference(reference); + removed = removed.insert(reference.key()); + } + return removed; +} + +void ReferenceSet::RemoveAllReferences() { + auto initial = by_key_; + for (const DocumentReference& reference : initial) { + RemoveReference(reference); + } +} + +void ReferenceSet::RemoveReference(const DocumentReference& reference) { + by_key_ = by_key_.erase(reference); + by_id_ = by_id_.erase(reference); +} + +DocumentKeySet ReferenceSet::ReferencedKeys(int id) { + DocumentReference start{DocumentKey::Empty(), id}; + DocumentReference end{DocumentKey::Empty(), id + 1}; + + DocumentKeySet keys; + for (const auto& reference : by_id_.values_in(start, end)) { + keys = keys.insert(reference.key()); + } + return keys; +} + +bool ReferenceSet::ContainsKey(const DocumentKey& key) { + // Create a reference with a zero ID as the start position to find any + // document reference with this key. + DocumentReference start{key, 0}; + + auto range = by_key_.values_from(start); + auto begin = range.begin(); + return begin != range.end() && begin->key() == key; +} + +} // namespace local +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/local/reference_set.h b/Firestore/core/src/firebase/firestore/local/reference_set.h new file mode 100644 index 00000000000..58677e200ff --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/reference_set.h @@ -0,0 +1,94 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REFERENCE_SET_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REFERENCE_SET_H_ + +#include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/document_reference.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" + +namespace firebase { +namespace firestore { +namespace local { + +/** + * A collection of references to a document from some kind of numbered entity + * (either a TargetId or BatchId). As references are added to or removed from + * the set corresponding events are emitted to a registered garbage collector. + * + * Each reference is represented by a DocumentReference object. Each of them + * contains enough information to uniquely identify the reference. They are all + * stored primarily in a set sorted by key. A document is considered garbage if + * there's no references in that set (this can be efficiently checked thanks to + * sorting by key). + * + * ReferenceSet also keeps a secondary set that contains references sorted by + * Id. This one is used to efficiently implement removal of all references by + * some TargetId. + */ +class ReferenceSet { + public: + /** Returns true if the reference set contains no references. */ + bool empty() const { + return by_key_.empty(); + } + + size_t size() const { + return by_key_.size(); + } + + /** Adds a reference to the given document key for the given Id. */ + void AddReference(const model::DocumentKey& key, int id); + + /** Add references to the given document keys for the given Id. */ + void AddReferences(const model::DocumentKeySet& keys, int id); + + /** Removes a reference to the given document key for the given Id. */ + void RemoveReference(const model::DocumentKey& key, int id); + + /** Removes references to the given document keys for the given Id. */ + void RemoveReferences(const model::DocumentKeySet& keys, int id); + + /** Clears all references with a given ID. Calls -removeReferenceToKey: for + * each key removed. */ + model::DocumentKeySet RemoveReferences(int id); + + /** Clears all references for all IDs. */ + void RemoveAllReferences(); + + /** Returns all of the document keys that have had references added for the + * given ID. */ + model::DocumentKeySet ReferencedKeys(int id); + + /** + * Checks to see if there are any references to a document with the given key. + */ + bool ContainsKey(const model::DocumentKey& key); + + private: + void RemoveReference(const DocumentReference& reference); + + immutable::SortedSet by_key_; + immutable::SortedSet by_id_; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_REFERENCE_SET_H_ diff --git a/Firestore/core/test/firebase/firestore/local/reference_set_test.cc b/Firestore/core/test/firebase/firestore/local/reference_set_test.cc new file mode 100644 index 00000000000..208049ccc02 --- /dev/null +++ b/Firestore/core/test/firebase/firestore/local/reference_set_test.cc @@ -0,0 +1,84 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/local/reference_set.h" + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/test/firebase/firestore/testutil/testutil.h" + +#include "gtest/gtest.h" + +namespace firebase { +namespace firestore { +namespace local { + +using model::DocumentKey; + +TEST(ReferenceSetTest, AddOrRemoveReferences) { + DocumentKey key = testutil::Key("foo/bar"); + + ReferenceSet referenceSet{}; + EXPECT_TRUE(referenceSet.empty()); + EXPECT_FALSE(referenceSet.ContainsKey(key)); + + referenceSet.AddReference(key, 1); + EXPECT_TRUE(referenceSet.ContainsKey(key)); + EXPECT_FALSE(referenceSet.empty()); + + referenceSet.AddReference(key, 2); + EXPECT_TRUE(referenceSet.ContainsKey(key)); + + referenceSet.RemoveReference(key, 1); + EXPECT_TRUE(referenceSet.ContainsKey(key)); + + referenceSet.RemoveReference(key, 3); + EXPECT_TRUE(referenceSet.ContainsKey(key)); + + referenceSet.RemoveReference(key, 2); + EXPECT_FALSE(referenceSet.ContainsKey(key)); + EXPECT_TRUE(referenceSet.empty()); +} + +TEST(ReferenceSetTest, RemoteAllReferencesForTargetId) { + DocumentKey key1 = testutil::Key("foo/bar"); + DocumentKey key2 = testutil::Key("foo/baz"); + DocumentKey key3 = testutil::Key("foo/blah"); + ReferenceSet referenceSet{}; + + referenceSet.AddReference(key1, 1); + referenceSet.AddReference(key2, 1); + referenceSet.AddReference(key3, 2); + EXPECT_FALSE(referenceSet.empty()); + EXPECT_TRUE(referenceSet.ContainsKey(key1)); + EXPECT_TRUE(referenceSet.ContainsKey(key2)); + EXPECT_TRUE(referenceSet.ContainsKey(key3)); + + referenceSet.RemoveReferences(1); + EXPECT_FALSE(referenceSet.empty()); + EXPECT_FALSE(referenceSet.ContainsKey(key1)); + EXPECT_FALSE(referenceSet.ContainsKey(key2)); + EXPECT_TRUE(referenceSet.ContainsKey(key3)); + + referenceSet.RemoveReferences(2); + EXPECT_TRUE(referenceSet.empty()); + EXPECT_FALSE(referenceSet.ContainsKey(key1)); + EXPECT_FALSE(referenceSet.ContainsKey(key2)); + EXPECT_FALSE(referenceSet.ContainsKey(key3)); +} + +} // namespace local +} // namespace firestore +} // namespace firebase From 900ca3b83d1714d864add0226fd774c3363056e0 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Fri, 21 Dec 2018 22:08:34 -0800 Subject: [PATCH 29/34] Implement QueryCache interface and port QueryCache tests (#2209) * Implement QueryCache interface and port tests * Port production usages of QueryCache (#2211) * Remove FSTQueryCache and implementations * Switch size() to size_t --- .../Local/FSTLRUGarbageCollectorTests.mm | 21 +-- .../Tests/Local/FSTLevelDBMigrationsTests.mm | 11 +- .../Tests/Local/FSTLevelDBQueryCacheTests.mm | 60 +++++-- .../Example/Tests/Local/FSTLocalStoreTests.mm | 1 - .../Tests/Local/FSTMemoryQueryCacheTests.mm | 4 +- .../Example/Tests/Local/FSTQueryCacheTests.h | 16 +- .../Example/Tests/Local/FSTQueryCacheTests.mm | 163 ++++++++---------- .../Source/Local/FSTLRUGarbageCollector.h | 4 +- .../Source/Local/FSTLRUGarbageCollector.mm | 3 +- Firestore/Source/Local/FSTLevelDB.mm | 53 +++--- Firestore/Source/Local/FSTLevelDBQueryCache.h | 61 ------- .../Source/Local/FSTLevelDBQueryCache.mm | 152 ---------------- Firestore/Source/Local/FSTLocalStore.mm | 31 ++-- .../Source/Local/FSTMemoryPersistence.mm | 39 ++--- Firestore/Source/Local/FSTMemoryQueryCache.h | 40 ----- Firestore/Source/Local/FSTMemoryQueryCache.mm | 130 -------------- Firestore/Source/Local/FSTPersistence.h | 4 +- Firestore/Source/Local/FSTQueryCache.h | 129 -------------- .../firestore/local/leveldb_query_cache.h | 49 +++--- .../firestore/local/memory_query_cache.h | 42 +++-- .../firestore/local/memory_query_cache.mm | 4 - .../firebase/firestore/local/query_cache.h | 154 +++++++++++++++++ 22 files changed, 410 insertions(+), 761 deletions(-) delete mode 100644 Firestore/Source/Local/FSTLevelDBQueryCache.h delete mode 100644 Firestore/Source/Local/FSTLevelDBQueryCache.mm delete mode 100644 Firestore/Source/Local/FSTMemoryQueryCache.h delete mode 100644 Firestore/Source/Local/FSTMemoryQueryCache.mm delete mode 100644 Firestore/Source/Local/FSTQueryCache.h create mode 100644 Firestore/core/src/firebase/firestore/local/query_cache.h diff --git a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm index 58f4b41cd5f..adae5d01003 100644 --- a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm +++ b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm @@ -25,12 +25,12 @@ #import "Firestore/Source/Local/FSTLRUGarbageCollector.h" #import "Firestore/Source/Local/FSTMutationQueue.h" #import "Firestore/Source/Local/FSTPersistence.h" -#import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTFieldValue.h" #import "Firestore/Source/Model/FSTMutation.h" #import "Firestore/Source/Util/FSTClasses.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" @@ -43,6 +43,7 @@ using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; using firebase::firestore::local::LruResults; +using firebase::firestore::local::QueryCache; using firebase::firestore::local::ReferenceSet; using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::DocumentKey; @@ -60,7 +61,7 @@ @implementation FSTLRUGarbageCollectorTests { FSTObjectValue *_testValue; FSTObjectValue *_bigObjectValue; id _persistence; - id _queryCache; + QueryCache *_queryCache; RemoteDocumentCache *_documentCache; id _mutationQueue; id _lruDelegate; @@ -155,7 +156,7 @@ - (FSTQueryData *)nextTestQuery { - (FSTQueryData *)addNextQueryInTransaction { FSTQueryData *queryData = [self nextTestQuery]; - [_queryCache addQueryData:queryData]; + _queryCache->AddTarget(queryData); return queryData; } @@ -165,7 +166,7 @@ - (void)updateTargetInTransaction:(FSTQueryData *)queryData { [queryData queryDataByReplacingSnapshotVersion:queryData.snapshotVersion resumeToken:token sequenceNumber:_persistence.currentSequenceNumber]; - [_queryCache updateQueryData:updated]; + _queryCache->UpdateTarget(updated); } - (FSTQueryData *)addNextQuery { @@ -199,11 +200,11 @@ - (void)markDocumentEligibleForGCInTransaction:(const DocumentKey &)docKey { } - (void)addDocument:(const DocumentKey &)docKey toTarget:(TargetId)targetId { - [_queryCache addMatchingKeys:DocumentKeySet{docKey} forTargetID:targetId]; + _queryCache->AddMatchingKeys(DocumentKeySet{docKey}, targetId); } - (void)removeDocument:(const DocumentKey &)docKey fromTarget:(TargetId)targetId { - [_queryCache removeMatchingKeys:DocumentKeySet{docKey} forTargetID:targetId]; + _queryCache->RemoveMatchingKeys(DocumentKeySet{docKey}, targetId); } /** @@ -392,9 +393,9 @@ - (void)testRemoveQueriesUpThroughSequenceNumber { XCTAssertEqual(10, removed); // Make sure we removed the even targets with targetID <= 20. _persistence.run("verify remaining targets are > 20 or odd", [&]() { - [_queryCache enumerateTargetsUsingBlock:^(FSTQueryData *queryData, BOOL *stop) { + _queryCache->EnumerateTargets(^(FSTQueryData *queryData, BOOL *stop) { XCTAssertTrue(queryData.targetID > 20 || queryData.targetID % 2 == 1); - }]; + }); }); [_persistence shutdown]; } @@ -467,7 +468,7 @@ - (void)testRemoveOrphanedDocuments { _persistence.run("verify", [&]() { for (const DocumentKey &key : toBeRemoved) { XCTAssertNil(_documentCache->Get(key)); - XCTAssertFalse([_queryCache containsKey:key]); + XCTAssertFalse(_queryCache->Contains(key)); } for (const DocumentKey &key : expectedRetained) { XCTAssertNotNil(_documentCache->Get(key), @"Missing document %s", key.ToString().c_str()); @@ -649,7 +650,7 @@ - (void)testRemoveTargetsThenGC { for (const DocumentKey &key : expectedRemoved) { XCTAssertNil(_documentCache->Get(key), @"Did not expect to find %s in document cache", key.ToString().c_str()); - XCTAssertFalse([_queryCache containsKey:key], @"Did not expect to find %s in queryCache", + XCTAssertFalse(_queryCache->Contains(key), @"Did not expect to find %s in queryCache", key.ToString().c_str()); [self expectSentinelRemoved:key]; } diff --git a/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm index 2ef0ed73018..d4d46a496ba 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBMigrationsTests.mm @@ -24,10 +24,10 @@ #import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" #import "Firestore/Source/Local/FSTLevelDB.h" #import "Firestore/Source/Local/FSTLevelDBMutationQueue.h" -#import "Firestore/Source/Local/FSTLevelDBQueryCache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_migrations.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" #include "Firestore/core/src/firebase/firestore/util/ordered_code.h" #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" #include "absl/strings/match.h" @@ -43,6 +43,7 @@ using firebase::firestore::local::LevelDbMigrations; using firebase::firestore::local::LevelDbMutationKey; using firebase::firestore::local::LevelDbMutationQueueKey; +using firebase::firestore::local::LevelDbQueryCache; using firebase::firestore::local::LevelDbQueryTargetKey; using firebase::firestore::local::LevelDbRemoteDocumentKey; using firebase::firestore::local::LevelDbTargetDocumentKey; @@ -86,11 +87,11 @@ - (void)tearDown { } - (void)testAddsTargetGlobal { - FSTPBTargetGlobal *metadata = [FSTLevelDBQueryCache readTargetMetadataFromDB:_db.get()]; + FSTPBTargetGlobal *metadata = LevelDbQueryCache::ReadMetadata(_db.get()); XCTAssertNil(metadata, @"Not expecting metadata yet, we should have an empty db"); LevelDbMigrations::RunMigrations(_db.get()); - metadata = [FSTLevelDBQueryCache readTargetMetadataFromDB:_db.get()]; + metadata = LevelDbQueryCache::ReadMetadata(_db.get()); XCTAssertNotNil(metadata, @"Migrations should have added the metadata"); } @@ -166,7 +167,7 @@ - (void)testDropsTheQueryCache { ASSERT_FOUND(transaction, key); } - FSTPBTargetGlobal *metadata = [FSTLevelDBQueryCache readTargetMetadataFromDB:_db.get()]; + FSTPBTargetGlobal *metadata = LevelDbQueryCache::ReadMetadata(_db.get()); XCTAssertNotNil(metadata, @"Metadata should have been added"); XCTAssertEqual(metadata.targetCount, 0); } @@ -209,7 +210,7 @@ - (void)testAddsSentinelRows { LevelDbTransaction transaction(_db.get(), "Setup"); // Set up target global - FSTPBTargetGlobal *metadata = [FSTLevelDBQueryCache readTargetMetadataFromDB:_db.get()]; + FSTPBTargetGlobal *metadata = LevelDbQueryCache::ReadMetadata(_db.get()); // Expect that documents missing a row will get the new number metadata.highestListenSequenceNumber = new_sequence_number; transaction.Put(LevelDbTargetGlobalKey::Key(), metadata); diff --git a/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm index 47141c61c33..bf5b9b07f84 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBQueryCacheTests.mm @@ -14,26 +14,28 @@ * limitations under the License. */ -#import "Firestore/Source/Local/FSTLevelDBQueryCache.h" - #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTLevelDB.h" -#import "Firestore/Source/Local/FSTLocalSerializer.h" #import "Firestore/Source/Local/FSTQueryData.h" -#import "Firestore/Source/Remote/FSTSerializerBeta.h" #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" #import "Firestore/Example/Tests/Local/FSTQueryCacheTests.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/database_id.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/resource_path.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" +#include "Firestore/core/test/firebase/firestore/testutil/testutil.h" +namespace testutil = firebase::firestore::testutil; using firebase::Timestamp; +using firebase::firestore::local::LevelDbQueryCache; using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::DatabaseId; +using firebase::firestore::model::DocumentKey; using firebase::firestore::model::ListenSequenceNumber; using firebase::firestore::model::ResourcePath; using firebase::firestore::model::SnapshotVersion; @@ -54,11 +56,15 @@ @implementation FSTLevelDBQueryCacheTests { ReferenceSet _additionalReferences; } +- (LevelDbQueryCache *)getCache:(id)persistence { + return static_cast(persistence.queryCache); +} + - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers levelDBPersistence]; - self.queryCache = [self.persistence queryCache]; + self.queryCache = [self getCache:self.persistence]; [self.persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; } @@ -75,12 +81,12 @@ - (void)testMetadataPersistedAcrossRestarts { Path dir = [FSTPersistenceTestHelpers levelDBDir]; FSTLevelDB *db1 = [FSTPersistenceTestHelpers levelDBPersistenceWithDir:dir]; - FSTLevelDBQueryCache *queryCache = [db1 queryCache]; + LevelDbQueryCache *queryCache = [self getCache:db1]; - XCTAssertEqual(0, queryCache.highestListenSequenceNumber); - XCTAssertEqual(0, queryCache.highestTargetID); + XCTAssertEqual(0, queryCache->highest_listen_sequence_number()); + XCTAssertEqual(0, queryCache->highest_target_id()); SnapshotVersion versionZero; - XCTAssertEqual(versionZero, queryCache.lastRemoteSnapshotVersion); + XCTAssertEqual(versionZero, queryCache->GetLastRemoteSnapshotVersion()); ListenSequenceNumber minimumSequenceNumber = 1234; TargetId lastTargetId = 5; @@ -92,8 +98,8 @@ - (void)testMetadataPersistedAcrossRestarts { targetID:lastTargetId listenSequenceNumber:minimumSequenceNumber purpose:FSTQueryPurposeListen]; - [queryCache addQueryData:queryData]; - [queryCache setLastRemoteSnapshotVersion:lastVersion]; + queryCache->AddTarget(queryData); + queryCache->SetLastRemoteSnapshotVersion(lastVersion); }); [db1 shutdown]; @@ -106,14 +112,40 @@ - (void)testMetadataPersistedAcrossRestarts { XCTAssertGreaterThan(db2.currentSequenceNumber, minimumSequenceNumber); }); - FSTLevelDBQueryCache *queryCache2 = [db2 queryCache]; - XCTAssertEqual(lastTargetId, queryCache2.highestTargetID); - XCTAssertEqual(lastVersion, queryCache2.lastRemoteSnapshotVersion); + LevelDbQueryCache *queryCache2 = [self getCache:db2]; + XCTAssertEqual(lastTargetId, queryCache2->highest_target_id()); + XCTAssertEqual(lastVersion, queryCache2->GetLastRemoteSnapshotVersion()); [db2 shutdown]; db2 = nil; } +- (void)testRemoveMatchingKeysForTargetID { + self.persistence.run("testRemoveMatchingKeysForTargetID", [&]() { + DocumentKey key1 = testutil::Key("foo/bar"); + DocumentKey key2 = testutil::Key("foo/baz"); + DocumentKey key3 = testutil::Key("foo/blah"); + + LevelDbQueryCache *cache = [self getCache:self.persistence]; + [self addMatchingKey:key1 forTargetID:1]; + [self addMatchingKey:key2 forTargetID:1]; + [self addMatchingKey:key3 forTargetID:2]; + XCTAssertTrue(cache->Contains(key1)); + XCTAssertTrue(cache->Contains(key2)); + XCTAssertTrue(cache->Contains(key3)); + + cache->RemoveAllKeysForTarget(1); + XCTAssertFalse(self.queryCache->Contains(key1)); + XCTAssertFalse(self.queryCache->Contains(key2)); + XCTAssertTrue(self.queryCache->Contains(key3)); + + cache->RemoveAllKeysForTarget(2); + XCTAssertFalse(self.queryCache->Contains(key1)); + XCTAssertFalse(self.queryCache->Contains(key2)); + XCTAssertFalse(self.queryCache->Contains(key3)); + }); +} + @end NS_ASSUME_NONNULL_END diff --git a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm index 5cff444f6bf..3caa80bf6ef 100644 --- a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm @@ -22,7 +22,6 @@ #import "Firestore/Source/Core/FSTQuery.h" #import "Firestore/Source/Local/FSTLocalWriteResult.h" #import "Firestore/Source/Local/FSTPersistence.h" -#import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTDocumentSet.h" diff --git a/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm index 3fd4f703aa7..028898aa7b7 100644 --- a/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTMemoryQueryCacheTests.mm @@ -14,8 +14,6 @@ * limitations under the License. */ -#import "Firestore/Source/Local/FSTMemoryQueryCache.h" - #import "Firestore/Source/Local/FSTMemoryPersistence.h" #import "Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.h" @@ -43,7 +41,7 @@ - (void)setUp { [super setUp]; self.persistence = [FSTPersistenceTestHelpers eagerGCMemoryPersistence]; - self.queryCache = [self.persistence queryCache]; + self.queryCache = self.persistence.queryCache; [self.persistence.referenceDelegate addInMemoryPins:&_additionalReferences]; } diff --git a/Firestore/Example/Tests/Local/FSTQueryCacheTests.h b/Firestore/Example/Tests/Local/FSTQueryCacheTests.h index e2089afe854..8f1d016ba97 100644 --- a/Firestore/Example/Tests/Local/FSTQueryCacheTests.h +++ b/Firestore/Example/Tests/Local/FSTQueryCacheTests.h @@ -14,18 +14,20 @@ * limitations under the License. */ -#import "Firestore/Source/Local/FSTQueryCache.h" - #import +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" + @protocol FSTPersistence; NS_ASSUME_NONNULL_BEGIN /** - * These are tests for any implementation of the FSTQueryCache protocol. + * These are tests for any implementation of the QueryCache interface. * - * To test a specific implementation of FSTQueryCache: + * To test a specific implementation of QueryCache: * * + Subclass FSTQueryCacheTests * + override -setUp, assigning to queryCache and persistence @@ -33,8 +35,12 @@ NS_ASSUME_NONNULL_BEGIN */ @interface FSTQueryCacheTests : XCTestCase +/** Helper method to add a single document key to target association */ +- (void)addMatchingKey:(const firebase::firestore::model::DocumentKey&)key + forTargetID:(firebase::firestore::model::TargetId)targetID; + /** The implementation of the query cache to test. */ -@property(nonatomic, strong, nullable) id queryCache; +@property(nonatomic, nullable) firebase::firestore::local::QueryCache* queryCache; /** * The persistence implementation to use while testing the queryCache (e.g. for committing write diff --git a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm index a908854f459..cea556a0c66 100644 --- a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm @@ -71,7 +71,7 @@ - (void)testReadQueryNotInCache { if ([self isTestBaseClass]) return; self.persistence.run("testReadQueryNotInCache", - [&]() { XCTAssertNil([self.queryCache queryDataForQuery:_queryRooms]); }); + [&]() { XCTAssertNil(self.queryCache->GetTarget(_queryRooms)); }); } - (void)testSetAndReadAQuery { @@ -79,9 +79,9 @@ - (void)testSetAndReadAQuery { self.persistence.run("testSetAndReadAQuery", [&]() { FSTQueryData *queryData = [self queryDataWithQuery:_queryRooms]; - [self.queryCache addQueryData:queryData]; + self.queryCache->AddTarget(queryData); - FSTQueryData *result = [self.queryCache queryDataForQuery:_queryRooms]; + FSTQueryData *result = self.queryCache->GetTarget(_queryRooms); XCTAssertEqualObjects(result.query, queryData.query); XCTAssertEqual(result.targetID, queryData.targetID); XCTAssertEqualObjects(result.resumeToken, queryData.resumeToken); @@ -99,28 +99,28 @@ - (void)testCanonicalIDCollision { XCTAssertEqualObjects(q1.canonicalID, q2.canonicalID); FSTQueryData *data1 = [self queryDataWithQuery:q1]; - [self.queryCache addQueryData:data1]; + self.queryCache->AddTarget(data1); // Using the other query should not return the query cache entry despite equal canonicalIDs. - XCTAssertNil([self.queryCache queryDataForQuery:q2]); - XCTAssertEqualObjects([self.queryCache queryDataForQuery:q1], data1); + XCTAssertNil(self.queryCache->GetTarget(q2)); + XCTAssertEqualObjects(self.queryCache->GetTarget(q1), data1); FSTQueryData *data2 = [self queryDataWithQuery:q2]; - [self.queryCache addQueryData:data2]; - XCTAssertEqual([self.queryCache count], 2); + self.queryCache->AddTarget(data2); + XCTAssertEqual(self.queryCache->size(), 2); - XCTAssertEqualObjects([self.queryCache queryDataForQuery:q1], data1); - XCTAssertEqualObjects([self.queryCache queryDataForQuery:q2], data2); + XCTAssertEqualObjects(self.queryCache->GetTarget(q1), data1); + XCTAssertEqualObjects(self.queryCache->GetTarget(q2), data2); - [self.queryCache removeQueryData:data1]; - XCTAssertNil([self.queryCache queryDataForQuery:q1]); - XCTAssertEqualObjects([self.queryCache queryDataForQuery:q2], data2); - XCTAssertEqual([self.queryCache count], 1); + self.queryCache->RemoveTarget(data1); + XCTAssertNil(self.queryCache->GetTarget(q1)); + XCTAssertEqualObjects(self.queryCache->GetTarget(q2), data2); + XCTAssertEqual(self.queryCache->size(), 1); - [self.queryCache removeQueryData:data2]; - XCTAssertNil([self.queryCache queryDataForQuery:q1]); - XCTAssertNil([self.queryCache queryDataForQuery:q2]); - XCTAssertEqual([self.queryCache count], 0); + self.queryCache->RemoveTarget(data2); + XCTAssertNil(self.queryCache->GetTarget(q1)); + XCTAssertNil(self.queryCache->GetTarget(q2)); + XCTAssertEqual(self.queryCache->size(), 0); }); } @@ -130,13 +130,13 @@ - (void)testSetQueryToNewValue { self.persistence.run("testSetQueryToNewValue", [&]() { FSTQueryData *queryData1 = [self queryDataWithQuery:_queryRooms targetID:1 listenSequenceNumber:10 version:1]; - [self.queryCache addQueryData:queryData1]; + self.queryCache->AddTarget(queryData1); FSTQueryData *queryData2 = [self queryDataWithQuery:_queryRooms targetID:1 listenSequenceNumber:10 version:2]; - [self.queryCache addQueryData:queryData2]; + self.queryCache->AddTarget(queryData2); - FSTQueryData *result = [self.queryCache queryDataForQuery:_queryRooms]; + FSTQueryData *result = self.queryCache->GetTarget(_queryRooms); XCTAssertNotEqualObjects(queryData2.resumeToken, queryData1.resumeToken); XCTAssertNotEqual(queryData2.snapshotVersion, queryData1.snapshotVersion); XCTAssertEqualObjects(result.resumeToken, queryData2.resumeToken); @@ -149,11 +149,11 @@ - (void)testRemoveQuery { self.persistence.run("testRemoveQuery", [&]() { FSTQueryData *queryData1 = [self queryDataWithQuery:_queryRooms]; - [self.queryCache addQueryData:queryData1]; + self.queryCache->AddTarget(queryData1); - [self.queryCache removeQueryData:queryData1]; + self.queryCache->RemoveTarget(queryData1); - FSTQueryData *result = [self.queryCache queryDataForQuery:_queryRooms]; + FSTQueryData *result = self.queryCache->GetTarget(_queryRooms); XCTAssertNil(result); }); } @@ -165,7 +165,7 @@ - (void)testRemoveNonExistentQuery { FSTQueryData *queryData = [self queryDataWithQuery:_queryRooms]; // no-op, but make sure it doesn't throw. - XCTAssertNoThrow([self.queryCache removeQueryData:queryData]); + XCTAssertNoThrow(self.queryCache->RemoveTarget(queryData)); }); } @@ -174,19 +174,19 @@ - (void)testRemoveQueryRemovesMatchingKeysToo { self.persistence.run("testRemoveQueryRemovesMatchingKeysToo", [&]() { FSTQueryData *rooms = [self queryDataWithQuery:_queryRooms]; - [self.queryCache addQueryData:rooms]; + self.queryCache->AddTarget(rooms); DocumentKey key1 = testutil::Key("rooms/foo"); DocumentKey key2 = testutil::Key("rooms/bar"); [self addMatchingKey:key1 forTargetID:rooms.targetID]; [self addMatchingKey:key2 forTargetID:rooms.targetID]; - XCTAssertTrue([self.queryCache containsKey:key1]); - XCTAssertTrue([self.queryCache containsKey:key2]); + XCTAssertTrue(self.queryCache->Contains(key1)); + XCTAssertTrue(self.queryCache->Contains(key2)); - [self.queryCache removeQueryData:rooms]; - XCTAssertFalse([self.queryCache containsKey:key1]); - XCTAssertFalse([self.queryCache containsKey:key2]); + self.queryCache->RemoveTarget(rooms); + XCTAssertFalse(self.queryCache->Contains(key1)); + XCTAssertFalse(self.queryCache->Contains(key2)); }); } @@ -196,46 +196,19 @@ - (void)testAddOrRemoveMatchingKeys { self.persistence.run("testAddOrRemoveMatchingKeys", [&]() { DocumentKey key = testutil::Key("foo/bar"); - XCTAssertFalse([self.queryCache containsKey:key]); + XCTAssertFalse(self.queryCache->Contains(key)); [self addMatchingKey:key forTargetID:1]; - XCTAssertTrue([self.queryCache containsKey:key]); + XCTAssertTrue(self.queryCache->Contains(key)); [self addMatchingKey:key forTargetID:2]; - XCTAssertTrue([self.queryCache containsKey:key]); + XCTAssertTrue(self.queryCache->Contains(key)); [self removeMatchingKey:key forTargetID:1]; - XCTAssertTrue([self.queryCache containsKey:key]); + XCTAssertTrue(self.queryCache->Contains(key)); [self removeMatchingKey:key forTargetID:2]; - XCTAssertFalse([self.queryCache containsKey:key]); - }); -} - -- (void)testRemoveMatchingKeysForTargetID { - if ([self isTestBaseClass]) return; - - self.persistence.run("testRemoveMatchingKeysForTargetID", [&]() { - DocumentKey key1 = testutil::Key("foo/bar"); - DocumentKey key2 = testutil::Key("foo/baz"); - DocumentKey key3 = testutil::Key("foo/blah"); - - [self addMatchingKey:key1 forTargetID:1]; - [self addMatchingKey:key2 forTargetID:1]; - [self addMatchingKey:key3 forTargetID:2]; - XCTAssertTrue([self.queryCache containsKey:key1]); - XCTAssertTrue([self.queryCache containsKey:key2]); - XCTAssertTrue([self.queryCache containsKey:key3]); - - [self.queryCache removeMatchingKeysForTargetID:1]; - XCTAssertFalse([self.queryCache containsKey:key1]); - XCTAssertFalse([self.queryCache containsKey:key2]); - XCTAssertTrue([self.queryCache containsKey:key3]); - - [self.queryCache removeMatchingKeysForTargetID:2]; - XCTAssertFalse([self.queryCache containsKey:key1]); - XCTAssertFalse([self.queryCache containsKey:key2]); - XCTAssertFalse([self.queryCache containsKey:key3]); + XCTAssertFalse(self.queryCache->Contains(key)); }); } @@ -251,12 +224,12 @@ - (void)testMatchingKeysForTargetID { [self addMatchingKey:key2 forTargetID:1]; [self addMatchingKey:key3 forTargetID:2]; - XCTAssertEqual([self.queryCache matchingKeysForTargetID:1], (DocumentKeySet{key1, key2})); - XCTAssertEqual([self.queryCache matchingKeysForTargetID:2], (DocumentKeySet{key3})); + XCTAssertEqual(self.queryCache->GetMatchingKeys(1), (DocumentKeySet{key1, key2})); + XCTAssertEqual(self.queryCache->GetMatchingKeys(2), (DocumentKeySet{key3})); [self addMatchingKey:key1 forTargetID:2]; - XCTAssertEqual([self.queryCache matchingKeysForTargetID:1], (DocumentKeySet{key1, key2})); - XCTAssertEqual([self.queryCache matchingKeysForTargetID:2], (DocumentKeySet{key1, key3})); + XCTAssertEqual(self.queryCache->GetMatchingKeys(1), (DocumentKeySet{key1, key2})); + XCTAssertEqual(self.queryCache->GetMatchingKeys(2), (DocumentKeySet{key1, key3})); }); } @@ -268,30 +241,30 @@ - (void)testHighestListenSequenceNumber { targetID:1 listenSequenceNumber:10 purpose:FSTQueryPurposeListen]; - [self.queryCache addQueryData:query1]; + self.queryCache->AddTarget(query1); FSTQueryData *query2 = [[FSTQueryData alloc] initWithQuery:FSTTestQuery("halls") targetID:2 listenSequenceNumber:20 purpose:FSTQueryPurposeListen]; - [self.queryCache addQueryData:query2]; - XCTAssertEqual([self.queryCache highestListenSequenceNumber], 20); + self.queryCache->AddTarget(query2); + XCTAssertEqual(self.queryCache->highest_listen_sequence_number(), 20); // Sequence numbers never come down. - [self.queryCache removeQueryData:query2]; - XCTAssertEqual([self.queryCache highestListenSequenceNumber], 20); + self.queryCache->RemoveTarget(query2); + XCTAssertEqual(self.queryCache->highest_listen_sequence_number(), 20); FSTQueryData *query3 = [[FSTQueryData alloc] initWithQuery:FSTTestQuery("garages") targetID:42 listenSequenceNumber:100 purpose:FSTQueryPurposeListen]; - [self.queryCache addQueryData:query3]; - XCTAssertEqual([self.queryCache highestListenSequenceNumber], 100); + self.queryCache->AddTarget(query3); + XCTAssertEqual(self.queryCache->highest_listen_sequence_number(), 100); - [self.queryCache removeQueryData:query1]; - XCTAssertEqual([self.queryCache highestListenSequenceNumber], 100); + self.queryCache->AddTarget(query1); + XCTAssertEqual(self.queryCache->highest_listen_sequence_number(), 100); - [self.queryCache removeQueryData:query3]; - XCTAssertEqual([self.queryCache highestListenSequenceNumber], 100); + self.queryCache->RemoveTarget(query3); + XCTAssertEqual(self.queryCache->highest_listen_sequence_number(), 100); }); } @@ -299,7 +272,7 @@ - (void)testHighestTargetID { if ([self isTestBaseClass]) return; self.persistence.run("testHighestTargetID", [&]() { - XCTAssertEqual([self.queryCache highestTargetID], 0); + XCTAssertEqual(self.queryCache->highest_target_id(), 0); FSTQueryData *query1 = [[FSTQueryData alloc] initWithQuery:FSTTestQuery("rooms") targetID:1 @@ -307,7 +280,7 @@ - (void)testHighestTargetID { purpose:FSTQueryPurposeListen]; DocumentKey key1 = testutil::Key("rooms/bar"); DocumentKey key2 = testutil::Key("rooms/foo"); - [self.queryCache addQueryData:query1]; + self.queryCache->AddTarget(query1); [self addMatchingKey:key1 forTargetID:1]; [self addMatchingKey:key2 forTargetID:1]; @@ -316,27 +289,27 @@ - (void)testHighestTargetID { listenSequenceNumber:20 purpose:FSTQueryPurposeListen]; DocumentKey key3 = testutil::Key("halls/foo"); - [self.queryCache addQueryData:query2]; + self.queryCache->AddTarget(query2); [self addMatchingKey:key3 forTargetID:2]; - XCTAssertEqual([self.queryCache highestTargetID], 2); + XCTAssertEqual(self.queryCache->highest_target_id(), 2); // TargetIDs never come down. - [self.queryCache removeQueryData:query2]; - XCTAssertEqual([self.queryCache highestTargetID], 2); + self.queryCache->RemoveTarget(query2); + XCTAssertEqual(self.queryCache->highest_target_id(), 2); // A query with an empty result set still counts. FSTQueryData *query3 = [[FSTQueryData alloc] initWithQuery:FSTTestQuery("garages") targetID:42 listenSequenceNumber:100 purpose:FSTQueryPurposeListen]; - [self.queryCache addQueryData:query3]; - XCTAssertEqual([self.queryCache highestTargetID], 42); + self.queryCache->AddTarget(query3); + XCTAssertEqual(self.queryCache->highest_target_id(), 42); - [self.queryCache removeQueryData:query1]; - XCTAssertEqual([self.queryCache highestTargetID], 42); + self.queryCache->RemoveTarget(query1); + XCTAssertEqual(self.queryCache->highest_target_id(), 42); - [self.queryCache removeQueryData:query3]; - XCTAssertEqual([self.queryCache highestTargetID], 42); + self.queryCache->RemoveTarget(query3); + XCTAssertEqual(self.queryCache->highest_target_id(), 42); }); } @@ -344,11 +317,11 @@ - (void)testLastRemoteSnapshotVersion { if ([self isTestBaseClass]) return; self.persistence.run("testLastRemoteSnapshotVersion", [&]() { - XCTAssertEqual([self.queryCache lastRemoteSnapshotVersion], SnapshotVersion::None()); + XCTAssertEqual(self.queryCache->GetLastRemoteSnapshotVersion(), SnapshotVersion::None()); // Can set the snapshot version. - [self.queryCache setLastRemoteSnapshotVersion:testutil::Version(42)]; - XCTAssertEqual([self.queryCache lastRemoteSnapshotVersion], testutil::Version(42)); + self.queryCache->SetLastRemoteSnapshotVersion(testutil::Version(42)); + XCTAssertEqual(self.queryCache->GetLastRemoteSnapshotVersion(), testutil::Version(42)); }); } @@ -380,12 +353,12 @@ - (FSTQueryData *)queryDataWithQuery:(FSTQuery *)query - (void)addMatchingKey:(const DocumentKey &)key forTargetID:(TargetId)targetID { DocumentKeySet keys{key}; - [self.queryCache addMatchingKeys:keys forTargetID:targetID]; + self.queryCache->AddMatchingKeys(keys, targetID); } - (void)removeMatchingKey:(const DocumentKey &)key forTargetID:(TargetId)targetID { DocumentKeySet keys{key}; - [self.queryCache removeMatchingKeys:keys forTargetID:targetID]; + self.queryCache->RemoveMatchingKeys(keys, targetID); } @end diff --git a/Firestore/Source/Local/FSTLRUGarbageCollector.h b/Firestore/Source/Local/FSTLRUGarbageCollector.h index 1eeb5e6bd32..69c8fa85248 100644 --- a/Firestore/Source/Local/FSTLRUGarbageCollector.h +++ b/Firestore/Source/Local/FSTLRUGarbageCollector.h @@ -23,8 +23,6 @@ #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/types.h" -@protocol FSTQueryCache; - @class FSTLRUGarbageCollector; extern const firebase::firestore::model::ListenSequenceNumber kFSTListenSequenceNumberInvalid; @@ -108,7 +106,7 @@ struct LruResults { - (size_t)byteSize; /** Returns the number of targets and orphaned documents cached. */ -- (int32_t)sequenceNumberCount; +- (size_t)sequenceNumberCount; /** Access to the underlying LRU Garbage collector instance. */ @property(strong, nonatomic, readonly) FSTLRUGarbageCollector *gc; diff --git a/Firestore/Source/Local/FSTLRUGarbageCollector.mm b/Firestore/Source/Local/FSTLRUGarbageCollector.mm index cc368fd3f8f..3f2ba121004 100644 --- a/Firestore/Source/Local/FSTLRUGarbageCollector.mm +++ b/Firestore/Source/Local/FSTLRUGarbageCollector.mm @@ -22,7 +22,6 @@ #import "Firestore/Source/Local/FSTMutationQueue.h" #import "Firestore/Source/Local/FSTPersistence.h" -#import "Firestore/Source/Local/FSTQueryCache.h" #include "Firestore/core/include/firebase/firestore/timestamp.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/util/log.h" @@ -148,7 +147,7 @@ - (LruResults)runGCWithLiveTargets:(NSDictionary *)l } - (int)queryCountForPercentile:(NSUInteger)percentile { - int totalCount = [_delegate sequenceNumberCount]; + size_t totalCount = [_delegate sequenceNumberCount]; int setSize = (int)((percentile / 100.0f) * totalCount); return setSize; } diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index c9b83995b27..9fcec701b83 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -23,7 +23,6 @@ #import "Firestore/Source/Core/FSTListenSequence.h" #import "Firestore/Source/Local/FSTLRUGarbageCollector.h" #import "Firestore/Source/Local/FSTLevelDBMutationQueue.h" -#import "Firestore/Source/Local/FSTLevelDBQueryCache.h" #import "Firestore/Source/Remote/FSTSerializerBeta.h" #include "Firestore/core/include/firebase/firestore/firestore_errors.h" @@ -31,6 +30,7 @@ #include "Firestore/core/src/firebase/firestore/core/database_info.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_migrations.h" +#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" #include "Firestore/core/src/firebase/firestore/local/leveldb_util.h" @@ -61,6 +61,7 @@ using firebase::firestore::local::LevelDbDocumentTargetKey; using firebase::firestore::local::LevelDbMigrations; using firebase::firestore::local::LevelDbMutationKey; +using firebase::firestore::local::LevelDbQueryCache; using firebase::firestore::local::LevelDbRemoteDocumentCache; using firebase::firestore::local::LevelDbTransaction; using firebase::firestore::local::LruParams; @@ -88,6 +89,8 @@ - (size_t)byteSize; @property(nonatomic, assign, getter=isStarted) BOOL started; +- (firebase::firestore::local::LevelDbQueryCache *)queryCache; + @end /** @@ -126,7 +129,7 @@ - (instancetype)initWithPersistence:(FSTLevelDB *)persistence lruParams:(LruPara } - (void)start { - ListenSequenceNumber highestSequenceNumber = _db.queryCache.highestListenSequenceNumber; + ListenSequenceNumber highestSequenceNumber = _db.queryCache->highest_listen_sequence_number(); _listenSequence = [[FSTListenSequence alloc] initStartingAfter:highestSequenceNumber]; } @@ -157,7 +160,7 @@ - (void)removeTarget:(FSTQueryData *)queryData { [queryData queryDataByReplacingSnapshotVersion:queryData.snapshotVersion resumeToken:queryData.resumeToken sequenceNumber:[self currentSequenceNumber]]; - [_db.queryCache updateQueryData:updated]; + _db.queryCache->UpdateTarget(updated); } - (void)addReference:(const DocumentKey &)key { @@ -196,29 +199,26 @@ - (BOOL)isPinned:(const DocumentKey &)docKey { } - (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - FSTLevelDBQueryCache *queryCache = _db.queryCache; - [queryCache enumerateTargetsUsingBlock:block]; + _db.queryCache->EnumerateTargets(block); } - (void)enumerateMutationsUsingBlock: (void (^)(const DocumentKey &key, ListenSequenceNumber sequenceNumber, BOOL *stop))block { - FSTLevelDBQueryCache *queryCache = _db.queryCache; - [queryCache enumerateOrphanedDocumentsUsingBlock:block]; + _db.queryCache->EnumerateOrphanedDocuments(block); } - (int)removeOrphanedDocumentsThroughSequenceNumber:(ListenSequenceNumber)upperBound { - FSTLevelDBQueryCache *queryCache = _db.queryCache; __block int count = 0; - [queryCache enumerateOrphanedDocumentsUsingBlock:^( - const DocumentKey &docKey, ListenSequenceNumber sequenceNumber, BOOL *stop) { - if (sequenceNumber <= upperBound) { - if (![self isPinned:docKey]) { - count++; - self->_db.remoteDocumentCache->Remove(docKey); - [self removeSentinel:docKey]; - } - } - }]; + _db.queryCache->EnumerateOrphanedDocuments( + ^(const DocumentKey &docKey, ListenSequenceNumber sequenceNumber, BOOL *stop) { + if (sequenceNumber <= upperBound) { + if (![self isPinned:docKey]) { + count++; + self->_db.remoteDocumentCache->Remove(docKey); + [self removeSentinel:docKey]; + } + } + }); return count; } @@ -228,12 +228,11 @@ - (void)removeSentinel:(const DocumentKey &)key { - (int)removeTargetsThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber liveQueries:(NSDictionary *)liveQueries { - FSTLevelDBQueryCache *queryCache = _db.queryCache; - return [queryCache removeQueriesThroughSequenceNumber:sequenceNumber liveQueries:liveQueries]; + return _db.queryCache->RemoveTargets(sequenceNumber, liveQueries); } -- (int32_t)sequenceNumberCount { - __block int32_t totalCount = [_db.queryCache count]; +- (size_t)sequenceNumberCount { + __block size_t totalCount = _db.queryCache->size(); [self enumerateMutationsUsingBlock:^(const DocumentKey &key, ListenSequenceNumber sequenceNumber, BOOL *stop) { totalCount++; @@ -273,7 +272,7 @@ @implementation FSTLevelDB { std::unique_ptr _documentCache; FSTTransactionRunner _transactionRunner; FSTLevelDBLRUDelegate *_referenceDelegate; - FSTLevelDBQueryCache *_queryCache; + std::unique_ptr _queryCache; std::set _users; } @@ -340,14 +339,14 @@ - (instancetype)initWithLevelDB:(std::unique_ptr)db _ptr = std::move(db); _directory = std::move(directory); _serializer = serializer; - _queryCache = [[FSTLevelDBQueryCache alloc] initWithDB:self serializer:self.serializer]; + _queryCache = absl::make_unique(self, _serializer); _documentCache = absl::make_unique(self, _serializer); _referenceDelegate = [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self lruParams:lruParams]; _transactionRunner.SetBackingPersistence(self); _users = std::move(users); // TODO(gsoltis): set up a leveldb transaction for these operations. - [_queryCache start]; + _queryCache->Start(); [_referenceDelegate start]; } return self; @@ -463,8 +462,8 @@ - (LevelDbTransaction *)currentTransaction { return [FSTLevelDBMutationQueue mutationQueueWithUser:user db:self serializer:self.serializer]; } -- (id)queryCache { - return _queryCache; +- (LevelDbQueryCache *)queryCache { + return _queryCache.get(); } - (RemoteDocumentCache *)remoteDocumentCache { diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.h b/Firestore/Source/Local/FSTLevelDBQueryCache.h deleted file mode 100644 index f27ff8fcb03..00000000000 --- a/Firestore/Source/Local/FSTLevelDBQueryCache.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include - -#import "Firestore/Source/Local/FSTQueryCache.h" -#include "Firestore/core/src/firebase/firestore/local/leveldb_transaction.h" -#include "Firestore/core/src/firebase/firestore/model/types.h" -#include "leveldb/db.h" - -@class FSTLevelDB; -@class FSTLocalSerializer; -@class FSTPBTargetGlobal; - -NS_ASSUME_NONNULL_BEGIN - -/** Cached Queries backed by LevelDB. */ -@interface FSTLevelDBQueryCache : NSObject - -/** - * Retrieves the global singleton metadata row from the given database, if it exists. - * TODO(gsoltis): remove this method once fully ported to transactions. - */ -+ (nullable FSTPBTargetGlobal *)readTargetMetadataFromDB:(leveldb::DB *)db; - -- (instancetype)init NS_UNAVAILABLE; - -/** - * Creates a new query cache in the given LevelDB. - * - * @param db The LevelDB in which to create the cache. - */ -- (instancetype)initWithDB:(FSTLevelDB *)db - serializer:(FSTLocalSerializer *)serializer NS_DESIGNATED_INITIALIZER; - -/** Starts the query cache up. */ -- (void)start; - -- (void)enumerateOrphanedDocumentsUsingBlock: - (void (^)(const firebase::firestore::model::DocumentKey &docKey, - firebase::firestore::model::ListenSequenceNumber sequenceNumber, - BOOL *stop))block; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.mm b/Firestore/Source/Local/FSTLevelDBQueryCache.mm deleted file mode 100644 index 800711d5912..00000000000 --- a/Firestore/Source/Local/FSTLevelDBQueryCache.mm +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTLevelDBQueryCache.h" - -#include -#include -#include - -#import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" -#import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Local/FSTLevelDB.h" -#import "Firestore/Source/Local/FSTLocalSerializer.h" -#import "Firestore/Source/Local/FSTQueryData.h" - -#include "Firestore/core/src/firebase/firestore/local/leveldb_key.h" -#include "Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h" -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" -#include "Firestore/core/src/firebase/firestore/util/hard_assert.h" -#include "absl/memory/memory.h" -#include "absl/strings/match.h" - -NS_ASSUME_NONNULL_BEGIN - -using firebase::firestore::local::DescribeKey; -using firebase::firestore::local::LevelDbDocumentTargetKey; -using firebase::firestore::local::LevelDbQueryTargetKey; -using firebase::firestore::local::LevelDbQueryCache; -using firebase::firestore::local::LevelDbTargetDocumentKey; -using firebase::firestore::local::LevelDbTargetGlobalKey; -using firebase::firestore::local::LevelDbTargetKey; -using firebase::firestore::local::LevelDbTransaction; -using firebase::firestore::model::DocumentKey; -using firebase::firestore::model::DocumentKeySet; -using firebase::firestore::model::ListenSequenceNumber; -using firebase::firestore::model::SnapshotVersion; -using firebase::firestore::model::TargetId; -using leveldb::DB; -using leveldb::Slice; -using leveldb::Status; - -@implementation FSTLevelDBQueryCache { - std::unique_ptr _cache; -} - -+ (nullable FSTPBTargetGlobal *)readTargetMetadataFromDB:(DB *)db { - return LevelDbQueryCache::ReadMetadata(db); -} - -- (instancetype)initWithDB:(FSTLevelDB *)db serializer:(FSTLocalSerializer *)serializer { - if (self = [super init]) { - HARD_ASSERT(db, "db must not be NULL"); - _cache = absl::make_unique(db, serializer); - } - return self; -} - -- (void)start { - _cache->Start(); -} - -#pragma mark - FSTQueryCache implementation - -- (TargetId)highestTargetID { - return _cache->highest_target_id(); -} - -- (ListenSequenceNumber)highestListenSequenceNumber { - return _cache->highest_listen_sequence_number(); -} - -- (const SnapshotVersion &)lastRemoteSnapshotVersion { - return _cache->GetLastRemoteSnapshotVersion(); -} - -- (void)setLastRemoteSnapshotVersion:(SnapshotVersion)snapshotVersion { - _cache->SetLastRemoteSnapshotVersion(std::move(snapshotVersion)); -} - -- (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - _cache->EnumerateTargets(block); -} - -- (void)enumerateOrphanedDocumentsUsingBlock: - (void (^)(const DocumentKey &docKey, ListenSequenceNumber sequenceNumber, BOOL *stop))block { - _cache->EnumerateOrphanedDocuments(block); -} - -- (void)addQueryData:(FSTQueryData *)queryData { - _cache->AddTarget(queryData); -} - -- (void)updateQueryData:(FSTQueryData *)queryData { - _cache->UpdateTarget(queryData); -} - -- (void)removeQueryData:(FSTQueryData *)queryData { - _cache->RemoveTarget(queryData); -} - -- (int)removeQueriesThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber - liveQueries:(NSDictionary *)liveQueries { - return _cache->RemoveTargets(sequenceNumber, liveQueries); -} - -- (int32_t)count { - return _cache->size(); -} - -- (nullable FSTQueryData *)queryDataForQuery:(FSTQuery *)query { - return _cache->GetTarget(query); -} - -#pragma mark Matching Key tracking - -- (void)addMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - _cache->AddMatchingKeys(keys, targetID); -} - -- (void)removeMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - _cache->RemoveMatchingKeys(keys, targetID); -} - -- (void)removeMatchingKeysForTargetID:(TargetId)targetID { - _cache->RemoveAllKeysForTarget(targetID); -} - -- (DocumentKeySet)matchingKeysForTargetID:(TargetId)targetID { - return _cache->GetMatchingKeys(targetID); -} - -- (BOOL)containsKey:(const DocumentKey &)key { - return _cache->Contains(key); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index fcc8ffaa59f..129b7c1b2be 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -28,7 +28,6 @@ #import "Firestore/Source/Local/FSTLocalWriteResult.h" #import "Firestore/Source/Local/FSTMutationQueue.h" #import "Firestore/Source/Local/FSTPersistence.h" -#import "Firestore/Source/Local/FSTQueryCache.h" #import "Firestore/Source/Local/FSTQueryData.h" #import "Firestore/Source/Model/FSTDocument.h" #import "Firestore/Source/Model/FSTMutation.h" @@ -38,6 +37,7 @@ #include "Firestore/core/src/firebase/firestore/auth/user.h" #include "Firestore/core/src/firebase/firestore/core/target_id_generator.h" #include "Firestore/core/src/firebase/firestore/immutable/sorted_set.h" +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" @@ -47,6 +47,7 @@ using firebase::firestore::auth::User; using firebase::firestore::core::TargetIdGenerator; using firebase::firestore::local::LruResults; +using firebase::firestore::local::QueryCache; using firebase::firestore::local::ReferenceSet; using firebase::firestore::local::RemoteDocumentCache; using firebase::firestore::model::BatchId; @@ -81,7 +82,7 @@ @interface FSTLocalStore () @property(nonatomic, strong) FSTLocalDocumentsView *localDocuments; /** Maps a query to the data about that query. */ -@property(nonatomic, strong) id queryCache; +@property(nonatomic) QueryCache *queryCache; /** Maps a targetID to data about its query. */ @property(nonatomic, strong) NSMutableDictionary *targetIDs; @@ -93,6 +94,7 @@ @implementation FSTLocalStore { TargetIdGenerator _targetIDGenerator; /** The set of all cached remote documents. */ RemoteDocumentCache *_remoteDocumentCache; + QueryCache *_queryCache; /** The set of document references maintained by any local views. */ ReferenceSet _localViewReferences; @@ -118,7 +120,7 @@ - (instancetype)initWithPersistence:(id)persistence - (void)start { [self startMutationQueue]; - TargetId targetID = [self.queryCache highestTargetID]; + TargetId targetID = _queryCache->highest_target_id(); _targetIDGenerator = TargetIdGenerator::QueryCacheTargetIdGenerator(targetID); } @@ -207,14 +209,13 @@ - (void)setLastStreamToken:(nullable NSData *)streamToken { } - (const SnapshotVersion &)lastRemoteSnapshotVersion { - return [self.queryCache lastRemoteSnapshotVersion]; + return self.queryCache->GetLastRemoteSnapshotVersion(); } - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { return self.persistence.run("Apply remote event", [&]() -> MaybeDocumentMap { // TODO(gsoltis): move the sequence number into the reference delegate. ListenSequenceNumber sequenceNumber = self.persistence.currentSequenceNumber; - id queryCache = self.queryCache; DocumentKeySet authoritativeUpdates; for (const auto &entry : remoteEvent.targetChanges) { @@ -243,8 +244,8 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { authoritativeUpdates = authoritativeUpdates.insert(key); } - [queryCache removeMatchingKeys:change.removedDocuments forTargetID:targetID]; - [queryCache addMatchingKeys:change.addedDocuments forTargetID:targetID]; + _queryCache->RemoveMatchingKeys(change.removedDocuments, targetID); + _queryCache->AddMatchingKeys(change.addedDocuments, targetID); // Update the resume token if the change includes one. Don't clear any preexisting value. // Bump the sequence number as well, so that documents being removed now are ordered later @@ -258,7 +259,7 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { self.targetIDs[boxedTargetID] = queryData; if ([self shouldPersistQueryData:queryData oldQueryData:oldQueryData change:change]) { - [self.queryCache updateQueryData:queryData]; + _queryCache->UpdateTarget(queryData); } } } @@ -307,13 +308,13 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { // HACK: The only reason we allow omitting snapshot version is so we can synthesize remote // events when we get permission denied errors while trying to resolve the state of a locally // cached document that is in limbo. - const SnapshotVersion &lastRemoteVersion = [self.queryCache lastRemoteSnapshotVersion]; + const SnapshotVersion &lastRemoteVersion = _queryCache->GetLastRemoteSnapshotVersion(); const SnapshotVersion &remoteVersion = remoteEvent.snapshotVersion; if (remoteVersion != SnapshotVersion::None()) { HARD_ASSERT(remoteVersion >= lastRemoteVersion, "Watch stream reverted to previous snapshot?? (%s < %s)", remoteVersion.timestamp().ToString(), lastRemoteVersion.timestamp().ToString()); - [self.queryCache setLastRemoteSnapshotVersion:remoteVersion]; + _queryCache->SetLastRemoteSnapshotVersion(remoteVersion); } return [self.localDocuments localViewsForDocuments:changedDocs]; @@ -385,14 +386,14 @@ - (nullable FSTMaybeDocument *)readDocument:(const DocumentKey &)key { - (FSTQueryData *)allocateQuery:(FSTQuery *)query { FSTQueryData *queryData = self.persistence.run("Allocate query", [&]() -> FSTQueryData * { - FSTQueryData *cached = [self.queryCache queryDataForQuery:query]; + FSTQueryData *cached = _queryCache->GetTarget(query); // TODO(mcg): freshen last accessed date if cached exists? if (!cached) { cached = [[FSTQueryData alloc] initWithQuery:query targetID:_targetIDGenerator.NextId() listenSequenceNumber:self.persistence.currentSequenceNumber purpose:FSTQueryPurposeListen]; - [self.queryCache addQueryData:cached]; + _queryCache->AddTarget(cached); } return cached; }); @@ -406,7 +407,7 @@ - (FSTQueryData *)allocateQuery:(FSTQuery *)query { - (void)releaseQuery:(FSTQuery *)query { self.persistence.run("Release query", [&]() { - FSTQueryData *queryData = [self.queryCache queryDataForQuery:query]; + FSTQueryData *queryData = _queryCache->GetTarget(query); HARD_ASSERT(queryData, "Tried to release nonexistent query: %s", query); TargetId targetID = queryData.targetID; @@ -418,7 +419,7 @@ - (void)releaseQuery:(FSTQuery *)query { // conditions and rationale) we need to persist the token now because there will no // longer be an in-memory version to fall back on. queryData = cachedQueryData; - [self.queryCache updateQueryData:queryData]; + _queryCache->UpdateTarget(queryData); } // References for documents sent via Watch are automatically removed when we delete a @@ -442,7 +443,7 @@ - (DocumentMap)executeQuery:(FSTQuery *)query { - (DocumentKeySet)remoteDocumentKeysForTarget:(TargetId)targetID { return self.persistence.run("RemoteDocumentKeysForTarget", [&]() -> DocumentKeySet { - return [self.queryCache matchingKeysForTargetID:targetID]; + return _queryCache->GetMatchingKeys(targetID); }); } diff --git a/Firestore/Source/Local/FSTMemoryPersistence.mm b/Firestore/Source/Local/FSTMemoryPersistence.mm index 2f04f630c89..44f9432072e 100644 --- a/Firestore/Source/Local/FSTMemoryPersistence.mm +++ b/Firestore/Source/Local/FSTMemoryPersistence.mm @@ -23,10 +23,10 @@ #import "Firestore/Source/Core/FSTListenSequence.h" #import "Firestore/Source/Local/FSTMemoryMutationQueue.h" -#import "Firestore/Source/Local/FSTMemoryQueryCache.h" #include "absl/memory/memory.h" #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" #include "Firestore/core/src/firebase/firestore/local/memory_remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" @@ -35,6 +35,7 @@ using firebase::firestore::auth::HashUser; using firebase::firestore::auth::User; using firebase::firestore::local::LruParams; +using firebase::firestore::local::MemoryQueryCache; using firebase::firestore::local::MemoryRemoteDocumentCache; using firebase::firestore::local::ReferenceSet; using firebase::firestore::model::DocumentKey; @@ -48,7 +49,7 @@ @interface FSTMemoryPersistence () -- (FSTMemoryQueryCache *)queryCache; +- (MemoryQueryCache *)queryCache; - (MemoryRemoteDocumentCache *)remoteDocumentCache; @@ -63,14 +64,14 @@ - (MemoryRemoteDocumentCache *)remoteDocumentCache; @implementation FSTMemoryPersistence { /** - * The FSTQueryCache representing the persisted cache of queries. + * The QueryCache representing the persisted cache of queries. * * Note that this is retained here to make it easier to write tests affecting both the in-memory * and LevelDB-backed persistence layers. Tests can create a new FSTLocalStore wrapping this * FSTPersistence instance and this will make the in-memory persistence layer behave as if it * were actually persisting values. */ - FSTMemoryQueryCache *_queryCache; + std::unique_ptr _queryCache; /** The RemoteDocumentCache representing the persisted cache of remote documents. */ MemoryRemoteDocumentCache _remoteDocumentCache; @@ -99,7 +100,7 @@ + (instancetype)persistenceWithLruParams:(firebase::firestore::local::LruParams) - (instancetype)init { if (self = [super init]) { - _queryCache = [[FSTMemoryQueryCache alloc] initWithPersistence:self]; + _queryCache = absl::make_unique(self); self.started = YES; } return self; @@ -140,8 +141,8 @@ - (ListenSequenceNumber)currentSequenceNumber { return queue; } -- (FSTMemoryQueryCache *)queryCache { - return _queryCache; +- (MemoryQueryCache *)queryCache { + return _queryCache.get(); } - (MemoryRemoteDocumentCache *)remoteDocumentCache { @@ -173,7 +174,7 @@ - (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence _currentSequenceNumber = kFSTListenSequenceNumberInvalid; // Theoretically this is always 0, since this is all in-memory... ListenSequenceNumber highestSequenceNumber = - _persistence.queryCache.highestListenSequenceNumber; + _persistence.queryCache->highest_listen_sequence_number(); _listenSequence = [[FSTListenSequence alloc] initStartingAfter:highestSequenceNumber]; _serializer = serializer; } @@ -200,7 +201,7 @@ - (void)removeTarget:(FSTQueryData *)queryData { FSTQueryData *updated = [queryData queryDataByReplacingSnapshotVersion:queryData.snapshotVersion resumeToken:queryData.resumeToken sequenceNumber:_currentSequenceNumber]; - [_persistence.queryCache updateQueryData:updated]; + _persistence.queryCache->UpdateTarget(updated); } - (void)limboDocumentUpdated:(const DocumentKey &)key { @@ -216,7 +217,7 @@ - (void)commitTransaction { } - (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - return [_persistence.queryCache enumerateTargetsUsingBlock:block]; + return _persistence.queryCache->EnumerateTargets(block); } - (void)enumerateMutationsUsingBlock: @@ -235,12 +236,11 @@ - (void)enumerateMutationsUsingBlock: - (int)removeTargetsThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber liveQueries:(NSDictionary *)liveQueries { - return [_persistence.queryCache removeQueriesThroughSequenceNumber:sequenceNumber - liveQueries:liveQueries]; + return _persistence.queryCache->RemoveTargets(sequenceNumber, liveQueries); } -- (int32_t)sequenceNumberCount { - __block int32_t totalCount = [_persistence.queryCache count]; +- (size_t)sequenceNumberCount { + __block size_t totalCount = _persistence.queryCache->size(); [self enumerateMutationsUsingBlock:^(const DocumentKey &key, ListenSequenceNumber sequenceNumber, BOOL *stop) { totalCount++; @@ -287,7 +287,7 @@ - (BOOL)isPinnedAtSequenceNumber:(ListenSequenceNumber)upperBound if (_additionalReferences->ContainsKey(key)) { return YES; } - if ([_persistence.queryCache containsKey:key]) { + if (_persistence.queryCache->Contains(key)) { return YES; } auto it = _sequenceNumbers.find(key); @@ -302,7 +302,7 @@ - (size_t)byteSize { // used for testing. The algorithm here (loop through everything, serialize it // and count bytes) is inefficient and inexact, but won't run in production. size_t count = 0; - count += [_persistence.queryCache byteSizeWithSerializer:_serializer]; + count += _persistence.queryCache->CalculateByteSize(_serializer); count += _persistence.remoteDocumentCache->CalculateByteSize(_serializer); const MutationQueues &queues = [_persistence mutationQueues]; for (const auto &entry : queues) { @@ -339,11 +339,10 @@ - (void)addInMemoryPins:(ReferenceSet *)set { } - (void)removeTarget:(FSTQueryData *)queryData { - for (const DocumentKey &docKey : - [_persistence.queryCache matchingKeysForTargetID:queryData.targetID]) { + for (const DocumentKey &docKey : _persistence.queryCache->GetMatchingKeys(queryData.targetID)) { _orphaned->insert(docKey); } - [_persistence.queryCache removeQueryData:queryData]; + _persistence.queryCache->RemoveTarget(queryData); } - (void)addReference:(const DocumentKey &)key { @@ -359,7 +358,7 @@ - (void)removeMutationReference:(const DocumentKey &)key { } - (BOOL)isReferenced:(const DocumentKey &)key { - if ([[_persistence queryCache] containsKey:key]) { + if (_persistence.queryCache->Contains(key)) { return YES; } if ([self mutationQueuesContainKey:key]) { diff --git a/Firestore/Source/Local/FSTMemoryQueryCache.h b/Firestore/Source/Local/FSTMemoryQueryCache.h deleted file mode 100644 index 66cbdb91cc1..00000000000 --- a/Firestore/Source/Local/FSTMemoryQueryCache.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#import "Firestore/Source/Local/FSTQueryCache.h" - -NS_ASSUME_NONNULL_BEGIN - -@class FSTLocalSerializer; -@class FSTMemoryPersistence; - -/** - * An implementation of the FSTQueryCache protocol that merely keeps queries in memory, suitable - * for online only clients with persistence disabled. - */ -@interface FSTMemoryQueryCache : NSObject - -- (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence NS_DESIGNATED_INITIALIZER; - -- (instancetype)init NS_UNAVAILABLE; - -- (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTMemoryQueryCache.mm b/Firestore/Source/Local/FSTMemoryQueryCache.mm deleted file mode 100644 index bf82940168f..00000000000 --- a/Firestore/Source/Local/FSTMemoryQueryCache.mm +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import "Firestore/Source/Local/FSTMemoryQueryCache.h" - -#import - -#include -#include - -#import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" -#import "Firestore/Source/Core/FSTQuery.h" -#import "Firestore/Source/Local/FSTMemoryPersistence.h" -#import "Firestore/Source/Local/FSTQueryData.h" - -#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" -#include "Firestore/core/src/firebase/firestore/model/document_key.h" -#include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" -#include "absl/memory/memory.h" - -using firebase::firestore::local::MemoryQueryCache; -using firebase::firestore::model::DocumentKey; -using firebase::firestore::model::DocumentKeySet; -using firebase::firestore::model::ListenSequenceNumber; -using firebase::firestore::model::SnapshotVersion; -using firebase::firestore::model::TargetId; - -NS_ASSUME_NONNULL_BEGIN - -@implementation FSTMemoryQueryCache { - std::unique_ptr _cache; -} - -- (instancetype)initWithPersistence:(FSTMemoryPersistence *)persistence { - if (self = [super init]) { - _cache = absl::make_unique(persistence); - } - return self; -} - -#pragma mark - FSTQueryCache implementation -#pragma mark Query tracking - -- (TargetId)highestTargetID { - return _cache->highest_target_id(); -} - -- (ListenSequenceNumber)highestListenSequenceNumber { - return _cache->highest_listen_sequence_number(); -} - -- (const SnapshotVersion &)lastRemoteSnapshotVersion { - return _cache->GetLastRemoteSnapshotVersion(); -} - -- (void)setLastRemoteSnapshotVersion:(SnapshotVersion)snapshotVersion { - _cache->SetLastRemoteSnapshotVersion(std::move(snapshotVersion)); -} - -- (void)addQueryData:(FSTQueryData *)queryData { - _cache->AddTarget(queryData); -} - -- (void)updateQueryData:(FSTQueryData *)queryData { - _cache->UpdateTarget(queryData); -} - -- (int32_t)count { - return _cache->size(); -} - -- (void)removeQueryData:(FSTQueryData *)queryData { - _cache->RemoveTarget(queryData); -} - -- (nullable FSTQueryData *)queryDataForQuery:(FSTQuery *)query { - return _cache->GetTarget(query); -} - -- (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block { - _cache->EnumerateTargets(block); -} - -- (int)removeQueriesThroughSequenceNumber:(ListenSequenceNumber)sequenceNumber - liveQueries:(NSDictionary *)liveQueries { - return _cache->RemoveTargets(sequenceNumber, liveQueries); -} - -#pragma mark Reference tracking - -- (void)addMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - _cache->AddMatchingKeys(keys, targetID); -} - -- (void)removeMatchingKeys:(const DocumentKeySet &)keys forTargetID:(TargetId)targetID { - _cache->RemoveMatchingKeys(keys, targetID); -} - -- (void)removeMatchingKeysForTargetID:(TargetId)targetID { - _cache->RemoveAllKeysForTarget(targetID); -} - -- (DocumentKeySet)matchingKeysForTargetID:(TargetId)targetID { - return _cache->GetMatchingKeys(targetID); -} - -- (BOOL)containsKey:(const firebase::firestore::model::DocumentKey &)key { - return _cache->Contains(key); -} - -- (size_t)byteSizeWithSerializer:(FSTLocalSerializer *)serializer { - return _cache->CalculateByteSize(serializer); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/Source/Local/FSTPersistence.h b/Firestore/Source/Local/FSTPersistence.h index e02780e14fc..e44ee6500d6 100644 --- a/Firestore/Source/Local/FSTPersistence.h +++ b/Firestore/Source/Local/FSTPersistence.h @@ -17,6 +17,7 @@ #import #include "Firestore/core/src/firebase/firestore/auth/user.h" +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/local/remote_document_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" @@ -26,7 +27,6 @@ @class FSTQueryData; @protocol FSTMutationQueue; -@protocol FSTQueryCache; @protocol FSTReferenceDelegate; struct FSTTransactionRunner; @@ -79,7 +79,7 @@ NS_ASSUME_NONNULL_BEGIN - (id)mutationQueueForUser:(const firebase::firestore::auth::User &)user; /** Creates an FSTQueryCache representing the persisted cache of queries. */ -- (id)queryCache; +- (firebase::firestore::local::QueryCache *)queryCache; /** Creates an FSTRemoteDocumentCache representing the persisted cache of remote documents. */ - (firebase::firestore::local::RemoteDocumentCache *)remoteDocumentCache; diff --git a/Firestore/Source/Local/FSTQueryCache.h b/Firestore/Source/Local/FSTQueryCache.h deleted file mode 100644 index a6869908873..00000000000 --- a/Firestore/Source/Local/FSTQueryCache.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2017 Google - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#import - -#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" -#include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" -#include "Firestore/core/src/firebase/firestore/model/types.h" - -@class FSTDocumentSet; -@class FSTMaybeDocument; -@class FSTQuery; -@class FSTQueryData; - -NS_ASSUME_NONNULL_BEGIN - -/** - * Represents cached queries received from the remote backend. This contains both a mapping between - * queries and the documents that matched them according to the server, but also metadata about the - * queries. - * - * The cache is keyed by FSTQuery and entries in the cache are FSTQueryData instances. - */ -@protocol FSTQueryCache - -/** - * Returns the highest target ID of any query in the cache. Typically called during startup to - * seed a target ID generator and avoid collisions with existing queries. If there are no queries - * in the cache, returns zero. - */ -- (firebase::firestore::model::TargetId)highestTargetID; - -/** - * Returns the highest listen sequence number of any query seen by the cache. - */ -- (firebase::firestore::model::ListenSequenceNumber)highestListenSequenceNumber; - -/** - * A global snapshot version representing the last consistent snapshot we received from the - * backend. This is monotonically increasing and any snapshots received from the backend prior to - * this version (e.g. for targets resumed with a resume_token) should be suppressed (buffered) - * until the backend has caught up to this snapshot version again. This prevents our cache from - * ever going backwards in time. - * - * This is updated whenever our we get a TargetChange with a read_time and empty target_ids. - */ -- (const firebase::firestore::model::SnapshotVersion &)lastRemoteSnapshotVersion; - -/** - * Set the snapshot version representing the last consistent snapshot received from the backend. - * (see -lastRemoteSnapshotVersion for more details). - * - * @param snapshotVersion The new snapshot version. - */ -- (void)setLastRemoteSnapshotVersion:(firebase::firestore::model::SnapshotVersion)snapshotVersion; - -/** - * Adds an entry in the cache. - * - * The cache key is extracted from `queryData.query`. The key must not already exist in the cache. - * - * @param queryData A new FSTQueryData instance to put in the cache. - */ -- (void)addQueryData:(FSTQueryData *)queryData; - -/** - * Updates an entry in the cache. - * - * The cache key is extracted from `queryData.query`. The entry must already exist in the cache, - * and it will be replaced. - * @param queryData An FSTQueryData instance to replace an existing entry in the cache - */ -- (void)updateQueryData:(FSTQueryData *)queryData; - -/** Removes the cached entry for the given query data (no-op if no entry exists). */ -- (void)removeQueryData:(FSTQueryData *)queryData; - -- (void)enumerateTargetsUsingBlock:(void (^)(FSTQueryData *queryData, BOOL *stop))block; - -- (int)removeQueriesThroughSequenceNumber: - (firebase::firestore::model::ListenSequenceNumber)sequenceNumber - liveQueries:(NSDictionary *)liveQueries; - -/** Returns the number of targets cached. */ -- (int32_t)count; - -/** - * Looks up an FSTQueryData entry in the cache. - * - * @param query The query corresponding to the entry to look up. - * @return The cached FSTQueryData entry, or nil if the cache has no entry for the query. - */ -- (nullable FSTQueryData *)queryDataForQuery:(FSTQuery *)query; - -/** Adds the given document keys to cached query results of the given target ID. */ -- (void)addMatchingKeys:(const firebase::firestore::model::DocumentKeySet &)keys - forTargetID:(firebase::firestore::model::TargetId)targetID; - -/** Removes the given document keys from the cached query results of the given target ID. */ -- (void)removeMatchingKeys:(const firebase::firestore::model::DocumentKeySet &)keys - forTargetID:(firebase::firestore::model::TargetId)targetID; - -/** Removes all the keys in the query results of the given target ID. */ -- (void)removeMatchingKeysForTargetID:(firebase::firestore::model::TargetId)targetID; - -- (firebase::firestore::model::DocumentKeySet)matchingKeysForTargetID: - (firebase::firestore::model::TargetId)targetID; - -/** - * Checks to see if there are any references to a document with the given key. - */ -- (BOOL)containsKey:(const firebase::firestore::model::DocumentKey &)key; - -@end - -NS_ASSUME_NONNULL_END diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h index 159457fcbab..136d22805c3 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h +++ b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.h @@ -23,11 +23,8 @@ #import -// TODO(gsoltis): temporary include for `TargetEnumerator`. This will move once -// the QueryCache interface is defined, and then likely be deleted or replaced -// in favor of an iterator. #import "Firestore/Protos/objc/firestore/local/Target.pbobjc.h" -#include "Firestore/core/src/firebase/firestore/local/memory_query_cache.h" +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" #include "Firestore/core/src/firebase/firestore/model/document_key.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/types.h" @@ -46,7 +43,7 @@ namespace firestore { namespace local { /** Cached Queries backed by LevelDB. */ -class LevelDbQueryCache { +class LevelDbQueryCache : public QueryCache { public: /** Enumerator callback type for orphaned documents */ typedef void (^OrphanedDocumentEnumerator)(const model::DocumentKey&, @@ -68,48 +65,58 @@ class LevelDbQueryCache { LevelDbQueryCache(FSTLevelDB* db, FSTLocalSerializer* serializer); // Target-related methods - void AddTarget(FSTQueryData* query_data); + void AddTarget(FSTQueryData* query_data) override; - void UpdateTarget(FSTQueryData* query_data); + void UpdateTarget(FSTQueryData* query_data) override; - void RemoveTarget(FSTQueryData* query_data); + void RemoveTarget(FSTQueryData* query_data) override; - FSTQueryData* _Nullable GetTarget(FSTQuery* query); + FSTQueryData* _Nullable GetTarget(FSTQuery* query) override; - void EnumerateTargets(TargetEnumerator block); + void EnumerateTargets(TargetEnumerator block) override; - int RemoveTargets(model::ListenSequenceNumber upper_bound, - NSDictionary* live_targets); + int RemoveTargets( + model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets) override; // Key-related methods + + /** Adds the given document keys to cached query results of the given target + * ID. */ void AddMatchingKeys(const model::DocumentKeySet& keys, - model::TargetId target_id); + model::TargetId target_id) override; + /** Removes the given document keys from the cached query results of the given + * target ID. */ void RemoveMatchingKeys(const model::DocumentKeySet& keys, - model::TargetId target_id); + model::TargetId target_id) override; + /** Removes all the keys in the query results of the given target ID. */ void RemoveAllKeysForTarget(model::TargetId target_id); - model::DocumentKeySet GetMatchingKeys(model::TargetId target_id); + model::DocumentKeySet GetMatchingKeys(model::TargetId target_id) override; - bool Contains(const model::DocumentKey& key); + /** + * Checks to see if there are any references to a document with the given key. + */ + bool Contains(const model::DocumentKey& key) override; // Other methods and accessors - int32_t size() const { + size_t size() const override { return metadata_.targetCount; } - model::TargetId highest_target_id() const { + model::TargetId highest_target_id() const override { return metadata_.highestTargetId; } - model::ListenSequenceNumber highest_listen_sequence_number() const { + model::ListenSequenceNumber highest_listen_sequence_number() const override { return metadata_.highestListenSequenceNumber; } - const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const; + const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const override; - void SetLastRemoteSnapshotVersion(model::SnapshotVersion version); + void SetLastRemoteSnapshotVersion(model::SnapshotVersion version) override; // Non-interface methods void Start(); diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h index 659ce0d458d..a3c5bfd7139 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.h +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.h @@ -26,6 +26,7 @@ #include #include +#include "Firestore/core/src/firebase/firestore/local/query_cache.h" #include "Firestore/core/src/firebase/firestore/local/reference_set.h" #include "Firestore/core/src/firebase/firestore/model/document_key_set.h" #include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" @@ -42,57 +43,54 @@ namespace firebase { namespace firestore { namespace local { -typedef void (^TargetEnumerator)(FSTQueryData*, BOOL*); - -class MemoryQueryCache { +class MemoryQueryCache : public QueryCache { public: explicit MemoryQueryCache(FSTMemoryPersistence* persistence); // Target-related methods - void AddTarget(FSTQueryData* query_data); + void AddTarget(FSTQueryData* query_data) override; - void UpdateTarget(FSTQueryData* query_data); + void UpdateTarget(FSTQueryData* query_data) override; - void RemoveTarget(FSTQueryData* query_data); + void RemoveTarget(FSTQueryData* query_data) override; - FSTQueryData* _Nullable GetTarget(FSTQuery* query); + FSTQueryData* _Nullable GetTarget(FSTQuery* query) override; - void EnumerateTargets(TargetEnumerator block); + void EnumerateTargets(TargetEnumerator block) override; - int RemoveTargets(model::ListenSequenceNumber upper_bound, - NSDictionary* live_targets); + int RemoveTargets( + model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets) override; // Key-related methods void AddMatchingKeys(const model::DocumentKeySet& keys, - model::TargetId target_id); + model::TargetId target_id) override; void RemoveMatchingKeys(const model::DocumentKeySet& keys, - model::TargetId target_id); - - void RemoveAllKeysForTarget(model::TargetId target_id); + model::TargetId target_id) override; - model::DocumentKeySet GetMatchingKeys(model::TargetId target_id); + model::DocumentKeySet GetMatchingKeys(model::TargetId target_id) override; - bool Contains(const model::DocumentKey& key); + bool Contains(const model::DocumentKey& key) override; // Other methods and accessors size_t CalculateByteSize(FSTLocalSerializer* serializer); - int32_t size() const { - return static_cast([queries_ count]); + size_t size() const override { + return [queries_ count]; } - model::ListenSequenceNumber highest_listen_sequence_number() const { + model::ListenSequenceNumber highest_listen_sequence_number() const override { return highest_listen_sequence_number_; } - model::TargetId highest_target_id() const { + model::TargetId highest_target_id() const override { return highest_target_id_; } - const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const; + const model::SnapshotVersion& GetLastRemoteSnapshotVersion() const override; - void SetLastRemoteSnapshotVersion(model::SnapshotVersion version); + void SetLastRemoteSnapshotVersion(model::SnapshotVersion version) override; private: FSTMemoryPersistence* persistence_; diff --git a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm index 862b6632598..ce8feabccbe 100644 --- a/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/memory_query_cache.mm @@ -107,10 +107,6 @@ } } -void MemoryQueryCache::RemoveAllKeysForTarget(TargetId target_id) { - references_.RemoveReferences(target_id); -} - DocumentKeySet MemoryQueryCache::GetMatchingKeys(TargetId target_id) { return references_.ReferencedKeys(target_id); } diff --git a/Firestore/core/src/firebase/firestore/local/query_cache.h b/Firestore/core/src/firebase/firestore/local/query_cache.h new file mode 100644 index 00000000000..9060713af1f --- /dev/null +++ b/Firestore/core/src/firebase/firestore/local/query_cache.h @@ -0,0 +1,154 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_QUERY_CACHE_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_QUERY_CACHE_H_ + +#if !defined(__OBJC__) +#error "For now, this file must only be included by ObjC source files." +#endif // !defined(__OBJC__) + +#import + +#include "Firestore/core/src/firebase/firestore/model/document_key.h" +#include "Firestore/core/src/firebase/firestore/model/document_key_set.h" +#include "Firestore/core/src/firebase/firestore/model/snapshot_version.h" +#include "Firestore/core/src/firebase/firestore/model/types.h" + +@class FSTQuery; +@class FSTQueryData; + +NS_ASSUME_NONNULL_BEGIN + +namespace firebase { +namespace firestore { +namespace local { + +/** + * Represents cached targets received from the remote backend. This contains + * both a mapping between targets and the documents that matched them according + * to the server, but also metadata about the targets. + * + * The cache is keyed by FSTQuery and entries in the cache are FSTQueryData + * instances. + */ +class QueryCache { + public: + typedef void (^TargetEnumerator)(FSTQueryData*, BOOL*); + + virtual ~QueryCache() { + } + + // Target-related methods + + /** + * Adds an entry in the cache. + * + * The cache key is extracted from `queryData.query`. The key must not already + * exist in the cache. + * + * @param query_data A new FSTQueryData instance to put in the cache. + */ + virtual void AddTarget(FSTQueryData* query_data) = 0; + + /** + * Updates an entry in the cache. + * + * The cache key is extracted from `queryData.query`. The entry must already + * exist in the cache, and it will be replaced. + * @param query_data An FSTQueryData instance to replace an existing entry in + * the cache + */ + virtual void UpdateTarget(FSTQueryData* query_data) = 0; + + /** Removes the cached entry for the given query data. The entry must already + * exist in the cache. */ + virtual void RemoveTarget(FSTQueryData* query_data) = 0; + + /** + * Looks up an FSTQueryData entry in the cache. + * + * @param query The query corresponding to the entry to look up. + * @return The cached FSTQueryData entry, or nil if the cache has no entry for + * the query. + */ + virtual FSTQueryData* _Nullable GetTarget(FSTQuery* query) = 0; + + virtual void EnumerateTargets(TargetEnumerator block) = 0; + + virtual int RemoveTargets( + model::ListenSequenceNumber upper_bound, + NSDictionary* live_targets) = 0; + + // Key-related methods + virtual void AddMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id) = 0; + + virtual void RemoveMatchingKeys(const model::DocumentKeySet& keys, + model::TargetId target_id) = 0; + + virtual model::DocumentKeySet GetMatchingKeys(model::TargetId target_id) = 0; + + virtual bool Contains(const model::DocumentKey& key) = 0; + + // Accessors + + /** Returns the number of targets cached. */ + virtual size_t size() const = 0; + + /** + * Returns the highest listen sequence number of any query seen by the cache. + */ + virtual model::ListenSequenceNumber highest_listen_sequence_number() + const = 0; + + /** + * Returns the highest target ID of any query in the cache. Typically called + * during startup to seed a target ID generator and avoid collisions with + * existing queries. If there are no queries in the cache, returns zero. + */ + virtual model::TargetId highest_target_id() const = 0; + + /** + * A global snapshot version representing the last consistent snapshot we + * received from the backend. This is monotonically increasing and any + * snapshots received from the backend prior to this version (e.g. for targets + * resumed with a resume_token) should be suppressed (buffered) until the + * backend has caught up to this snapshot version again. This prevents our + * cache from ever going backwards in time. + * + * This is updated whenever our we get a TargetChange with a read_time and + * empty target_ids. + */ + virtual const model::SnapshotVersion& GetLastRemoteSnapshotVersion() + const = 0; + + /** + * Set the snapshot version representing the last consistent snapshot received + * from the backend. (see `GetLastRemoteSnapshotVersion()` for more details). + * + * @param version The new snapshot version. + */ + virtual void SetLastRemoteSnapshotVersion(model::SnapshotVersion version) = 0; +}; + +} // namespace local +} // namespace firestore +} // namespace firebase + +NS_ASSUME_NONNULL_END + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_LOCAL_QUERY_CACHE_H_ From ff19c733e0e6281a3021bb2167ea65bd72741c0c Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 26 Dec 2018 10:23:47 -0800 Subject: [PATCH 30/34] Keep imports consistent (#2217) --- Firebase/Core/FIRApp.m | 4 ++-- Firebase/Core/FIRComponentType.m | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index f4ccac995d5..82f9832132f 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -14,6 +14,8 @@ #include +#import "FIRApp.h" +#import "FIRConfiguration.h" #import "Private/FIRAnalyticsConfiguration+Internal.h" #import "Private/FIRAppInternal.h" #import "Private/FIRBundleUtil.h" @@ -21,8 +23,6 @@ #import "Private/FIRLibrary.h" #import "Private/FIRLogger.h" #import "Private/FIROptionsInternal.h" -#import "Public/FIRApp.h" -#import "Public/FIRConfiguration.h" NSString *const kFIRServiceAdMob = @"AdMob"; NSString *const kFIRServiceAuth = @"Auth"; diff --git a/Firebase/Core/FIRComponentType.m b/Firebase/Core/FIRComponentType.m index e29ede22707..bdc004fbce5 100644 --- a/Firebase/Core/FIRComponentType.m +++ b/Firebase/Core/FIRComponentType.m @@ -16,7 +16,7 @@ #import "Private/FIRComponentType.h" -#import "FIRComponentContainerInternal.h" +#import "Private/FIRComponentContainerInternal.h" @implementation FIRComponentType From db62a2723940923596936d58730faca6aab2183b Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 26 Dec 2018 13:42:30 -0800 Subject: [PATCH 31/34] Fix private tests by removing unnecessary storyboard entries (#2218) --- Example/DynamicLinks/App/iOS/DL-Info.plist | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Example/DynamicLinks/App/iOS/DL-Info.plist b/Example/DynamicLinks/App/iOS/DL-Info.plist index 87945bc6090..1ca76b0c68a 100644 --- a/Example/DynamicLinks/App/iOS/DL-Info.plist +++ b/Example/DynamicLinks/App/iOS/DL-Info.plist @@ -29,10 +29,6 @@ NSAllowsArbitraryLoads - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7 From 6759b0c04b857ff8014f1e7dd4832991882acd51 Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 26 Dec 2018 14:23:36 -0800 Subject: [PATCH 32/34] Fix xcode 9 build of FDLBuilderTestAppObjC (#2219) --- Example/DynamicLinks/FDLBuilderTestAppObjC/AppDelegate.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Example/DynamicLinks/FDLBuilderTestAppObjC/AppDelegate.m b/Example/DynamicLinks/FDLBuilderTestAppObjC/AppDelegate.m index de64d6e99db..e2978aaae73 100644 --- a/Example/DynamicLinks/FDLBuilderTestAppObjC/AppDelegate.m +++ b/Example/DynamicLinks/FDLBuilderTestAppObjC/AppDelegate.m @@ -61,7 +61,11 @@ - (BOOL)application:(UIApplication *)application - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler: +#if __has_include() (void (^)(NSArray> *_Nullable))restorationHandler { +#else + (void (^)(NSArray *))restorationHandler { +#endif BOOL handled = [[FIRDynamicLinks dynamicLinks] handleUniversalLink:userActivity.webpageURL completion:^(FIRDynamicLink *_Nullable dynamicLink, NSError *_Nullable error) { From 074de008b4965cae60349058549dc8d5d1aac69f Mon Sep 17 00:00:00 2001 From: rsgowman Date: Wed, 2 Jan 2019 12:02:16 -0500 Subject: [PATCH 33/34] Rework FieldMask to use a (ordered) set of FieldPaths (#2136) Rather than a vector. Port of firebase/firebase-android-sdk#137 --- Firestore/Example/Tests/Util/FSTHelpers.mm | 8 ++++--- Firestore/Source/API/FSTUserDataConverter.mm | 5 ++-- Firestore/Source/Remote/FSTSerializerBeta.mm | 6 ++--- .../src/firebase/firestore/core/user_data.h | 3 ++- .../src/firebase/firestore/core/user_data.mm | 2 +- .../src/firebase/firestore/model/field_mask.h | 12 ++++++---- .../firestore/model/field_mask_test.cc | 23 ++++++++++-------- .../firebase/firestore/testutil/testutil.cc | 24 ++++++++++++------- 8 files changed, 49 insertions(+), 34 deletions(-) diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index b9e6ca08050..5eeb201bb79 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -252,10 +253,10 @@ NSComparator FSTTestDocComparator(const absl::string_view fieldPath) { BOOL merge = !updateMask.empty(); __block FSTObjectValue *objectValue = [FSTObjectValue objectValue]; - __block std::vector fieldMaskPaths; + __block std::set fieldMaskPaths; [values enumerateKeysAndObjectsUsingBlock:^(NSString *key, id value, BOOL *stop) { const FieldPath path = testutil::Field(util::MakeString(key)); - fieldMaskPaths.push_back(path); + fieldMaskPaths.insert(path); if (![value isEqual:kDeleteSentinel]) { FSTFieldValue *parsedValue = FSTTestFieldValue(value); objectValue = [objectValue objectBySettingValue:parsedValue forPath:path]; @@ -263,7 +264,8 @@ NSComparator FSTTestDocComparator(const absl::string_view fieldPath) { }]; DocumentKey key = testutil::Key(path); - FieldMask mask(merge ? updateMask : fieldMaskPaths); + FieldMask mask(merge ? std::set(updateMask.begin(), updateMask.end()) + : fieldMaskPaths); return [[FSTPatchMutation alloc] initWithKey:key fieldMask:mask value:objectValue diff --git a/Firestore/Source/API/FSTUserDataConverter.mm b/Firestore/Source/API/FSTUserDataConverter.mm index fd75a8f6279..84e717da3b9 100644 --- a/Firestore/Source/API/FSTUserDataConverter.mm +++ b/Firestore/Source/API/FSTUserDataConverter.mm @@ -17,6 +17,7 @@ #import "Firestore/Source/API/FSTUserDataConverter.h" #include +#include #include #include #include @@ -130,7 +131,7 @@ - (ParsedSetData)parsedMergeData:(id)input fieldMask:(nullable NSArray *)fie (FSTObjectValue *)[self parseData:input context:accumulator.RootContext()]; if (fieldMask) { - std::vector validatedFieldPaths; + std::set validatedFieldPaths; for (id fieldPath in fieldMask) { FieldPath path; @@ -150,7 +151,7 @@ - (ParsedSetData)parsedMergeData:(id)input fieldMask:(nullable NSArray *)fie path.CanonicalString().c_str()); } - validatedFieldPaths.push_back(path); + validatedFieldPaths.insert(path); } return std::move(accumulator).MergeData(updateData, FieldMask{std::move(validatedFieldPaths)}); diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 65192fd6812..2ca7c727929 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -17,6 +17,7 @@ #import "Firestore/Source/Remote/FSTSerializerBeta.h" #include +#include #include #include #include @@ -570,10 +571,9 @@ - (GCFSDocumentMask *)encodedFieldMask:(const FieldMask &)fieldMask { } - (FieldMask)decodedFieldMask:(GCFSDocumentMask *)fieldMask { - std::vector fields; - fields.reserve(fieldMask.fieldPathsArray_Count); + std::set fields; for (NSString *path in fieldMask.fieldPathsArray) { - fields.push_back(FieldPath::FromServerFormat(util::MakeString(path))); + fields.insert(FieldPath::FromServerFormat(util::MakeString(path))); } return FieldMask(std::move(fields)); } diff --git a/Firestore/core/src/firebase/firestore/core/user_data.h b/Firestore/core/src/firebase/firestore/core/user_data.h index 6d95f3ec661..cdb059af5c0 100644 --- a/Firestore/core/src/firebase/firestore/core/user_data.h +++ b/Firestore/core/src/firebase/firestore/core/user_data.h @@ -18,6 +18,7 @@ #define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_CORE_USER_DATA_H_ #include +#include #include #include #include @@ -166,7 +167,7 @@ class ParseAccumulator { // field_mask_ and field_transforms_ are shared across all active context // objects to accumulate the result. All ChildContext objects append their // results here. - std::vector field_mask_; + std::set field_mask_; std::vector field_transforms_; }; diff --git a/Firestore/core/src/firebase/firestore/core/user_data.mm b/Firestore/core/src/firebase/firestore/core/user_data.mm index 44314340383..525c0ee212d 100644 --- a/Firestore/core/src/firebase/firestore/core/user_data.mm +++ b/Firestore/core/src/firebase/firestore/core/user_data.mm @@ -58,7 +58,7 @@ } void ParseAccumulator::AddToFieldMask(FieldPath field_path) { - field_mask_.push_back(std::move(field_path)); + field_mask_.insert(std::move(field_path)); } void ParseAccumulator::AddToFieldTransforms( diff --git a/Firestore/core/src/firebase/firestore/model/field_mask.h b/Firestore/core/src/firebase/firestore/model/field_mask.h index 431e05ae55f..5d4398cb335 100644 --- a/Firestore/core/src/firebase/firestore/model/field_mask.h +++ b/Firestore/core/src/firebase/firestore/model/field_mask.h @@ -18,9 +18,9 @@ #define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_MODEL_FIELD_MASK_H_ #include +#include #include #include -#include #include "Firestore/core/src/firebase/firestore/model/field_path.h" #include "Firestore/core/src/firebase/firestore/util/hashing.h" @@ -41,12 +41,14 @@ namespace model { */ class FieldMask { public: - using const_iterator = std::vector::const_iterator; + using const_iterator = std::set::const_iterator; FieldMask(std::initializer_list list) : fields_{list} { } - explicit FieldMask(std::vector fields) - : fields_{std::move(fields)} { + template + FieldMask(InputIt first, InputIt last) : fields_{first, last} { + } + explicit FieldMask(std::set fields) : fields_{std::move(fields)} { } const_iterator begin() const { @@ -94,7 +96,7 @@ class FieldMask { friend bool operator==(const FieldMask& lhs, const FieldMask& rhs); private: - std::vector fields_; + std::set fields_; }; inline bool operator==(const FieldMask& lhs, const FieldMask& rhs) { diff --git a/Firestore/core/test/firebase/firestore/model/field_mask_test.cc b/Firestore/core/test/firebase/firestore/model/field_mask_test.cc index 52d5951510d..c4ab1e4d415 100644 --- a/Firestore/core/test/firebase/firestore/model/field_mask_test.cc +++ b/Firestore/core/test/firebase/firestore/model/field_mask_test.cc @@ -16,7 +16,7 @@ #include "Firestore/core/src/firebase/firestore/model/field_mask.h" -#include +#include #include "Firestore/core/src/firebase/firestore/model/field_path.h" #include "gtest/gtest.h" @@ -28,27 +28,30 @@ namespace model { TEST(FieldMask, ConstructorAndEqual) { FieldMask mask_a{FieldPath::FromServerFormat("foo"), FieldPath::FromServerFormat("bar")}; - std::vector field_path_vector{FieldPath::FromServerFormat("foo"), - FieldPath::FromServerFormat("bar")}; - FieldMask mask_b{field_path_vector}; - FieldMask mask_c{std::vector{FieldPath::FromServerFormat("foo"), - FieldPath::FromServerFormat("bar")}}; + std::set field_path_set{FieldPath::FromServerFormat("foo"), + FieldPath::FromServerFormat("bar")}; + FieldMask mask_b{field_path_set}; + FieldMask mask_c{std::set{FieldPath::FromServerFormat("foo"), + FieldPath::FromServerFormat("bar")}}; + FieldMask mask_d{field_path_set.begin(), field_path_set.end()}; + EXPECT_EQ(mask_a, mask_b); EXPECT_EQ(mask_b, mask_c); + EXPECT_EQ(mask_c, mask_d); } TEST(FieldMask, Getter) { FieldMask mask{FieldPath::FromServerFormat("foo"), FieldPath::FromServerFormat("bar")}; - EXPECT_EQ(std::vector({FieldPath::FromServerFormat("foo"), - FieldPath::FromServerFormat("bar")}), - std::vector(mask.begin(), mask.end())); + EXPECT_EQ(std::set({FieldPath::FromServerFormat("foo"), + FieldPath::FromServerFormat("bar")}), + std::set(mask.begin(), mask.end())); } TEST(FieldMask, ToString) { FieldMask mask{FieldPath::FromServerFormat("foo"), FieldPath::FromServerFormat("bar")}; - EXPECT_EQ("{ foo bar }", mask.ToString()); + EXPECT_EQ("{ bar foo }", mask.ToString()); } } // namespace model diff --git a/Firestore/core/test/firebase/firestore/testutil/testutil.cc b/Firestore/core/test/firebase/firestore/testutil/testutil.cc index aefe5eb240e..2910df0892a 100644 --- a/Firestore/core/test/firebase/firestore/testutil/testutil.cc +++ b/Firestore/core/test/firebase/firestore/testutil/testutil.cc @@ -16,6 +16,8 @@ #include "Firestore/core/test/firebase/firestore/testutil/testutil.h" +#include + namespace firebase { namespace firestore { namespace testutil { @@ -23,13 +25,14 @@ namespace testutil { std::unique_ptr PatchMutation( absl::string_view path, const model::ObjectValue::Map& values, + // TODO(rsgowman): Investigate changing update_mask to a set. const std::vector* update_mask) { model::FieldValue object_value = model::FieldValue::FromMap({}); - std::vector object_mask; + std::set object_mask; for (const auto& kv : values) { model::FieldPath field_path = Field(kv.first); - object_mask.push_back(field_path); + object_mask.insert(field_path); if (kv.second.string_value() != kDeleteSentinel) { object_value = object_value.Set(field_path, kv.second); } @@ -37,13 +40,16 @@ std::unique_ptr PatchMutation( bool merge = update_mask != nullptr; - // We sort the field_mask_paths to make the order deterministic in tests. - std::sort(object_mask.begin(), object_mask.end()); - - return absl::make_unique( - Key(path), std::move(object_value), - model::FieldMask(merge ? *update_mask : object_mask), - merge ? model::Precondition::None() : model::Precondition::Exists(true)); + if (merge) { + return absl::make_unique( + Key(path), std::move(object_value), + model::FieldMask(update_mask->begin(), update_mask->end()), + model::Precondition::None()); + } else { + return absl::make_unique( + Key(path), std::move(object_value), model::FieldMask(object_mask), + model::Precondition::Exists(true)); + } } } // namespace testutil From 7c53489e03a2f2a4c4b3d1baad6796fb35719d3c Mon Sep 17 00:00:00 2001 From: Paul Beusterien Date: Wed, 2 Jan 2019 09:27:31 -0800 Subject: [PATCH 34/34] Travis to Xcode 10.1 and clang-format to 8.0.0 (tags/google/stable/2018-08-24) (#2222) * Travis to Xcode 10.1 * Update to clang-format 8 * Update clang-format homebrew link * Work around space in filename style.sh issue --- .travis.yml | 2 +- .../Tests/FIRAnalyticsConfigurationTest.m | 8 +- Example/Core/Tests/FIRAppTest.m | 148 ++++++++-------- Example/Core/Tests/FIROptionsTest.m | 64 +++---- .../FDLBuilderTestAppObjCEarlGreyTests.m | 5 +- .../Tests/FDLURLComponentsTests.m | 5 +- Example/DynamicLinks/Tests/UtilitiesTests.m | 22 ++- Example/Shared/FIRSampleAppUtilities.m | 22 +-- .../Integration/FIRStorageIntegrationTests.m | 4 +- .../Tests/Unit/FIRStorageComponentTests.m | 8 +- .../Tests/Unit/FIRStorageTestHelpers.m | 4 +- Example/Storage/Tests/Unit/FIRStorageTests.m | 4 +- .../Unit/FIRStorageTokenAuthorizerTests.m | 10 +- Firebase/Core/FIRApp.m | 35 ++-- Firebase/Core/FIROptions.m | 9 +- .../FDLURLComponents/FDLURLComponents.m | 5 +- .../FIRDLDefaultRetrievalProcessV2.m | 9 +- Firebase/DynamicLinks/FIRDynamicLink.m | 11 +- .../DynamicLinks/FIRDynamicLinkNetworking.m | 5 +- .../DynamicLinks/FIRDynamicLinks+FirstParty.h | 5 +- Firebase/DynamicLinks/FIRDynamicLinks.m | 51 +++--- .../DynamicLinks/Utilities/FDLUtilities.m | 8 +- .../Banner/FIDBannerViewController.m | 4 +- .../FIRIAMDefaultDisplayImpl.m | 4 +- .../ImageOnly/FIDImageOnlyViewController.m | 4 +- .../Modal/FIDModalViewController.m | 20 +-- Firebase/Storage/FIRStorage.m | 5 +- Firebase/Storage/FIRStorageComponent.m | 4 +- Firebase/Storage/FIRStorageDownloadTask.m | 4 +- Firebase/Storage/FIRStorageErrors.m | 9 +- .../Storage/FIRStorageGetDownloadURLTask.m | 4 +- Firebase/Storage/FIRStoragePath.m | 7 +- Firebase/Storage/FIRStorageReference.m | 16 +- Firebase/Storage/FIRStorageUploadTask.m | 4 +- .../FuzzingTargets/FSTFuzzTestFieldPath.mm | 5 +- .../Example/Tests/API/FIRFirestoreTests.mm | 5 +- .../Tests/API/FIRQuerySnapshotTests.mm | 16 +- Firestore/Example/Tests/API/FIRQueryTests.mm | 15 +- .../Tests/API/FIRSnapshotMetadataTests.mm | 16 +- .../Tests/Core/FSTQueryListenerTests.mm | 42 +++-- Firestore/Example/Tests/Core/FSTQueryTests.mm | 71 +++----- Firestore/Example/Tests/Core/FSTViewTests.mm | 164 +++++++++--------- .../Integration/API/FIRArrayTransformTests.mm | 48 ++--- .../Tests/Integration/API/FIRCursorTests.mm | 50 ++---- .../Tests/Integration/API/FIRDatabaseTests.mm | 67 +++---- .../Tests/Integration/API/FIRFieldsTests.mm | 3 +- .../Tests/Integration/API/FIRQueryTests.mm | 65 +++---- .../API/FIRServerTimestampTests.mm | 48 ++--- .../Integration/API/FIRValidationTests.mm | 149 ++++++---------- .../Integration/API/FIRWriteBatchTests.mm | 24 +-- .../Tests/Integration/FSTSmokeTests.mm | 4 +- .../Tests/Integration/FSTTransactionTests.mm | 5 +- .../Local/FSTLRUGarbageCollectorTests.mm | 4 +- .../Tests/Local/FSTLevelDBTransactionTests.mm | 17 +- .../Tests/Local/FSTLocalSerializerTests.mm | 11 +- .../Example/Tests/Local/FSTLocalStoreTests.mm | 8 +- .../Tests/Local/FSTMutationQueueTests.mm | 57 ++---- .../Tests/Local/FSTPersistenceTestHelpers.mm | 6 +- .../Example/Tests/Local/FSTQueryCacheTests.mm | 12 +- .../Example/Tests/Model/FSTDocumentTests.mm | 52 +++--- .../Example/Tests/Model/FSTFieldValueTests.mm | 71 +++----- .../Example/Tests/Model/FSTMutationTests.mm | 60 ++++--- .../Tests/Remote/FSTSerializerBetaTests.mm | 27 +-- .../Tests/Remote/FSTWatchChangeTests.mm | 4 +- .../Example/Tests/SpecTests/FSTSpecTests.mm | 25 ++- .../SpecTests/FSTSyncEngineTestDriver.mm | 15 +- Firestore/Example/Tests/Util/FSTHelpers.mm | 4 +- .../Tests/Util/FSTIntegrationTestCase.mm | 9 +- .../Source/API/FIRCollectionReference.mm | 7 +- Firestore/Source/API/FIRDocumentReference.mm | 25 ++- Firestore/Source/API/FIRDocumentSnapshot.mm | 13 +- Firestore/Source/API/FIRFirestore.mm | 16 +- Firestore/Source/API/FIRGeoPoint.mm | 14 +- Firestore/Source/API/FIRQuery.mm | 84 +++++---- Firestore/Source/API/FSTFirestoreComponent.mm | 4 +- Firestore/Source/API/FSTUserDataConverter.mm | 15 +- Firestore/Source/Core/FSTQuery.mm | 6 +- Firestore/Source/Core/FSTSyncEngine.mm | 8 +- Firestore/Source/Core/FSTViewSnapshot.mm | 22 +-- .../Source/Local/FSTLRUGarbageCollector.mm | 4 +- Firestore/Source/Local/FSTLevelDB.mm | 4 +- .../Source/Local/FSTLevelDBMutationQueue.mm | 20 +-- Firestore/Source/Local/FSTLocalSerializer.mm | 4 +- Firestore/Source/Local/FSTLocalStore.mm | 13 +- Firestore/Source/Model/FSTDocument.mm | 4 +- Firestore/Source/Public/FIRFirestore.h | 6 +- Firestore/Source/Remote/FSTDatastore.mm | 5 +- Firestore/Source/Remote/FSTSerializerBeta.mm | 5 +- .../firestore/local/leveldb_query_cache.mm | 13 +- .../local/leveldb_remote_document_cache.mm | 4 +- .../firestore/remote/remote_objc_bridge.mm | 12 +- .../firebase_credentials_provider_test.mm | 12 +- .../firestore/remote/datastore_test.mm | 13 +- .../IntegrationTests/FIRIntegrationTests.m | 69 ++++---- Functions/Example/Tests/FIRFunctionsTests.m | 5 +- Functions/FirebaseFunctions/FIRFunctions.m | 4 +- .../GULAppDelegateSwizzler.m | 12 +- .../GoogleUtilities.xcodeproj/project.pbxproj | 32 ++-- .../Example/Tests/Network/GULNetworkTest.m | 40 ++--- .../Reachability/GULReachabilityCheckerTest.m | 4 +- .../Swizzler/GULAppDelegateSwizzlerTest.m | 14 +- .../Swizzler/GULRuntimeStateHelperTests.m | 5 +- .../Example/Tests/Swizzler/GULSwizzlerTest.m | 35 ++-- .../GULUserDefaultsTests.m | 51 +++--- GoogleUtilities/Logger/GULLogger.m | 10 +- GoogleUtilities/MethodSwizzler/GULSwizzler.m | 8 +- GoogleUtilities/Network/GULNetwork.m | 17 +- .../Network/GULNetworkURLSession.m | 10 +- .../SwizzlerTestHelpers/GULProxy.m | 4 +- README.md | 2 +- scripts/style.sh | 10 +- 111 files changed, 1070 insertions(+), 1303 deletions(-) rename GoogleUtilities/Example/Tests/{User Defaults => UserDefaults}/GULUserDefaultsTests.m (95%) diff --git a/.travis.yml b/.travis.yml index 8450fd94e24..13fd1f2c86f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: osx -osx_image: xcode10 +osx_image: xcode10.1 language: objective-c cache: - bundler diff --git a/Example/Core/Tests/FIRAnalyticsConfigurationTest.m b/Example/Core/Tests/FIRAnalyticsConfigurationTest.m index 8cf9da4677b..43babb0f544 100644 --- a/Example/Core/Tests/FIRAnalyticsConfigurationTest.m +++ b/Example/Core/Tests/FIRAnalyticsConfigurationTest.m @@ -99,9 +99,7 @@ - (void)testSettingAnalyticsCollectionEnabled { [self.observerMock setExpectationOrderMatters:YES]; [[self.observerMock expect] notificationWithName:notificationName object:config - userInfo:@{ - notificationName : @YES - }]; + userInfo:@{notificationName : @YES}]; // Test setting to enabled. [config setAnalyticsCollectionEnabled:YES]; @@ -109,9 +107,7 @@ - (void)testSettingAnalyticsCollectionEnabled { // Expect the second notification. [[self.observerMock expect] notificationWithName:notificationName object:config - userInfo:@{ - notificationName : @NO - }]; + userInfo:@{notificationName : @NO}]; // Test setting to disabled. [config setAnalyticsCollectionEnabled:NO]; diff --git a/Example/Core/Tests/FIRAppTest.m b/Example/Core/Tests/FIRAppTest.m index 7f3ccb97241..c144d6f438b 100644 --- a/Example/Core/Tests/FIRAppTest.m +++ b/Example/Core/Tests/FIRAppTest.m @@ -78,8 +78,8 @@ - (void)tearDown { } - (void)testConfigure { - NSDictionary *expectedUserInfo = - [self expectedUserInfoWithAppName:kFIRDefaultAppName isDefaultApp:YES]; + NSDictionary *expectedUserInfo = [self expectedUserInfoWithAppName:kFIRDefaultAppName + isDefaultApp:YES]; [self expectNotificationForObserver:self.observerMock notificationName:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class] @@ -108,16 +108,16 @@ - (void)testConfigureWithOptions { #pragma clang diagnostic pop XCTAssertTrue([FIRApp allApps].count == 0); - NSDictionary *expectedUserInfo = - [self expectedUserInfoWithAppName:kFIRDefaultAppName isDefaultApp:YES]; + NSDictionary *expectedUserInfo = [self expectedUserInfoWithAppName:kFIRDefaultAppName + isDefaultApp:YES]; [self expectNotificationForObserver:self.observerMock notificationName:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class] userInfo:expectedUserInfo]; // Use a valid instance of options. - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options.clientID = kClientID; XCTAssertNoThrow([FIRApp configureWithOptions:options]); OCMVerifyAll(self.observerMock); @@ -133,8 +133,8 @@ - (void)testConfigureWithOptions { } - (void)testConfigureWithNameAndOptions { - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options.clientID = kClientID; #pragma clang diagnostic push @@ -145,8 +145,8 @@ - (void)testConfigureWithNameAndOptions { XCTAssertThrows([FIRApp configureWithName:@"" options:options]); XCTAssertTrue([FIRApp allApps].count == 0); - NSDictionary *expectedUserInfo = - [self expectedUserInfoWithAppName:kFIRTestAppName1 isDefaultApp:NO]; + NSDictionary *expectedUserInfo = [self expectedUserInfoWithAppName:kFIRTestAppName1 + isDefaultApp:NO]; [self expectNotificationForObserver:self.observerMock notificationName:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class] @@ -165,8 +165,8 @@ - (void)testConfigureWithNameAndOptions { } - (void)testConfigureWithMultipleApps { - FIROptions *options1 = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options1 = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options1.deepLinkURLScheme = kDeepLinkURLScheme; // Set up notification center observer for verifying notifications. @@ -174,8 +174,8 @@ - (void)testConfigureWithMultipleApps { name:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class]]; - NSDictionary *expectedUserInfo1 = - [self expectedUserInfoWithAppName:kFIRTestAppName1 isDefaultApp:NO]; + NSDictionary *expectedUserInfo1 = [self expectedUserInfoWithAppName:kFIRTestAppName1 + isDefaultApp:NO]; [[self.observerMock expect] notificationWithName:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class] userInfo:expectedUserInfo1]; @@ -183,13 +183,13 @@ - (void)testConfigureWithMultipleApps { XCTAssertTrue([FIRApp allApps].count == 1); // Configure a different app with valid customized options. - FIROptions *options2 = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options2 = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options2.bundleID = kBundleID; options2.APIKey = kCustomizedAPIKey; - NSDictionary *expectedUserInfo2 = - [self expectedUserInfoWithAppName:kFIRTestAppName2 isDefaultApp:NO]; + NSDictionary *expectedUserInfo2 = [self expectedUserInfoWithAppName:kFIRTestAppName2 + isDefaultApp:NO]; [[self.observerMock expect] notificationWithName:kFIRAppReadyToConfigureSDKNotification object:[FIRApp class] userInfo:expectedUserInfo2]; @@ -235,8 +235,8 @@ - (void)testAppNamed { - (void)testDeleteApp { NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; [FIRApp configureWithName:name options:options]; FIRApp *app = [FIRApp appNamed:name]; XCTAssertNotNil(app); @@ -269,8 +269,8 @@ - (void)testErrorForSubspecConfigurationFailure { } - (void)testOptionsLocking { - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options.projectID = kProjectID; options.databaseURL = kDatabaseURL; @@ -418,14 +418,14 @@ - (void)testAppIDFormatInvalid { XCTAssertFalse([FIRApp validateAppIDFormat:@"01:1337:ios:deadbeef" withVersion:kGoodVersionV1]); XCTAssertFalse([FIRApp validateAppIDFormat:@"10:1337:ios:deadbeef" withVersion:kGoodVersionV1]); XCTAssertFalse([FIRApp validateAppIDFormat:@"11:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFormat:@"21:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFormat:@"22:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFormat:@"02:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFormat:@"20:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFormat:@"21:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFormat:@"22:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFormat:@"02:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFormat:@"20:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); // Extra fields. XCTAssertFalse([FIRApp validateAppIDFormat:@"ab:1:1337:ios:deadbeef" withVersion:kGoodVersionV1]); @@ -466,31 +466,31 @@ - (void)testAppIDFingerprintInvalid { XCTAssertFalse([FIRApp validateAppIDFingerprint:kGoodAppIDV1 withVersion:kGoodAppIDV1]); // Versions digits that may make a partial match. - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"01:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"10:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"11:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"21:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"22:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"02:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"20:1337:ios:5e18052ab54fbfec" withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"01:1337:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"10:1337:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"11:1337:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"21:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"22:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"02:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"20:1337:ios:5e18052ab54fbfec" + withVersion:kGoodVersionV2]); // Extra fields. - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"ab:1:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"1:ab:1337:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"1:1337:ab:ios:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"1:1337:ios:ab:deadbeef" withVersion:kGoodVersionV1]); - XCTAssertFalse( - [FIRApp validateAppIDFingerprint:@"1:1337:ios:deadbeef:ab" withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"ab:1:1337:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"1:ab:1337:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"1:1337:ab:ios:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"1:1337:ios:ab:deadbeef" + withVersion:kGoodVersionV1]); + XCTAssertFalse([FIRApp validateAppIDFingerprint:@"1:1337:ios:deadbeef:ab" + withVersion:kGoodVersionV1]); } #pragma mark - Automatic Data Collection Tests @@ -498,8 +498,8 @@ - (void)testAppIDFingerprintInvalid { - (void)testGlobalDataCollectionNoFlags { // Test: No flags set. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(nil); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -511,8 +511,8 @@ - (void)testGlobalDataCollectionNoFlags { - (void)testGlobalDataCollectionPlistSetEnabled { // Test: Plist set to enabled, no override. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(@YES); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -524,8 +524,8 @@ - (void)testGlobalDataCollectionPlistSetEnabled { - (void)testGlobalDataCollectionPlistSetDisabled { // Test: Plist set to disabled, no override. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(@NO); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -537,8 +537,8 @@ - (void)testGlobalDataCollectionPlistSetDisabled { - (void)testGlobalDataCollectionUserSpecifiedEnabled { // Test: User specified as enabled, no plist value. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(nil); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -550,8 +550,8 @@ - (void)testGlobalDataCollectionUserSpecifiedEnabled { - (void)testGlobalDataCollectionUserSpecifiedDisabled { // Test: User specified as disabled, no plist value. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(nil); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -563,8 +563,8 @@ - (void)testGlobalDataCollectionUserSpecifiedDisabled { - (void)testGlobalDataCollectionUserOverriddenEnabled { // Test: User specified as enabled, with plist set as disabled. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(@NO); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -576,8 +576,8 @@ - (void)testGlobalDataCollectionUserOverriddenEnabled { - (void)testGlobalDataCollectionUserOverriddenDisabled { // Test: User specified as disabled, with plist set as enabled. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:name options:options]; OCMStub([self.appClassMock readDataCollectionSwitchFromPlist]).andReturn(@YES); OCMStub([self.appClassMock readDataCollectionSwitchFromUserDefaultsForApp:OCMOCK_ANY]) @@ -589,8 +589,8 @@ - (void)testGlobalDataCollectionUserOverriddenDisabled { - (void)testGlobalDataCollectionWriteToDefaults { id defaultsMock = OCMPartialMock([NSUserDefaults standardUserDefaults]); NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; [FIRApp configureWithName:name options:options]; FIRApp *app = [FIRApp appNamed:name]; app.dataCollectionDefaultEnabled = YES; @@ -607,8 +607,8 @@ - (void)testGlobalDataCollectionWriteToDefaults { - (void)testGlobalDataCollectionClearedAfterDelete { // Configure and disable data collection for the default FIRApp. NSString *name = NSStringFromSelector(_cmd); - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; [FIRApp configureWithName:name options:options]; FIRApp *app = [FIRApp appNamed:name]; app.dataCollectionDefaultEnabled = NO; @@ -631,8 +631,8 @@ - (void)testGlobalDataCollectionClearedAfterDelete { } - (void)testGlobalDataCollectionNoDiagnosticsSent { - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; FIRApp *app = [[FIRApp alloc] initInstanceWithName:NSStringFromSelector(_cmd) options:options]; app.dataCollectionDefaultEnabled = NO; diff --git a/Example/Core/Tests/FIROptionsTest.m b/Example/Core/Tests/FIROptionsTest.m index 382ac49231f..3c078d93a43 100644 --- a/Example/Core/Tests/FIROptionsTest.m +++ b/Example/Core/Tests/FIROptionsTest.m @@ -82,8 +82,8 @@ - (void)testDefaultOptions { } - (void)testInitCustomizedOptions { - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options.APIKey = kAPIKey; options.bundleID = kBundleID; options.clientID = kClientID; @@ -98,8 +98,8 @@ - (void)testInitCustomizedOptions { } - (void)testInitWithContentsOfFile { - NSString *filePath = - [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"]; + NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" + ofType:@"plist"]; FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; [self assertOptionsMatchDefaults:options andProjectID:YES]; XCTAssertNil(options.deepLinkURLScheme); @@ -136,8 +136,8 @@ - (void)assertOptionsMatchDefaults:(FIROptions *)options andProjectID:(BOOL)matc - (void)testCopyingProperties { NSMutableString *mutableString; - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; mutableString = [[NSMutableString alloc] initWithString:@"1"]; options.APIKey = mutableString; [mutableString appendString:@"2"]; @@ -208,8 +208,8 @@ - (void)testCopyWithZone { XCTAssertEqualObjects(newOptions.deepLinkURLScheme, kDeepLinkURLScheme); // customized options - FIROptions *customizedOptions = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *customizedOptions = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; customizedOptions.deepLinkURLScheme = kDeepLinkURLScheme; FIROptions *copyCustomizedOptions = [customizedOptions copy]; [copyCustomizedOptions setDeepLinkURLScheme:kNewDeepLinkURLScheme]; @@ -466,20 +466,16 @@ - (void)testAnalyticsCollectionGlobalSwitchOverrideToDisable { OCMStub([appMock isDataCollectionDefaultEnabled]).andReturn(YES); // Test the three Analytics flags that override to disable Analytics collection. - FIROptions *collectionEnabledOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:@{ - kFIRIsAnalyticsCollectionEnabled : @NO - }]; + FIROptions *collectionEnabledOptions = [[FIROptions alloc] + initInternalWithOptionsDictionary:@{kFIRIsAnalyticsCollectionEnabled : @NO}]; XCTAssertFalse(collectionEnabledOptions.isAnalyticsCollectionEnabled); - FIROptions *collectionDeactivatedOptions = - [[FIROptions alloc] initInternalWithOptionsDictionary:@{ - kFIRIsAnalyticsCollectionDeactivated : @YES - }]; + FIROptions *collectionDeactivatedOptions = [[FIROptions alloc] + initInternalWithOptionsDictionary:@{kFIRIsAnalyticsCollectionDeactivated : @YES}]; XCTAssertFalse(collectionDeactivatedOptions.isAnalyticsCollectionEnabled); - FIROptions *measurementEnabledOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:@{ - kFIRIsMeasurementEnabled : @NO - }]; + FIROptions *measurementEnabledOptions = + [[FIROptions alloc] initInternalWithOptionsDictionary:@{kFIRIsMeasurementEnabled : @NO}]; XCTAssertFalse(measurementEnabledOptions.isAnalyticsCollectionEnabled); } @@ -491,14 +487,12 @@ - (void)testAnalyticsCollectionGlobalSwitchOverrideToEnable { OCMStub([appMock isDataCollectionDefaultEnabled]).andReturn(NO); // Test the two Analytics flags that can override and enable collection. - FIROptions *collectionEnabledOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:@{ - kFIRIsAnalyticsCollectionEnabled : @YES - }]; + FIROptions *collectionEnabledOptions = [[FIROptions alloc] + initInternalWithOptionsDictionary:@{kFIRIsAnalyticsCollectionEnabled : @YES}]; XCTAssertTrue(collectionEnabledOptions.isAnalyticsCollectionEnabled); - FIROptions *measurementEnabledOptions = [[FIROptions alloc] initInternalWithOptionsDictionary:@{ - kFIRIsMeasurementEnabled : @YES - }]; + FIROptions *measurementEnabledOptions = + [[FIROptions alloc] initInternalWithOptionsDictionary:@{kFIRIsMeasurementEnabled : @YES}]; XCTAssertTrue(measurementEnabledOptions.isAnalyticsCollectionEnabled); } @@ -534,31 +528,27 @@ - (void)testAnalyticsCollectionExplicitlySet { // Test the old measurement flag. options = [[FIROptions alloc] initInternalWithOptionsDictionary:@{}]; - analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:@{ - kFIRIsMeasurementEnabled : @YES - }]; + analyticsOptions = + [options analyticsOptionsDictionaryWithInfoDictionary:@{kFIRIsMeasurementEnabled : @YES}]; XCTAssertTrue([options isAnalyticsCollectionExpicitlySet]); options = [[FIROptions alloc] initInternalWithOptionsDictionary:@{}]; - analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:@{ - kFIRIsMeasurementEnabled : @NO - }]; + analyticsOptions = + [options analyticsOptionsDictionaryWithInfoDictionary:@{kFIRIsMeasurementEnabled : @NO}]; XCTAssertTrue([options isAnalyticsCollectionExpicitlySet]); // For good measure, a combination of all 3 (even if they conflict). optionsDictionary = - @{kFIRIsAnalyticsCollectionDeactivated : @YES, - kFIRIsAnalyticsCollectionEnabled : @YES}; + @{kFIRIsAnalyticsCollectionDeactivated : @YES, kFIRIsAnalyticsCollectionEnabled : @YES}; options = [[FIROptions alloc] initInternalWithOptionsDictionary:optionsDictionary]; - analyticsOptions = [options analyticsOptionsDictionaryWithInfoDictionary:@{ - kFIRIsMeasurementEnabled : @NO - }]; + analyticsOptions = + [options analyticsOptionsDictionaryWithInfoDictionary:@{kFIRIsMeasurementEnabled : @NO}]; XCTAssertTrue([options isAnalyticsCollectionExpicitlySet]); } - (void)testModifyingOptionsThrows { - FIROptions *options = - [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID GCMSenderID:kGCMSenderID]; + FIROptions *options = [[FIROptions alloc] initWithGoogleAppID:kGoogleAppID + GCMSenderID:kGCMSenderID]; options.editingLocked = YES; // Modification to every property should result in an exception. diff --git a/Example/DynamicLinks/FDLBuilderTestAppObjCTests/FDLBuilderTestAppObjCEarlGreyTests.m b/Example/DynamicLinks/FDLBuilderTestAppObjCTests/FDLBuilderTestAppObjCEarlGreyTests.m index 04ed308f8a1..f117b3682f0 100644 --- a/Example/DynamicLinks/FDLBuilderTestAppObjCTests/FDLBuilderTestAppObjCEarlGreyTests.m +++ b/Example/DynamicLinks/FDLBuilderTestAppObjCTests/FDLBuilderTestAppObjCEarlGreyTests.m @@ -33,8 +33,9 @@ @implementation FDLBuilderTestAppObjCEarlGreyTests - (void)testOpenFDLFromAppGeneratedLink { // On first launch, a null FDL Received alert is displayed (by design); in // this case, we need to dismiss it in order to proceed - BOOL hasFirstInstallAlertDisplayed = - [self confirmPresenceOfFDLAlertWithURL:@"(null)" matchType:@"0" minimumAppVersion:@"(null)"]; + BOOL hasFirstInstallAlertDisplayed = [self confirmPresenceOfFDLAlertWithURL:@"(null)" + matchType:@"0" + minimumAppVersion:@"(null)"]; if (hasFirstInstallAlertDisplayed) { [[EarlGrey selectElementWithMatcher:[GREYMatchers matcherForText:@"Dismiss"]] performAction:grey_tap()]; diff --git a/Example/DynamicLinks/Tests/FDLURLComponentsTests.m b/Example/DynamicLinks/Tests/FDLURLComponentsTests.m index 80e29827a96..dee0874c6f5 100644 --- a/Example/DynamicLinks/Tests/FDLURLComponentsTests.m +++ b/Example/DynamicLinks/Tests/FDLURLComponentsTests.m @@ -104,8 +104,9 @@ - (void)testAnalyticsParamsDictionaryRepresentationReturnsCorrectDictionaryEmpty } - (void)testAnalyticsParamsFactoryWithParamsReturnsInstanceOfCorrectClass { - id returnValue = - [FIRDynamicLinkGoogleAnalyticsParameters parametersWithSource:@"s" medium:@"m" campaign:@"c"]; + id returnValue = [FIRDynamicLinkGoogleAnalyticsParameters parametersWithSource:@"s" + medium:@"m" + campaign:@"c"]; XCTAssertTrue([returnValue isKindOfClass:[FIRDynamicLinkGoogleAnalyticsParameters class]]); } diff --git a/Example/DynamicLinks/Tests/UtilitiesTests.m b/Example/DynamicLinks/Tests/UtilitiesTests.m index 80a9d59057d..fab36239f8a 100644 --- a/Example/DynamicLinks/Tests/UtilitiesTests.m +++ b/Example/DynamicLinks/Tests/UtilitiesTests.m @@ -29,10 +29,9 @@ - (void)testFDLCookieRetrievalURLCreatesCorrectURL { static NSString *const kCustomScheme = @"customscheme"; static NSString *const kBundleID = @"com.My.Bundle.ID"; - NSString *expectedURLString = [NSString stringWithFormat: - @"https://goo.gl/app/_/deeplink?fdl_ios_" - "bundle_id=%@&fdl_ios_url_scheme=%@", - kBundleID, kCustomScheme]; + NSString *expectedURLString = [NSString stringWithFormat:@"https://goo.gl/app/_/deeplink?fdl_ios_" + "bundle_id=%@&fdl_ios_url_scheme=%@", + kBundleID, kCustomScheme]; NSURL *url = FIRDLCookieRetrievalURL(kCustomScheme, kBundleID); @@ -149,20 +148,19 @@ - (void)testDeepLinkURLWithInviteIDDeepLinkStringWeakMatchEndpointCreatesExpecte NSString *matchType = @"unique"; NSString *expectedURLString = - [NSString stringWithFormat: - @"%@://google/link/?utm_campaign=%@" - @"&deep_link_id=%@&utm_medium=%@&invitation_weakMatchEndpoint=%@" - @"&utm_source=%@&invitation_id=%@&match_type=%@", - kURLScheme, utmCampaign, encodedDeepLinkString, utmMedium, weakMatchEndpoint, - utmSource, inviteID, matchType]; + [NSString stringWithFormat:@"%@://google/link/?utm_campaign=%@" + @"&deep_link_id=%@&utm_medium=%@&invitation_weakMatchEndpoint=%@" + @"&utm_source=%@&invitation_id=%@&match_type=%@", + kURLScheme, utmCampaign, encodedDeepLinkString, utmMedium, + weakMatchEndpoint, utmSource, inviteID, matchType]; NSURLComponents *expectedURLComponents = [NSURLComponents componentsWithString:expectedURLString]; NSURL *actualURL = FIRDLDeepLinkURLWithInviteID(inviteID, deepLinkString, utmSource, utmMedium, utmCampaign, NO, weakMatchEndpoint, nil, kURLScheme, nil); - NSURLComponents *actualURLComponents = - [NSURLComponents componentsWithURL:actualURL resolvingAgainstBaseURL:NO]; + NSURLComponents *actualURLComponents = [NSURLComponents componentsWithURL:actualURL + resolvingAgainstBaseURL:NO]; // Since the parameters are not guaranteed to be in any specific order, we must compare // arrays of properties of the URLs rather than the URLs themselves. diff --git a/Example/Shared/FIRSampleAppUtilities.m b/Example/Shared/FIRSampleAppUtilities.m index d161cb99346..80ef2e1fc47 100644 --- a/Example/Shared/FIRSampleAppUtilities.m +++ b/Example/Shared/FIRSampleAppUtilities.m @@ -26,13 +26,12 @@ NSString *const kGithubRepoURLString = @"https://github.com/firebase/firebase-ios-sdk/"; // Alert contents NSString *const kInvalidPlistAlertTitle = @"GoogleService-Info.plist"; -NSString *const kInvalidPlistAlertMessage = - @"This sample app needs to be updated with a valid " - @"GoogleService-Info.plist file in order to configure " - @"Firebase.\n\n" - @"Please update the app with a valid plist file, " - @"following the instructions in the Firebase Github " - @"repository at: %@"; +NSString *const kInvalidPlistAlertMessage = @"This sample app needs to be updated with a valid " + @"GoogleService-Info.plist file in order to configure " + @"Firebase.\n\n" + @"Please update the app with a valid plist file, " + @"following the instructions in the Firebase Github " + @"repository at: %@"; @implementation FIRSampleAppUtilities @@ -52,8 +51,8 @@ + (BOOL)containsRealServiceInfoPlistInBundle:(NSBundle *)bundle { return NO; } - NSString *plistFilePath = - [bundle pathForResource:kServiceInfoFileName ofType:kServiceInfoFileType]; + NSString *plistFilePath = [bundle pathForResource:kServiceInfoFileName + ofType:kServiceInfoFileType]; if (!plistFilePath.length) { return NO; } @@ -91,8 +90,9 @@ + (void)presentAlertForInvalidServiceInfoPlistFromViewController: }]; [alertController addAction:viewReadmeAction]; - UIAlertAction *cancelAction = - [UIAlertAction actionWithTitle:@"Close" style:UIAlertActionStyleCancel handler:nil]; + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"Close" + style:UIAlertActionStyleCancel + handler:nil]; [alertController addAction:cancelAction]; [viewController presentViewController:alertController animated:YES completion:nil]; diff --git a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m index d16a95ead67..1374a05d2ab 100644 --- a/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m +++ b/Example/Storage/Tests/Integration/FIRStorageIntegrationTests.m @@ -69,8 +69,8 @@ - (void)setUp { XCTestExpectation *expectation = [self expectationWithDescription:@"setup"]; FIRStorageReference *ref = [[FIRStorage storage].reference child:@"ios/public/1mb"]; - NSData *data = [NSData - dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"1mb" ofType:@"dat"]]; + NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"1mb" + ofType:@"dat"]]; XCTAssertNotNil(data, "Could not load bundled file"); [ref putData:data metadata:nil diff --git a/Example/Storage/Tests/Unit/FIRStorageComponentTests.m b/Example/Storage/Tests/Unit/FIRStorageComponentTests.m index 7ce4b72f790..5f2c7d57811 100644 --- a/Example/Storage/Tests/Unit/FIRStorageComponentTests.m +++ b/Example/Storage/Tests/Unit/FIRStorageComponentTests.m @@ -64,8 +64,8 @@ - (void)testMultipleComponentInstancesCreated { // App isn't used in any of this, so a simple class mock works for simplicity. id app = OCMClassMock([FIRApp class]); NSMutableSet *registrants = [NSMutableSet setWithObject:[FIRStorageComponent class]]; - FIRComponentContainer *container = - [[FIRComponentContainer alloc] initWithApp:app registrants:registrants]; + FIRComponentContainer *container = [[FIRComponentContainer alloc] initWithApp:app + registrants:registrants]; id provider1 = FIR_COMPONENT(FIRStorageMultiBucketProvider, container); XCTAssertNotNil(provider1); @@ -84,8 +84,8 @@ - (void)testMultipleStorageInstancesCreated { // implementation. id app = [self appMockWithOptions]; NSMutableSet *registrants = [NSMutableSet setWithObject:[FIRStorageComponent class]]; - FIRComponentContainer *container = - [[FIRComponentContainer alloc] initWithApp:app registrants:registrants]; + FIRComponentContainer *container = [[FIRComponentContainer alloc] initWithApp:app + registrants:registrants]; id provider = FIR_COMPONENT(FIRStorageMultiBucketProvider, container); XCTAssertNotNil(provider); diff --git a/Example/Storage/Tests/Unit/FIRStorageTestHelpers.m b/Example/Storage/Tests/Unit/FIRStorageTestHelpers.m index 673afbfe18e..2b2f4c664df 100644 --- a/Example/Storage/Tests/Unit/FIRStorageTestHelpers.m +++ b/Example/Storage/Tests/Unit/FIRStorageTestHelpers.m @@ -45,8 +45,8 @@ + (FIRApp *)mockedApp { // correct contents. id app = OCMClassMock([FIRApp class]); NSMutableSet *registrants = [NSMutableSet setWithObject:[FIRStorageComponent class]]; - FIRComponentContainer *container = - [[FIRComponentContainer alloc] initWithApp:app registrants:registrants]; + FIRComponentContainer *container = [[FIRComponentContainer alloc] initWithApp:app + registrants:registrants]; OCMStub([app container]).andReturn(container); return app; } diff --git a/Example/Storage/Tests/Unit/FIRStorageTests.m b/Example/Storage/Tests/Unit/FIRStorageTests.m index 50df557f77f..93e4ead1427 100644 --- a/Example/Storage/Tests/Unit/FIRStorageTests.m +++ b/Example/Storage/Tests/Unit/FIRStorageTests.m @@ -57,8 +57,8 @@ - (void)testBucketNotEnforced { } - (void)testBucketEnforced { - FIRStorage *storage = - [FIRStorage storageForApp:self.app URL:@"gs://benwu-test1.storage.firebase.com"]; + FIRStorage *storage = [FIRStorage storageForApp:self.app + URL:@"gs://benwu-test1.storage.firebase.com"]; [storage referenceForURL:@"gs://benwu-test1.storage.firebase.com/child"]; storage = [FIRStorage storageForApp:self.app URL:@"gs://benwu-test1.storage.firebase.com/"]; [storage referenceForURL:@"gs://benwu-test1.storage.firebase.com/child"]; diff --git a/Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m b/Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m index bfe6e72712e..d538ad20967 100644 --- a/Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m +++ b/Example/Storage/Tests/Unit/FIRStorageTokenAuthorizerTests.m @@ -32,8 +32,9 @@ - (void)setUp { self.fetcher = [GTMSessionFetcher fetcherWithRequest:fetchRequest]; GTMSessionFetcherService *fetcherService = [[GTMSessionFetcherService alloc] init]; - FIRAuthInteropFake *auth = - [[FIRAuthInteropFake alloc] initWithToken:kFIRStorageTestAuthToken userID:nil error:nil]; + FIRAuthInteropFake *auth = [[FIRAuthInteropFake alloc] initWithToken:kFIRStorageTestAuthToken + userID:nil + error:nil]; self.fetcher.authorizer = [[FIRStorageTokenAuthorizer alloc] initWithGoogleAppID:@"dummyAppID" fetcherService:fetcherService authProvider:auth]; @@ -78,8 +79,9 @@ - (void)testUnsuccessfulAuth { NSError *authError = [NSError errorWithDomain:FIRStorageErrorDomain code:FIRStorageErrorCodeUnauthenticated userInfo:nil]; - FIRAuthInteropFake *failedAuth = - [[FIRAuthInteropFake alloc] initWithToken:nil userID:nil error:authError]; + FIRAuthInteropFake *failedAuth = [[FIRAuthInteropFake alloc] initWithToken:nil + userID:nil + error:authError]; GTMSessionFetcherService *fetcherService = [[GTMSessionFetcherService alloc] init]; self.fetcher.authorizer = [[FIRStorageTokenAuthorizer alloc] initWithGoogleAppID:@"dummyAppID" fetcherService:fetcherService diff --git a/Firebase/Core/FIRApp.m b/Firebase/Core/FIRApp.m index 82f9832132f..799db26f5c8 100644 --- a/Firebase/Core/FIRApp.m +++ b/Firebase/Core/FIRApp.m @@ -117,11 +117,10 @@ + (void)configure { } [NSException raise:kFirebaseCoreErrorDomain - format: - @"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find " - @"a valid GoogleService-Info.plist in your project. Please download one " - @"from %@.", - kPlistURL]; + format:@"`[FIRApp configure];` (`FirebaseApp.configure()` in Swift) could not find " + @"a valid GoogleService-Info.plist in your project. Please download one " + @"from %@.", + kPlistURL]; } [FIRApp configureWithOptions:options]; #if TARGET_OS_OSX || TARGET_OS_TV @@ -162,9 +161,8 @@ + (void)configureWithName:(NSString *)name options:(FIROptions *)options { if (!((character >= 'a' && character <= 'z') || (character >= 'A' && character <= 'Z') || (character >= '0' && character <= '9') || character == '_' || character == '-')) { [NSException raise:kFirebaseCoreErrorDomain - format: - @"App name should only contain Letters, " - @"Numbers, Underscores, and Dashes."]; + format:@"App name should only contain Letters, " + @"Numbers, Underscores, and Dashes."]; } } @@ -263,9 +261,8 @@ + (void)addAppToAppDictionary:(FIRApp *)app { sAllApps[app.name] = app; } else { [NSException raise:kFirebaseCoreErrorDomain - format: - @"Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in " - @"GoogleService-Info.plist or set in the customized options."]; + format:@"Configuration fails. It may be caused by an invalid GOOGLE_APP_ID in " + @"GoogleService-Info.plist or set in the customized options."]; } } @@ -496,10 +493,9 @@ + (void)registerInternalLibrary:(nonnull Class)library if (![(Class)library conformsToProtocol:@protocol(FIRLibrary)] || ![(Class)library respondsToSelector:@selector(componentsToRegister)]) { [NSException raise:NSInvalidArgumentException - format: - @"Class %@ attempted to register components, but it does not conform to " - @"`FIRLibrary or provide a `componentsToRegister:` method.", - library]; + format:@"Class %@ attempted to register components, but it does not conform to " + @"`FIRLibrary or provide a `componentsToRegister:` method.", + library]; } [FIRComponentContainer registerAsComponentRegistrant:library]; @@ -529,8 +525,8 @@ - (void)checkExpectedBundleID { NSString *expectedBundleID = [self expectedBundleID]; // The checking is only done when the bundle ID is provided in the serviceInfo dictionary for // backward compatibility. - if (expectedBundleID != nil && - ![FIRBundleUtil hasBundleIdentifier:expectedBundleID inBundles:bundles]) { + if (expectedBundleID != nil && ![FIRBundleUtil hasBundleIdentifier:expectedBundleID + inBundles:bundles]) { FIRLogError(kFIRLoggerCore, @"I-COR000008", @"The project's Bundle ID is inconsistent with " @"either the Bundle ID in '%@.%@', or the Bundle ID in the options if you are " @@ -640,8 +636,9 @@ + (BOOL)validateAppIDFormat:(NSString *)appID withVersion:(NSString *)version { } NSString *const pattern = @"^\\d+:ios:[a-f0-9]+$"; - NSRegularExpression *regex = - [NSRegularExpression regularExpressionWithPattern:pattern options:0 error:NULL]; + NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:pattern + options:0 + error:NULL]; if (!regex) { return NO; } diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m index fe708514be6..d23f816846b 100644 --- a/Firebase/Core/FIROptions.m +++ b/Firebase/Core/FIROptions.m @@ -40,11 +40,10 @@ NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED"; // Library version ID. -NSString *const kFIRLibraryVersionID = - @"5" // Major version (one or more digits) - @"01" // Minor version (exactly 2 digits) - @"10" // Build number (exactly 2 digits) - @"000"; // Fixed "000" +NSString *const kFIRLibraryVersionID = @"5" // Major version (one or more digits) + @"01" // Minor version (exactly 2 digits) + @"10" // Build number (exactly 2 digits) + @"000"; // Fixed "000" // Plist file name. NSString *const kServiceInfoFileName = @"GoogleService-Info"; // Plist file type. diff --git a/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m b/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m index 5b200bf9397..5b7cf853777 100644 --- a/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m +++ b/Firebase/DynamicLinks/FDLURLComponents/FDLURLComponents.m @@ -512,8 +512,9 @@ + (void)shortenURL:(NSURL *)url } NSURLRequest *request = [self shorteningRequestForLongURL:url options:options]; if (!request) { - NSError *error = - [NSError errorWithDomain:kFirebaseDurableDeepLinkErrorDomain code:0 userInfo:nil]; + NSError *error = [NSError errorWithDomain:kFirebaseDurableDeepLinkErrorDomain + code:0 + userInfo:nil]; completion(nil, nil, error); return; } diff --git a/Firebase/DynamicLinks/FIRDLDefaultRetrievalProcessV2.m b/Firebase/DynamicLinks/FIRDLDefaultRetrievalProcessV2.m index efdd51fcc8a..12b70a652cd 100644 --- a/Firebase/DynamicLinks/FIRDLDefaultRetrievalProcessV2.m +++ b/Firebase/DynamicLinks/FIRDLDefaultRetrievalProcessV2.m @@ -309,11 +309,10 @@ - (void)fetchLocaleFromWebView { if (_jsExecutor) { return; } - NSString *jsString = - @"window.generateFingerprint=function(){try{var " - @"languageCode=navigator.languages?navigator.languages[0]:navigator." - @"language;return languageCode;}catch(b){return" - "}};"; + NSString *jsString = @"window.generateFingerprint=function(){try{var " + @"languageCode=navigator.languages?navigator.languages[0]:navigator." + @"language;return languageCode;}catch(b){return" + "}};"; _jsExecutor = [[FIRDLJavaScriptExecutor alloc] initWithDelegate:self script:jsString]; } diff --git a/Firebase/DynamicLinks/FIRDynamicLink.m b/Firebase/DynamicLinks/FIRDynamicLink.m index 9c9b063c9e8..cbe2e23d973 100644 --- a/Firebase/DynamicLinks/FIRDynamicLink.m +++ b/Firebase/DynamicLinks/FIRDynamicLink.m @@ -21,12 +21,11 @@ @implementation FIRDynamicLink - (NSString *)description { - return [NSString stringWithFormat: - @"<%@: %p, url [%@], match type: %@, minimumAppVersion: %@, " - "match message: %@>", - NSStringFromClass([self class]), self, self.url, - [[self class] stringWithMatchType:_matchType], - self.minimumAppVersion ?: @"N/A", self.matchMessage]; + return [NSString stringWithFormat:@"<%@: %p, url [%@], match type: %@, minimumAppVersion: %@, " + "match message: %@>", + NSStringFromClass([self class]), self, self.url, + [[self class] stringWithMatchType:_matchType], + self.minimumAppVersion ?: @"N/A", self.matchMessage]; } - (instancetype)initWithParametersDictionary:(NSDictionary *)parameters { diff --git a/Firebase/DynamicLinks/FIRDynamicLinkNetworking.m b/Firebase/DynamicLinks/FIRDynamicLinkNetworking.m index 4c7b9125f58..cbd99f51545 100644 --- a/Firebase/DynamicLinks/FIRDynamicLinkNetworking.m +++ b/Firebase/DynamicLinks/FIRDynamicLinkNetworking.m @@ -193,8 +193,9 @@ - (void)retrievePendingDynamicLinkWithIOSVersion:(NSString *)IOSVersion FIRDLNetworkingParserBlock responseParserBlock = ^NSDictionary *_Nullable( NSString *requestURLString, NSData *data, NSString **matchMessagePtr, NSError **errorPtr) { NSError *serializationError; - NSDictionary *result = - [NSJSONSerialization JSONObjectWithData:data options:0 error:&serializationError]; + NSDictionary *result = [NSJSONSerialization JSONObjectWithData:data + options:0 + error:&serializationError]; if (serializationError) { *errorPtr = serializationError; diff --git a/Firebase/DynamicLinks/FIRDynamicLinks+FirstParty.h b/Firebase/DynamicLinks/FIRDynamicLinks+FirstParty.h index 8b255b5c10b..b450733cf87 100644 --- a/Firebase/DynamicLinks/FIRDynamicLinks+FirstParty.h +++ b/Firebase/DynamicLinks/FIRDynamicLinks+FirstParty.h @@ -96,9 +96,8 @@ NS_ASSUME_NONNULL_BEGIN * @abstract Method for compatibility with old interface of the GINDurableDeepLinkService */ - (BOOL)shouldHandleDeepLinkFromCustomSchemeURL:(NSURL *)url - DEPRECATED_MSG_ATTRIBUTE( - "Use [FIRDynamicLinks shouldHandleDynamicLinkFromCustomSchemeURL:]" - " instead."); + DEPRECATED_MSG_ATTRIBUTE("Use [FIRDynamicLinks shouldHandleDynamicLinkFromCustomSchemeURL:]" + " instead."); @end diff --git a/Firebase/DynamicLinks/FIRDynamicLinks.m b/Firebase/DynamicLinks/FIRDynamicLinks.m index 681c461a5d0..9734441a2df 100644 --- a/Firebase/DynamicLinks/FIRDynamicLinks.m +++ b/Firebase/DynamicLinks/FIRDynamicLinks.m @@ -40,8 +40,7 @@ #import "DynamicLinks/Utilities/FDLUtilities.h" #ifndef FIRDynamicLinks_VERSION -#error \ - "FIRDynamicLinks_VERSION is not defined: add -DFIRDynamicLinks_VERSION=... to the build \ +#error "FIRDynamicLinks_VERSION is not defined: add -DFIRDynamicLinks_VERSION=... to the build \ invocation" #endif @@ -120,8 +119,8 @@ + (void)load { + (nonnull NSArray *)componentsToRegister { // Product requirement is enforced by CocoaPod. Not technical requirement for analytics. - FIRDependency *analyticsDep = - [FIRDependency dependencyWithProtocol:@protocol(FIRAnalyticsInterop) isRequired:NO]; + FIRDependency *analyticsDep = [FIRDependency dependencyWithProtocol:@protocol(FIRAnalyticsInterop) + isRequired:NO]; FIRComponentCreationBlock creationBlock = ^id _Nullable(FIRComponentContainer *container, BOOL *isCacheable) { // Ensure it's cached so it returns the same instance every time dynamicLinks is called. @@ -577,8 +576,9 @@ + (NSString *)diagnosticAnalyzeEntitlements { stringByAppendingPathComponent:@"embedded.mobileprovision"]; NSError *error; - NSMutableData *profileData = - [NSMutableData dataWithContentsOfFile:embeddedMobileprovisionFilePath options:0 error:&error]; + NSMutableData *profileData = [NSMutableData dataWithContentsOfFile:embeddedMobileprovisionFilePath + options:0 + error:&error]; if (!profileData.length || error) { return @"\tSKIPPED: Not able to read entitlements (embedded.mobileprovision).\n"; @@ -669,21 +669,20 @@ + (NSString *)performDiagnosticsIncludingHeaderFooter:(BOOL)includingHeaderFoote #if TARGET_IPHONE_SIMULATOR // check is Simulator and print WARNING that Universal Links is not supported on Simulator - [diagnosticString appendString: - @"WARNING: iOS Simulator does not support Universal Links. Firebase " - @"Dynamic Links SDK functionality will be limited. Some FDL " - @"features may be missing or will not work correctly.\n"]; + [diagnosticString + appendString:@"WARNING: iOS Simulator does not support Universal Links. Firebase " + @"Dynamic Links SDK functionality will be limited. Some FDL " + @"features may be missing or will not work correctly.\n"]; #endif // TARGET_IPHONE_SIMULATOR id applicationDelegate = [UIApplication sharedApplication].delegate; if (![applicationDelegate respondsToSelector:@selector(application:openURL:options:)]) { detectedErrorsCnt++; - [diagnosticString appendFormat: - @"ERROR: UIApplication delegate %@ does not implements selector " - @"%@. FDL depends on this implementation to retrieve pending " - @"dynamic link.\n", - applicationDelegate, - NSStringFromSelector(@selector(application:openURL:options:))]; + [diagnosticString appendFormat:@"ERROR: UIApplication delegate %@ does not implements selector " + @"%@. FDL depends on this implementation to retrieve pending " + @"dynamic link.\n", + applicationDelegate, + NSStringFromSelector(@selector(application:openURL:options:))]; } // check that Info.plist has custom URL scheme and the scheme is the same as bundleID or @@ -705,16 +704,14 @@ + (NSString *)performDiagnosticsIncludingHeaderFooter:(BOOL)includingHeaderFoote } if (!URLSchemeFoundInPlist) { detectedErrorsCnt++; - [diagnosticString appendFormat: - @"ERROR: Specified custom URL scheme is %@ but Info.plist do " - @"not contain such scheme in " - "CFBundleURLTypes key.\n", - URLScheme]; + [diagnosticString appendFormat:@"ERROR: Specified custom URL scheme is %@ but Info.plist do " + @"not contain such scheme in " + "CFBundleURLTypes key.\n", + URLScheme]; } else { - [diagnosticString appendFormat: - @"\tSpecified custom URL scheme is %@ and Info.plist contains " - @"such scheme in CFBundleURLTypes key.\n", - URLScheme]; + [diagnosticString appendFormat:@"\tSpecified custom URL scheme is %@ and Info.plist contains " + @"such scheme in CFBundleURLTypes key.\n", + URLScheme]; } #if !TARGET_IPHONE_SIMULATOR @@ -745,8 +742,8 @@ + (void)performDiagnosticsWithCompletion:(void (^_Nullable)(NSString *diagnostic BOOL hasErrors))completionHandler; { NSInteger detectedErrorsCnt = 0; - NSString *diagnosticString = - [self performDiagnosticsIncludingHeaderFooter:YES detectedErrors:&detectedErrorsCnt]; + NSString *diagnosticString = [self performDiagnosticsIncludingHeaderFooter:YES + detectedErrors:&detectedErrorsCnt]; if (completionHandler) { completionHandler(diagnosticString, detectedErrorsCnt > 0); } else { diff --git a/Firebase/DynamicLinks/Utilities/FDLUtilities.m b/Firebase/DynamicLinks/Utilities/FDLUtilities.m index 5ded3c42d84..fdc781fea0e 100644 --- a/Firebase/DynamicLinks/Utilities/FDLUtilities.m +++ b/Firebase/DynamicLinks/Utilities/FDLUtilities.m @@ -44,10 +44,10 @@ components.path = @"/app/_/deeplink"; NSMutableArray *queryItems = [NSMutableArray array]; - [queryItems - addObject:[NSURLQueryItem queryItemWithName:kFDLBundleIDQueryParameterName value:bundleID]]; - [queryItems - addObject:[NSURLQueryItem queryItemWithName:kFDLURLSchemeQueryParameterName value:urlScheme]]; + [queryItems addObject:[NSURLQueryItem queryItemWithName:kFDLBundleIDQueryParameterName + value:bundleID]]; + [queryItems addObject:[NSURLQueryItem queryItemWithName:kFDLURLSchemeQueryParameterName + value:urlScheme]]; [components setQueryItems:queryItems]; return [components URL]; diff --git a/Firebase/InAppMessagingDisplay/Banner/FIDBannerViewController.m b/Firebase/InAppMessagingDisplay/Banner/FIDBannerViewController.m index 6f242ffb3c9..511f7dff694 100644 --- a/Firebase/InAppMessagingDisplay/Banner/FIDBannerViewController.m +++ b/Firebase/InAppMessagingDisplay/Banner/FIDBannerViewController.m @@ -67,8 +67,8 @@ @implementation FIDBannerViewController displayDelegate: (id)displayDelegate timeFetcher:(id)timeFetcher { - UIStoryboard *storyboard = - [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" bundle:resourceBundle]; + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" + bundle:resourceBundle]; if (storyboard == nil) { FIRLogError(kFIRLoggerInAppMessagingDisplay, @"I-FID300002", diff --git a/Firebase/InAppMessagingDisplay/FIRIAMDefaultDisplayImpl.m b/Firebase/InAppMessagingDisplay/FIRIAMDefaultDisplayImpl.m index c8dbbae7a70..cf8005f755f 100644 --- a/Firebase/InAppMessagingDisplay/FIRIAMDefaultDisplayImpl.m +++ b/Firebase/InAppMessagingDisplay/FIRIAMDefaultDisplayImpl.m @@ -55,8 +55,8 @@ + (NSBundle *)getViewResourceBundle { // sourced NSBundle *containingBundle = [NSBundle mainBundle]; // This is assuming the display resource bundle is contained in the main bundle - NSURL *bundleURL = - [containingBundle URLForResource:@"InAppMessagingDisplayResources" withExtension:@"bundle"]; + NSURL *bundleURL = [containingBundle URLForResource:@"InAppMessagingDisplayResources" + withExtension:@"bundle"]; resourceBundle = [NSBundle bundleWithURL:bundleURL]; if (resourceBundle == nil) { diff --git a/Firebase/InAppMessagingDisplay/ImageOnly/FIDImageOnlyViewController.m b/Firebase/InAppMessagingDisplay/ImageOnly/FIDImageOnlyViewController.m index be6ec28444f..c395f5a0d19 100644 --- a/Firebase/InAppMessagingDisplay/ImageOnly/FIDImageOnlyViewController.m +++ b/Firebase/InAppMessagingDisplay/ImageOnly/FIDImageOnlyViewController.m @@ -37,8 +37,8 @@ @implementation FIDImageOnlyViewController displayDelegate: (id)displayDelegate timeFetcher:(id)timeFetcher { - UIStoryboard *storyboard = - [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" bundle:resourceBundle]; + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" + bundle:resourceBundle]; if (storyboard == nil) { FIRLogError(kFIRLoggerInAppMessagingDisplay, @"I-FID300002", diff --git a/Firebase/InAppMessagingDisplay/Modal/FIDModalViewController.m b/Firebase/InAppMessagingDisplay/Modal/FIDModalViewController.m index d8d0e9f2bcf..8e31910c0e1 100644 --- a/Firebase/InAppMessagingDisplay/Modal/FIDModalViewController.m +++ b/Firebase/InAppMessagingDisplay/Modal/FIDModalViewController.m @@ -76,8 +76,8 @@ @implementation FIDModalViewController displayDelegate: (id)displayDelegate timeFetcher:(id)timeFetcher { - UIStoryboard *storyboard = - [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" bundle:resourceBundle]; + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"FIRInAppMessageDisplayStoryboard" + bundle:resourceBundle]; if (storyboard == nil) { FIRLogError(kFIRLoggerInAppMessagingDisplay, @"I-FID300001", @@ -183,12 +183,12 @@ - (struct TitleBodyButtonHeightInfo)estimateTextBtnColumnHeightWithDisplayWidth: withMaxColumnHeight:(CGFloat)maxHeight { struct TitleBodyButtonHeightInfo resultHeightInfo; - CGFloat titleFitHeight = - [self determineTextAreaViewFitHeightForView:self.titleLabel withWidth:displayWidth]; - CGFloat bodyFitHeight = - self.modalDisplayMessage.bodyText.length == 0 - ? 0 - : [self determineTextAreaViewFitHeightForView:self.bodyTextView withWidth:displayWidth]; + CGFloat titleFitHeight = [self determineTextAreaViewFitHeightForView:self.titleLabel + withWidth:displayWidth]; + CGFloat bodyFitHeight = self.modalDisplayMessage.bodyText.length == 0 + ? 0 + : [self determineTextAreaViewFitHeightForView:self.bodyTextView + withWidth:displayWidth]; CGFloat bodyFitHeightWithPadding = self.modalDisplayMessage.bodyText.length == 0 ? 0 @@ -291,8 +291,8 @@ - (void)layoutFineTuneInPortraitMode { heightCalcReference - heights.totaColumnlHeight - self.imageTopToTitleBottomInPortraitMode.constant); - CGSize imageDisplaySize = - [self fitImageInRegionSize:imageAvailableSpace withImageSize:image.size]; + CGSize imageDisplaySize = [self fitImageInRegionSize:imageAvailableSpace + withImageSize:image.size]; FIRLogDebug(kFIRLoggerInAppMessagingDisplay, @"I-FID300005", @"Given actual image size %@ and available image display size %@, the actual" diff --git a/Firebase/Storage/FIRStorage.m b/Firebase/Storage/FIRStorage.m index 82dcbfa4da4..ff9ac2beb74 100644 --- a/Firebase/Storage/FIRStorage.m +++ b/Firebase/Storage/FIRStorage.m @@ -161,8 +161,9 @@ - (instancetype)initWithApp:(FIRApp *)app #pragma mark - NSObject overrides - (instancetype)copyWithZone:(NSZone *)zone { - FIRStorage *storage = - [[[self class] allocWithZone:zone] initWithApp:_app bucket:_storageBucket auth:_auth]; + FIRStorage *storage = [[[self class] allocWithZone:zone] initWithApp:_app + bucket:_storageBucket + auth:_auth]; storage.callbackQueue = _callbackQueue; return storage; } diff --git a/Firebase/Storage/FIRStorageComponent.m b/Firebase/Storage/FIRStorageComponent.m index 8e9770e5bde..79d3d3fc954 100644 --- a/Firebase/Storage/FIRStorageComponent.m +++ b/Firebase/Storage/FIRStorageComponent.m @@ -60,8 +60,8 @@ + (void)load { #pragma mark - FIRComponentRegistrant + (nonnull NSArray *)componentsToRegister { - FIRDependency *authDep = - [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) isRequired:NO]; + FIRDependency *authDep = [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) + isRequired:NO]; FIRComponentCreationBlock creationBlock = ^id _Nullable(FIRComponentContainer *container, BOOL *isCacheable) { return [[FIRStorageComponent alloc] initWithApp:container.app]; diff --git a/Firebase/Storage/FIRStorageDownloadTask.m b/Firebase/Storage/FIRStorageDownloadTask.m index 0752df73538..c7b7f9ae7ff 100644 --- a/Firebase/Storage/FIRStorageDownloadTask.m +++ b/Firebase/Storage/FIRStorageDownloadTask.m @@ -59,8 +59,8 @@ - (void)enqueueWithData:(nullable NSData *)resumeData { NSMutableURLRequest *request = [strongSelf.baseRequest mutableCopy]; request.HTTPMethod = @"GET"; request.timeoutInterval = strongSelf.reference.storage.maxDownloadRetryTime; - NSURLComponents *components = - [NSURLComponents componentsWithURL:request.URL resolvingAgainstBaseURL:NO]; + NSURLComponents *components = [NSURLComponents componentsWithURL:request.URL + resolvingAgainstBaseURL:NO]; [components setQuery:@"alt=media"]; request.URL = components.URL; diff --git a/Firebase/Storage/FIRStorageErrors.m b/Firebase/Storage/FIRStorageErrors.m index 651bfd12d94..ea1fa96be9a 100644 --- a/Firebase/Storage/FIRStorageErrors.m +++ b/Firebase/Storage/FIRStorageErrors.m @@ -72,9 +72,8 @@ + (NSError *)errorWithCode:(FIRStorageErrorCode)code } case FIRStorageErrorCodeUnauthenticated: - errorMessage = - @"User is not authenticated, please authenticate using Firebase " - @"Authentication and try again."; + errorMessage = @"User is not authenticated, please authenticate using Firebase " + @"Authentication and try again."; break; case FIRStorageErrorCodeUnauthorized: { @@ -158,8 +157,8 @@ + (nullable NSError *)errorWithServerError:(nullable NSError *)error // Turn raw response into a string NSData *responseData = errorDictionary[@"data"]; if (responseData) { - NSString *errorString = - [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; + NSString *errorString = [[NSString alloc] initWithData:responseData + encoding:NSUTF8StringEncoding]; errorDictionary[kFIRStorageResponseBody] = errorString ?: @"No Response from Server."; } diff --git a/Firebase/Storage/FIRStorageGetDownloadURLTask.m b/Firebase/Storage/FIRStorageGetDownloadURLTask.m index f5f7a7ad382..944603f8eb7 100644 --- a/Firebase/Storage/FIRStorageGetDownloadURLTask.m +++ b/Firebase/Storage/FIRStorageGetDownloadURLTask.m @@ -57,8 +57,8 @@ + (NSURL *)downloadURLFromMetadataDictionary:(NSDictionary *)dictionary { // The backend can return an arbitrary number of download tokens, but we only expose the first // token via the download URL. NSURLQueryItem *altItem = [[NSURLQueryItem alloc] initWithName:@"alt" value:@"media"]; - NSURLQueryItem *tokenItem = - [[NSURLQueryItem alloc] initWithName:@"token" value:downloadTokenArray[0]]; + NSURLQueryItem *tokenItem = [[NSURLQueryItem alloc] initWithName:@"token" + value:downloadTokenArray[0]]; components.queryItems = @[ altItem, tokenItem ]; return [components URL]; diff --git a/Firebase/Storage/FIRStoragePath.m b/Firebase/Storage/FIRStoragePath.m index aa7f1305037..04a52bce5a0 100644 --- a/Firebase/Storage/FIRStoragePath.m +++ b/Firebase/Storage/FIRStoragePath.m @@ -74,10 +74,9 @@ + (nullable FIRStoragePath *)pathFromHTTPURL:(NSString *)aURLString { if (bucketName.length == 0) { [NSException raise:NSInternalInconsistencyException - format: - @"URL must be in the form of " - @"http[s]://firebasestorage.googleapis.com/v0/b//o/[?token=signed_url_params]"]; + format:@"URL must be in the form of " + @"http[s]://firebasestorage.googleapis.com/v0/b//o/[?token=signed_url_params]"]; return nil; } diff --git a/Firebase/Storage/FIRStorageReference.m b/Firebase/Storage/FIRStorageReference.m index 99f00992473..78c9dc64dee 100644 --- a/Firebase/Storage/FIRStorageReference.m +++ b/Firebase/Storage/FIRStorageReference.m @@ -57,8 +57,8 @@ - (instancetype)initWithStorage:(FIRStorage *)storage path:(FIRStoragePath *)pat #pragma mark - NSObject overrides - (instancetype)copyWithZone:(NSZone *)zone { - FIRStorageReference *copiedReference = - [[[self class] allocWithZone:zone] initWithStorage:_storage path:_path]; + FIRStorageReference *copiedReference = [[[self class] allocWithZone:zone] initWithStorage:_storage + path:_path]; return copiedReference; } @@ -121,8 +121,8 @@ - (NSString *)name { - (FIRStorageReference *)root { FIRStoragePath *rootPath = [_path root]; - FIRStorageReference *rootReference = - [[FIRStorageReference alloc] initWithStorage:_storage path:rootPath]; + FIRStorageReference *rootReference = [[FIRStorageReference alloc] initWithStorage:_storage + path:rootPath]; return rootReference; } @@ -132,15 +132,15 @@ - (nullable FIRStorageReference *)parent { return nil; } - FIRStorageReference *parentReference = - [[FIRStorageReference alloc] initWithStorage:_storage path:parentPath]; + FIRStorageReference *parentReference = [[FIRStorageReference alloc] initWithStorage:_storage + path:parentPath]; return parentReference; } - (FIRStorageReference *)child:(NSString *)path { FIRStoragePath *childPath = [_path child:path]; - FIRStorageReference *childReference = - [[FIRStorageReference alloc] initWithStorage:_storage path:childPath]; + FIRStorageReference *childReference = [[FIRStorageReference alloc] initWithStorage:_storage + path:childPath]; return childReference; } diff --git a/Firebase/Storage/FIRStorageUploadTask.m b/Firebase/Storage/FIRStorageUploadTask.m index 8c299e79edc..0324974a52f 100644 --- a/Firebase/Storage/FIRStorageUploadTask.m +++ b/Firebase/Storage/FIRStorageUploadTask.m @@ -92,8 +92,8 @@ - (void)enqueue { [NSString stringWithFormat:@"%zu", (unsigned long)[bodyData length]]; [request setValue:contentLengthString forHTTPHeaderField:@"Content-Length"]; - NSURLComponents *components = - [NSURLComponents componentsWithURL:request.URL resolvingAgainstBaseURL:NO]; + NSURLComponents *components = [NSURLComponents componentsWithURL:request.URL + resolvingAgainstBaseURL:NO]; if ([components.host isEqual:kGCSHost]) { [components setPercentEncodedPath:[@"/upload" stringByAppendingString:components.path]]; diff --git a/Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestFieldPath.mm b/Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestFieldPath.mm index 38bf4f15935..8420ed59206 100644 --- a/Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestFieldPath.mm +++ b/Firestore/Example/FuzzTests/FuzzingTargets/FSTFuzzTestFieldPath.mm @@ -65,8 +65,9 @@ int FuzzTestFieldPath(const uint8_t *data, size_t size) { // Try to parse the bytes as a string array and use it for initialization. // NSJSONReadingMutableContainers specifies that arrays and dictionaries are // created as mutable objects. Returns nil if there is a parsing error. - NSArray *str_arr3 = - [NSJSONSerialization JSONObjectWithData:d options:NSJSONReadingMutableContainers error:nil]; + NSArray *str_arr3 = [NSJSONSerialization JSONObjectWithData:d + options:NSJSONReadingMutableContainers + error:nil]; NSMutableArray *mutable_array = [[NSMutableArray alloc] initWithArray:str_arr3]; if (str_arr3) { for (int i = 0; i < str_arr3.count; ++i) { diff --git a/Firestore/Example/Tests/API/FIRFirestoreTests.mm b/Firestore/Example/Tests/API/FIRFirestoreTests.mm index 7cb49b72d7c..dbe7f9a2c77 100644 --- a/Firestore/Example/Tests/API/FIRFirestoreTests.mm +++ b/Firestore/Example/Tests/API/FIRFirestoreTests.mm @@ -42,9 +42,8 @@ - (void)testDeleteApp { XCTAssertEqualObjects(firestore, [FIRFirestore firestoreForApp:app]); XCTestExpectation *defaultAppDeletedExpectation = - [self expectationWithDescription: - @"Deleting the default app should invalidate the default " - @"Firestore instance."]; + [self expectationWithDescription:@"Deleting the default app should invalidate the default " + @"Firestore instance."]; [app deleteApp:^(BOOL success) { // Recreate the FIRApp with the same name, fetch a new Firestore instance and make sure it's // different than the other one. diff --git a/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm b/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm index 27ad8b3770b..1a8e716926a 100644 --- a/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm +++ b/Firestore/Example/Tests/API/FIRQuerySnapshotTests.mm @@ -52,12 +52,12 @@ @implementation FIRQuerySnapshotTests - (void)testEquals { FIRQuerySnapshot *foo = FSTTestQuerySnapshot("foo", @{}, @{@"a" : @{@"a" : @1}}, YES, NO); FIRQuerySnapshot *fooDup = FSTTestQuerySnapshot("foo", @{}, @{@"a" : @{@"a" : @1}}, YES, NO); - FIRQuerySnapshot *differentPath = FSTTestQuerySnapshot("bar", @{}, - @{@"a" : @{@"a" : @1}}, YES, NO); - FIRQuerySnapshot *differentDoc = FSTTestQuerySnapshot("foo", - @{@"a" : @{@"b" : @1}}, @{}, YES, NO); - FIRQuerySnapshot *noPendingWrites = FSTTestQuerySnapshot("foo", @{}, - @{@"a" : @{@"a" : @1}}, NO, NO); + FIRQuerySnapshot *differentPath = + FSTTestQuerySnapshot("bar", @{}, @{@"a" : @{@"a" : @1}}, YES, NO); + FIRQuerySnapshot *differentDoc = + FSTTestQuerySnapshot("foo", @{@"a" : @{@"b" : @1}}, @{}, YES, NO); + FIRQuerySnapshot *noPendingWrites = + FSTTestQuerySnapshot("foo", @{}, @{@"a" : @{@"a" : @1}}, NO, NO); FIRQuerySnapshot *fromCache = FSTTestQuerySnapshot("foo", @{}, @{@"a" : @{@"a" : @1}}, YES, YES); XCTAssertEqualObjects(foo, fooDup); XCTAssertNotEqualObjects(foo, differentPath); @@ -96,8 +96,8 @@ - (void)testIncludeMetadataChanges { mutatedKeys:DocumentKeySet {} syncStateChanged:YES excludesMetadataChanges:NO]; - FIRSnapshotMetadata *metadata = - [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:NO fromCache:NO]; + FIRSnapshotMetadata *metadata = [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:NO + fromCache:NO]; FIRQuerySnapshot *snapshot = [FIRQuerySnapshot snapshotWithFirestore:firestore originalQuery:query snapshot:viewSnapshot diff --git a/Firestore/Example/Tests/API/FIRQueryTests.mm b/Firestore/Example/Tests/API/FIRQueryTests.mm index c02c92c5e88..60c213e6cb2 100644 --- a/Firestore/Example/Tests/API/FIRQueryTests.mm +++ b/Firestore/Example/Tests/API/FIRQueryTests.mm @@ -55,16 +55,15 @@ - (void)testFilteringWithPredicate { FIRQuery *query = [FIRQuery referenceWithQuery:FSTTestQuery("foo") firestore:firestore]; FIRQuery *query1 = [query queryWhereField:@"f" isLessThanOrEqualTo:@1]; FIRQuery *query2 = [query queryFilteredUsingPredicate:[NSPredicate predicateWithFormat:@"f<=1"]]; - FIRQuery *query3 = - [[query queryWhereField:@"f1" isLessThan:@2] queryWhereField:@"f2" isEqualTo:@3]; + FIRQuery *query3 = [[query queryWhereField:@"f1" isLessThan:@2] queryWhereField:@"f2" + isEqualTo:@3]; FIRQuery *query4 = [query queryFilteredUsingPredicate:[NSPredicate predicateWithFormat:@"f1<2 && f2==3"]]; - FIRQuery *query5 = - [[[[[query queryWhereField:@"f1" isLessThan:@2] queryWhereField:@"f2" isEqualTo:@3] - queryWhereField:@"f1" - isLessThanOrEqualTo:@"four"] queryWhereField:@"f1" - isGreaterThanOrEqualTo:@"five"] queryWhereField:@"f1" - isGreaterThan:@6]; + FIRQuery *query5 = [[[[[query queryWhereField:@"f1" isLessThan:@2] queryWhereField:@"f2" + isEqualTo:@3] + queryWhereField:@"f1" + isLessThanOrEqualTo:@"four"] queryWhereField:@"f1" + isGreaterThanOrEqualTo:@"five"] queryWhereField:@"f1" isGreaterThan:@6]; FIRQuery *query6 = [query queryFilteredUsingPredicate: [NSPredicate predicateWithFormat:@"f1<2 && f2==3 && f1<='four' && f1>='five' && f1>6"]]; diff --git a/Firestore/Example/Tests/API/FIRSnapshotMetadataTests.mm b/Firestore/Example/Tests/API/FIRSnapshotMetadataTests.mm index a4d321b40d2..f705aa76284 100644 --- a/Firestore/Example/Tests/API/FIRSnapshotMetadataTests.mm +++ b/Firestore/Example/Tests/API/FIRSnapshotMetadataTests.mm @@ -28,14 +28,14 @@ @interface FIRSnapshotMetadataTests : XCTestCase @implementation FIRSnapshotMetadataTests - (void)testEquals { - FIRSnapshotMetadata *foo = - [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES fromCache:YES]; - FIRSnapshotMetadata *fooDup = - [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES fromCache:YES]; - FIRSnapshotMetadata *bar = - [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES fromCache:NO]; - FIRSnapshotMetadata *baz = - [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:NO fromCache:YES]; + FIRSnapshotMetadata *foo = [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES + fromCache:YES]; + FIRSnapshotMetadata *fooDup = [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES + fromCache:YES]; + FIRSnapshotMetadata *bar = [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:YES + fromCache:NO]; + FIRSnapshotMetadata *baz = [FIRSnapshotMetadata snapshotMetadataWithPendingWrites:NO + fromCache:YES]; XCTAssertEqualObjects(foo, fooDup); XCTAssertNotEqualObjects(foo, bar); XCTAssertNotEqualObjects(foo, baz); diff --git a/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm b/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm index ed2aa0bd1db..60bac8108f8 100644 --- a/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm +++ b/Firestore/Example/Tests/Core/FSTQueryListenerTests.mm @@ -77,8 +77,9 @@ - (void)testRaisesCollectionEvents { FSTDocument *doc2prime = FSTTestDoc("rooms/Hades", 3, @{@"name" : @"Hades", @"owner" : @"Jonny"}, FSTDocumentStateSynced); - FSTQueryListener *listener = - [self listenToQuery:query options:_includeMetadataChanges accumulatingSnapshots:accum]; + FSTQueryListener *listener = [self listenToQuery:query + options:_includeMetadataChanges + accumulatingSnapshots:accum]; FSTQueryListener *otherListener = [self listenToQuery:query accumulatingSnapshots:otherAccum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; @@ -123,8 +124,9 @@ - (void)testRaisesErrorEvent { [accum addObject:error]; }]; - NSError *testError = - [NSError errorWithDomain:@"com.google.firestore.test" code:42 userInfo:@{@"some" : @"info"}]; + NSError *testError = [NSError errorWithDomain:@"com.google.firestore.test" + code:42 + userInfo:@{@"some" : @"info"}]; [listener queryDidError:testError]; XCTAssertEqualObjects(accum, @[ testError ]); @@ -134,8 +136,9 @@ - (void)testRaisesEventForEmptyCollectionAfterSync { NSMutableArray *accum = [NSMutableArray array]; FSTQuery *query = FSTTestQuery("rooms"); - FSTQueryListener *listener = - [self listenToQuery:query options:_includeMetadataChanges accumulatingSnapshots:accum]; + FSTQueryListener *listener = [self listenToQuery:query + options:_includeMetadataChanges + accumulatingSnapshots:accum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewSnapshot *snap1 = FSTTestApplyChanges(view, @[], nil); @@ -193,10 +196,11 @@ - (void)testDoesNotRaiseEventsForMetadataChangesUnlessSpecified { FSTDocument *doc1 = FSTTestDoc("rooms/Eros", 1, @{@"name" : @"Eros"}, FSTDocumentStateSynced); FSTDocument *doc2 = FSTTestDoc("rooms/Hades", 2, @{@"name" : @"Hades"}, FSTDocumentStateSynced); - FSTQueryListener *filteredListener = - [self listenToQuery:query accumulatingSnapshots:filteredAccum]; - FSTQueryListener *fullListener = - [self listenToQuery:query options:_includeMetadataChanges accumulatingSnapshots:fullAccum]; + FSTQueryListener *filteredListener = [self listenToQuery:query + accumulatingSnapshots:filteredAccum]; + FSTQueryListener *fullListener = [self listenToQuery:query + options:_includeMetadataChanges + accumulatingSnapshots:fullAccum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewSnapshot *snap1 = FSTTestApplyChanges(view, @[ doc1 ], nil); @@ -236,10 +240,11 @@ - (void)testRaisesDocumentMetadataEventsOnlyWhenSpecified { includeDocumentMetadataChanges:YES waitForSyncWhenOnline:NO]; - FSTQueryListener *filteredListener = - [self listenToQuery:query accumulatingSnapshots:filteredAccum]; - FSTQueryListener *fullListener = - [self listenToQuery:query options:options accumulatingSnapshots:fullAccum]; + FSTQueryListener *filteredListener = [self listenToQuery:query + accumulatingSnapshots:filteredAccum]; + FSTQueryListener *fullListener = [self listenToQuery:query + options:options + accumulatingSnapshots:fullAccum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewSnapshot *snap1 = FSTTestApplyChanges(view, @[ doc1, doc2 ], nil); @@ -292,8 +297,9 @@ - (void)testRaisesQueryMetadataEventsOnlyWhenHasPendingWritesOnTheQueryChanges { FSTListenOptions *options = [[FSTListenOptions alloc] initWithIncludeQueryMetadataChanges:YES includeDocumentMetadataChanges:NO waitForSyncWhenOnline:NO]; - FSTQueryListener *fullListener = - [self listenToQuery:query options:options accumulatingSnapshots:fullAccum]; + FSTQueryListener *fullListener = [self listenToQuery:query + options:options + accumulatingSnapshots:fullAccum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewSnapshot *snap1 = FSTTestApplyChanges(view, @[ doc1, doc2 ], nil); @@ -332,8 +338,8 @@ - (void)testMetadataOnlyDocumentChangesAreFilteredOutWhenIncludeDocumentMetadata FSTTestDoc("rooms/Eros", 1, @{@"name" : @"Eros"}, FSTDocumentStateSynced); FSTDocument *doc3 = FSTTestDoc("rooms/Other", 3, @{@"name" : @"Other"}, FSTDocumentStateSynced); - FSTQueryListener *filteredListener = - [self listenToQuery:query accumulatingSnapshots:filteredAccum]; + FSTQueryListener *filteredListener = [self listenToQuery:query + accumulatingSnapshots:filteredAccum]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewSnapshot *snap1 = FSTTestApplyChanges(view, @[ doc1, doc2 ], nil); diff --git a/Firestore/Example/Tests/Core/FSTQueryTests.mm b/Firestore/Example/Tests/Core/FSTQueryTests.mm index 7e08d34581d..f917cd67742 100644 --- a/Firestore/Example/Tests/Core/FSTQueryTests.mm +++ b/Firestore/Example/Tests/Core/FSTQueryTests.mm @@ -173,44 +173,32 @@ - (void)testArrayContainsFilter { // array without element (and make sure it doesn't match in a nested field or a different field). doc = FSTTestDoc( "collection/1", 0, - @{@"array" : @[ @41, @"42", - @{@"a" : @42, - @"b" : @[ @42 ]} ], - @"different" : @[ @42 ]}, + @{@"array" : @[ @41, @"42", @{@"a" : @42, @"b" : @[ @42 ]} ], @"different" : @[ @42 ]}, FSTDocumentStateSynced); XCTAssertFalse([query matchesDocument:doc]); // array with element. - doc = FSTTestDoc("collection/1", 0, - @{@"array" : @[ @1, @"2", @42, - @{@"a" : @1} ]}, + doc = FSTTestDoc("collection/1", 0, @{@"array" : @[ @1, @"2", @42, @{@"a" : @1} ]}, FSTDocumentStateSynced); XCTAssertTrue([query matchesDocument:doc]); } - (void)testArrayContainsFilterWithObjectValue { // Search for arrays containing the object { a: [42] } - FSTQuery *query = - [FSTTestQuery("collection") queryByAddingFilter:FSTTestFilter("array", @"array_contains", - @{@"a" : @[ @42 ]})]; + FSTQuery *query = [FSTTestQuery("collection") + queryByAddingFilter:FSTTestFilter("array", @"array_contains", @{@"a" : @[ @42 ]})]; // array without element. FSTDocument *doc = FSTTestDoc("collection/1", 0, @{ @"array" : @[ - @{@"a" : @42}, - @{@"a" : @[ @42, @43 ]}, - @{@"b" : @[ @42 ]}, - @{@"a" : @[ @42 ], - @"b" : @42} + @{@"a" : @42}, @{@"a" : @[ @42, @43 ]}, @{@"b" : @[ @42 ]}, @{@"a" : @[ @42 ], @"b" : @42} ] }, FSTDocumentStateSynced); XCTAssertFalse([query matchesDocument:doc]); // array with element. - doc = FSTTestDoc("collection/1", 0, - @{@"array" : @[ @1, @"2", @42, - @{@"a" : @[ @42 ]} ]}, + doc = FSTTestDoc("collection/1", 0, @{@"array" : @[ @1, @"2", @42, @{@"a" : @[ @42 ]} ]}, FSTDocumentStateSynced); XCTAssertTrue([query matchesDocument:doc]); } @@ -257,14 +245,14 @@ - (void)testDoesNotMatchComplexObjectsForFilters { FSTDocument *doc1 = FSTTestDoc("collection/1", 0, @{@"sort" : @2}, FSTDocumentStateSynced); FSTDocument *doc2 = FSTTestDoc("collection/2", 0, @{@"sort" : @[]}, FSTDocumentStateSynced); FSTDocument *doc3 = FSTTestDoc("collection/3", 0, @{@"sort" : @[ @1 ]}, FSTDocumentStateSynced); - FSTDocument *doc4 = FSTTestDoc("collection/4", 0, - @{@"sort" : @{@"foo" : @2}}, FSTDocumentStateSynced); - FSTDocument *doc5 = FSTTestDoc("collection/5", 0, - @{@"sort" : @{@"foo" : @"bar"}}, FSTDocumentStateSynced); - FSTDocument *doc6 = FSTTestDoc("collection/6", 0, - @{@"sort" : @{}}, FSTDocumentStateSynced); // no sort field - FSTDocument *doc7 = FSTTestDoc("collection/7", 0, - @{@"sort" : @[ @3, @1 ]}, FSTDocumentStateSynced); + FSTDocument *doc4 = + FSTTestDoc("collection/4", 0, @{@"sort" : @{@"foo" : @2}}, FSTDocumentStateSynced); + FSTDocument *doc5 = + FSTTestDoc("collection/5", 0, @{@"sort" : @{@"foo" : @"bar"}}, FSTDocumentStateSynced); + FSTDocument *doc6 = + FSTTestDoc("collection/6", 0, @{@"sort" : @{}}, FSTDocumentStateSynced); // no sort field + FSTDocument *doc7 = + FSTTestDoc("collection/7", 0, @{@"sort" : @[ @3, @1 ]}, FSTDocumentStateSynced); XCTAssertTrue([query1 matchesDocument:doc1]); XCTAssertFalse([query1 matchesDocument:doc2]); @@ -291,10 +279,10 @@ - (void)testDoesntRemoveComplexObjectsWithOrderBy { FSTDocument *doc1 = FSTTestDoc("collection/1", 0, @{@"sort" : @2}, FSTDocumentStateSynced); FSTDocument *doc2 = FSTTestDoc("collection/2", 0, @{@"sort" : @[]}, FSTDocumentStateSynced); FSTDocument *doc3 = FSTTestDoc("collection/3", 0, @{@"sort" : @[ @1 ]}, FSTDocumentStateSynced); - FSTDocument *doc4 = FSTTestDoc("collection/4", 0, - @{@"sort" : @{@"foo" : @2}}, FSTDocumentStateSynced); - FSTDocument *doc5 = FSTTestDoc("collection/5", 0, - @{@"sort" : @{@"foo" : @"bar"}}, FSTDocumentStateSynced); + FSTDocument *doc4 = + FSTTestDoc("collection/4", 0, @{@"sort" : @{@"foo" : @2}}, FSTDocumentStateSynced); + FSTDocument *doc5 = + FSTTestDoc("collection/5", 0, @{@"sort" : @{@"foo" : @"bar"}}, FSTDocumentStateSynced); FSTDocument *doc6 = FSTTestDoc("collection/6", 0, @{}, FSTDocumentStateSynced); XCTAssertTrue([query1 matchesDocument:doc1]); @@ -307,8 +295,8 @@ - (void)testDoesntRemoveComplexObjectsWithOrderBy { - (void)testFiltersBasedOnArrayValue { FSTQuery *baseQuery = FSTTestQuery("collection"); - FSTDocument *doc1 = FSTTestDoc("collection/doc", 0, - @{@"tags" : @[ @"foo", @1, @YES ]}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("collection/doc", 0, @{@"tags" : @[ @"foo", @1, @YES ]}, FSTDocumentStateSynced); NSArray *matchingFilters = @[ FSTTestFilter("tags", @"==", @[ @"foo", @1, @YES ]) ]; @@ -329,22 +317,13 @@ - (void)testFiltersBasedOnArrayValue { - (void)testFiltersBasedOnObjectValue { FSTQuery *baseQuery = FSTTestQuery("collection"); - FSTDocument *doc1 = - FSTTestDoc("collection/doc", 0, - @{@"tags" : @{@"foo" : @"foo", @"a" : @0, @"b" : @YES, @"c" : @(NAN)}}, - FSTDocumentStateSynced); + FSTDocument *doc1 = FSTTestDoc( + "collection/doc", 0, @{@"tags" : @{@"foo" : @"foo", @"a" : @0, @"b" : @YES, @"c" : @(NAN)}}, + FSTDocumentStateSynced); NSArray *matchingFilters = @[ - FSTTestFilter("tags", @"==", - @{@"foo" : @"foo", - @"a" : @0, - @"b" : @YES, - @"c" : @(NAN)}), - FSTTestFilter("tags", @"==", - @{@"b" : @YES, - @"a" : @0, - @"foo" : @"foo", - @"c" : @(NAN)}), + FSTTestFilter("tags", @"==", @{@"foo" : @"foo", @"a" : @0, @"b" : @YES, @"c" : @(NAN)}), + FSTTestFilter("tags", @"==", @{@"b" : @YES, @"a" : @0, @"foo" : @"foo", @"c" : @(NAN)}), FSTTestFilter("tags.foo", @"==", @"foo") ]; diff --git a/Firestore/Example/Tests/Core/FSTViewTests.mm b/Firestore/Example/Tests/Core/FSTViewTests.mm index 770028ffaeb..759d7940669 100644 --- a/Firestore/Example/Tests/Core/FSTViewTests.mm +++ b/Firestore/Example/Tests/Core/FSTViewTests.mm @@ -143,16 +143,16 @@ - (void)testFiltersDocumentsBasedOnQueryWithFilter { query = [query queryByAddingFilter:filter]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"sort" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"sort" : @2}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/3", 0, - @{@"sort" : @3}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"sort" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"sort" : @2}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/3", 0, @{@"sort" : @3}, FSTDocumentStateSynced); FSTDocument *doc4 = FSTTestDoc("rooms/eros/messages/4", 0, @{}, FSTDocumentStateSynced); // no sort, no match - FSTDocument *doc5 = FSTTestDoc("rooms/eros/messages/5", 0, - @{@"sort" : @1}, FSTDocumentStateSynced); + FSTDocument *doc5 = + FSTTestDoc("rooms/eros/messages/5", 0, @{@"sort" : @1}, FSTDocumentStateSynced); FSTViewSnapshot *snapshot = FSTTestApplyChanges(view, @[ doc1, doc2, doc3, doc4, doc5 ], nil); @@ -180,12 +180,12 @@ - (void)testUpdatesDocumentsBasedOnQueryWithFilter { query = [query queryByAddingFilter:filter]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"sort" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"sort" : @3}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/3", 0, - @{@"sort" : @2}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"sort" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"sort" : @3}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/3", 0, @{@"sort" : @2}, FSTDocumentStateSynced); FSTDocument *doc4 = FSTTestDoc("rooms/eros/messages/4", 0, @{}, FSTDocumentStateSynced); FSTViewSnapshot *snapshot = FSTTestApplyChanges(view, @[ doc1, doc2, doc3, doc4 ], nil); @@ -194,12 +194,12 @@ - (void)testUpdatesDocumentsBasedOnQueryWithFilter { XCTAssertEqualObjects(snapshot.documents.arrayValue, (@[ doc1, doc3 ])); - FSTDocument *newDoc2 = FSTTestDoc("rooms/eros/messages/2", 1, - @{@"sort" : @2}, FSTDocumentStateSynced); - FSTDocument *newDoc3 = FSTTestDoc("rooms/eros/messages/3", 1, - @{@"sort" : @3}, FSTDocumentStateSynced); - FSTDocument *newDoc4 = FSTTestDoc("rooms/eros/messages/4", 1, - @{@"sort" : @0}, FSTDocumentStateSynced); + FSTDocument *newDoc2 = + FSTTestDoc("rooms/eros/messages/2", 1, @{@"sort" : @2}, FSTDocumentStateSynced); + FSTDocument *newDoc3 = + FSTTestDoc("rooms/eros/messages/3", 1, @{@"sort" : @3}, FSTDocumentStateSynced); + FSTDocument *newDoc4 = + FSTTestDoc("rooms/eros/messages/4", 1, @{@"sort" : @0}, FSTDocumentStateSynced); snapshot = FSTTestApplyChanges(view, @[ newDoc2, newDoc3, newDoc4 ], nil); @@ -258,14 +258,14 @@ - (void)testDoesntReportChangesForDocumentBeyondLimitOfQuery { query = [query queryBySettingLimit:2]; FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"num" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"num" : @2}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/3", 0, - @{@"num" : @3}, FSTDocumentStateSynced); - FSTDocument *doc4 = FSTTestDoc("rooms/eros/messages/4", 0, - @{@"num" : @4}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"num" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"num" : @2}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/3", 0, @{@"num" : @3}, FSTDocumentStateSynced); + FSTDocument *doc4 = + FSTTestDoc("rooms/eros/messages/4", 0, @{@"num" : @4}, FSTDocumentStateSynced); // initial state FSTTestApplyChanges(view, @[ doc1, doc2 ], nil); @@ -315,15 +315,15 @@ - (void)testKeepsTrackOfLimboDocuments { change = [view applyChangesToDocuments:[view computeChangesWithDocuments:FSTTestDocUpdates(@[])] targetChange:FSTTestTargetChangeMarkCurrent()]; - XCTAssertEqualObjects( - change.limboChanges, - @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeAdded key:doc1.key] ]); + XCTAssertEqualObjects(change.limboChanges, + @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeAdded + key:doc1.key] ]); change = [view applyChangesToDocuments:[view computeChangesWithDocuments:FSTTestDocUpdates(@[])] targetChange:FSTTestTargetChangeAckDocuments({doc1.key})]; - XCTAssertEqualObjects( - change.limboChanges, - @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeRemoved key:doc1.key] ]); + XCTAssertEqualObjects(change.limboChanges, + @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeRemoved + key:doc1.key] ]); change = [view applyChangesToDocuments:[view computeChangesWithDocuments:FSTTestDocUpdates(@[ doc2 ])] @@ -332,16 +332,16 @@ - (void)testKeepsTrackOfLimboDocuments { change = [view applyChangesToDocuments:[view computeChangesWithDocuments:FSTTestDocUpdates(@[ doc3 ])]]; - XCTAssertEqualObjects( - change.limboChanges, - @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeAdded key:doc3.key] ]); + XCTAssertEqualObjects(change.limboChanges, + @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeAdded + key:doc3.key] ]); change = [view applyChangesToDocuments:[view computeChangesWithDocuments:FSTTestDocUpdates(@[ FSTTestDeletedDoc("rooms/eros/messages/2", 1, NO) ])]]; // remove - XCTAssertEqualObjects( - change.limboChanges, - @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeRemoved key:doc3.key] ]); + XCTAssertEqualObjects(change.limboChanges, + @[ [FSTLimboDocumentChange changeWithType:FSTLimboDocumentChangeTypeRemoved + key:doc3.key] ]); } - (void)testResumingQueryCreatesNoLimbos { @@ -352,12 +352,12 @@ - (void)testResumingQueryCreatesNoLimbos { // Unlike other cases, here the view is initialized with a set of previously synced documents // which happens when listening to a previously listened-to query. - FSTView *view = - [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{doc1.key, doc2.key}]; + FSTView *view = [[FSTView alloc] initWithQuery:query + remoteDocuments:DocumentKeySet{doc1.key, doc2.key}]; FSTViewDocumentChanges *changes = [view computeChangesWithDocuments:FSTTestDocUpdates(@[])]; - FSTViewChange *change = - [view applyChangesToDocuments:changes targetChange:FSTTestTargetChangeMarkCurrent()]; + FSTViewChange *change = [view applyChangesToDocuments:changes + targetChange:FSTTestTargetChangeMarkCurrent()]; XCTAssertEqualObjects(change.limboChanges, @[]); } @@ -402,12 +402,12 @@ - (void)testReturnsNeedsRefillOnReorderInLimitQuery { [query queryByAddingSortOrder:[FSTSortOrder sortOrderWithFieldPath:testutil::Field("order") ascending:YES]]; query = [query queryBySettingLimit:2]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/0", 0, - @{@"order" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"order" : @2}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"order" : @3}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/0", 0, @{@"order" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"order" : @2}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"order" : @3}, FSTDocumentStateSynced); FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; // Start with a full view. @@ -439,16 +439,16 @@ - (void)testDoesntNeedRefillOnReorderWithinLimit { [query queryByAddingSortOrder:[FSTSortOrder sortOrderWithFieldPath:testutil::Field("order") ascending:YES]]; query = [query queryBySettingLimit:3]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/0", 0, - @{@"order" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"order" : @2}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"order" : @3}, FSTDocumentStateSynced); - FSTDocument *doc4 = FSTTestDoc("rooms/eros/messages/3", 0, - @{@"order" : @4}, FSTDocumentStateSynced); - FSTDocument *doc5 = FSTTestDoc("rooms/eros/messages/4", 0, - @{@"order" : @5}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/0", 0, @{@"order" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"order" : @2}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"order" : @3}, FSTDocumentStateSynced); + FSTDocument *doc4 = + FSTTestDoc("rooms/eros/messages/3", 0, @{@"order" : @4}, FSTDocumentStateSynced); + FSTDocument *doc5 = + FSTTestDoc("rooms/eros/messages/4", 0, @{@"order" : @5}, FSTDocumentStateSynced); FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; // Start with a full view. @@ -474,16 +474,16 @@ - (void)testDoesntNeedRefillOnReorderAfterLimitQuery { [query queryByAddingSortOrder:[FSTSortOrder sortOrderWithFieldPath:testutil::Field("order") ascending:YES]]; query = [query queryBySettingLimit:3]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/0", 0, - @{@"order" : @1}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/1", 0, - @{@"order" : @2}, FSTDocumentStateSynced); - FSTDocument *doc3 = FSTTestDoc("rooms/eros/messages/2", 0, - @{@"order" : @3}, FSTDocumentStateSynced); - FSTDocument *doc4 = FSTTestDoc("rooms/eros/messages/3", 0, - @{@"order" : @4}, FSTDocumentStateSynced); - FSTDocument *doc5 = FSTTestDoc("rooms/eros/messages/4", 0, - @{@"order" : @5}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/0", 0, @{@"order" : @1}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/1", 0, @{@"order" : @2}, FSTDocumentStateSynced); + FSTDocument *doc3 = + FSTTestDoc("rooms/eros/messages/2", 0, @{@"order" : @3}, FSTDocumentStateSynced); + FSTDocument *doc4 = + FSTTestDoc("rooms/eros/messages/3", 0, @{@"order" : @4}, FSTDocumentStateSynced); + FSTDocument *doc5 = + FSTTestDoc("rooms/eros/messages/4", 0, @{@"order" : @5}, FSTDocumentStateSynced); FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; // Start with a full view. @@ -665,18 +665,18 @@ - (void)testSuppressesWriteAcknowledgementIfWatchHasNotCaughtUp { // up. FSTQuery *query = [self queryForMessages]; - FSTDocument *doc1 = FSTTestDoc("rooms/eros/messages/1", 1, - @{@"time" : @1}, FSTDocumentStateLocalMutations); - FSTDocument *doc1Committed = FSTTestDoc("rooms/eros/messages/1", 2, - @{@"time" : @2}, FSTDocumentStateCommittedMutations); - FSTDocument *doc1Acknowledged = FSTTestDoc("rooms/eros/messages/1", 2, - @{@"time" : @2}, FSTDocumentStateSynced); - FSTDocument *doc2 = FSTTestDoc("rooms/eros/messages/2", 1, - @{@"time" : @1}, FSTDocumentStateLocalMutations); - FSTDocument *doc2Modified = FSTTestDoc("rooms/eros/messages/2", 2, - @{@"time" : @3}, FSTDocumentStateLocalMutations); - FSTDocument *doc2Acknowledged = FSTTestDoc("rooms/eros/messages/2", 2, - @{@"time" : @3}, FSTDocumentStateSynced); + FSTDocument *doc1 = + FSTTestDoc("rooms/eros/messages/1", 1, @{@"time" : @1}, FSTDocumentStateLocalMutations); + FSTDocument *doc1Committed = + FSTTestDoc("rooms/eros/messages/1", 2, @{@"time" : @2}, FSTDocumentStateCommittedMutations); + FSTDocument *doc1Acknowledged = + FSTTestDoc("rooms/eros/messages/1", 2, @{@"time" : @2}, FSTDocumentStateSynced); + FSTDocument *doc2 = + FSTTestDoc("rooms/eros/messages/2", 1, @{@"time" : @1}, FSTDocumentStateLocalMutations); + FSTDocument *doc2Modified = + FSTTestDoc("rooms/eros/messages/2", 2, @{@"time" : @3}, FSTDocumentStateLocalMutations); + FSTDocument *doc2Acknowledged = + FSTTestDoc("rooms/eros/messages/2", 2, @{@"time" : @3}, FSTDocumentStateSynced); FSTView *view = [[FSTView alloc] initWithQuery:query remoteDocuments:DocumentKeySet{}]; FSTViewDocumentChanges *changes = [view computeChangesWithDocuments:FSTTestDocUpdates(@[ doc1, doc2 ])]; diff --git a/Firestore/Example/Tests/Integration/API/FIRArrayTransformTests.mm b/Firestore/Example/Tests/Integration/API/FIRArrayTransformTests.mm index 0867a373941..6fd4046ddaa 100644 --- a/Firestore/Example/Tests/Integration/API/FIRArrayTransformTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRArrayTransformTests.mm @@ -75,9 +75,7 @@ - (void)writeInitialData:(NSDictionary *)data { - (void)testCreateDocumentWithArrayUnion { [self writeDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]]}]; id expected = @{@"array" : @[ @1, @2 ]}; XCTAssertEqualObjects([_accumulator awaitLocalEvent].data, expected); XCTAssertEqualObjects([_accumulator awaitRemoteEvent].data, expected); @@ -87,9 +85,7 @@ - (void)testAppendToArrayViaUpdate { [self writeInitialData:@{@"array" : @[ @1, @3 ]}]; [self updateDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @2, @1, @4 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @2, @1, @4 ]]}]; id expected = @{@"array" : @[ @1, @3, @2, @4 ]}; XCTAssertEqualObjects([_accumulator awaitLocalEvent].data, expected); @@ -100,9 +96,7 @@ - (void)testAppendToArrayViaMergeSet { [self writeInitialData:@{@"array" : @[ @1, @3 ]}]; [self mergeDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @2, @1, @4 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @2, @1, @4 ]]}]; id expected = @{@"array" : @[ @1, @3, @2, @4 ]}; XCTAssertEqualObjects([_accumulator awaitLocalEvent].data, expected); @@ -127,9 +121,7 @@ - (void)testRemoveFromArrayViaUpdate { [self writeInitialData:@{@"array" : @[ @1, @3, @1, @3 ]}]; [self updateDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @4 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @4 ]]}]; id expected = @{@"array" : @[ @3, @3 ]}; XCTAssertEqualObjects([_accumulator awaitLocalEvent].data, expected); @@ -140,9 +132,7 @@ - (void)testRemoveFromArrayViaMergeSet { [self writeInitialData:@{@"array" : @[ @1, @3, @1, @3 ]}]; [self mergeDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @4 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @4 ]]}]; id expected = @{@"array" : @[ @3, @3 ]}; XCTAssertEqualObjects([_accumulator awaitLocalEvent].data, expected); @@ -203,9 +193,7 @@ - (FIRDocumentSnapshot *_Nullable)getFromCache { - (void)testServerApplicationOfSetWithNoCachedBaseDoc { [self writeDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]]}]; id expected = @{@"array" : @[ @1, @2 ]}; XCTAssertEqualObjects([self getFromCache].data, expected); } @@ -213,14 +201,10 @@ - (void)testServerApplicationOfSetWithNoCachedBaseDoc { - (void)testServerApplicationOfUpdateWithNoCachedBaseDoc { // Write an initial document out-of-band so it's not in our cache [self writeDocumentRef:[[self firestore] documentWithPath:_docRef.path] - data:@{ - @"array" : @[ @42 ] - }]; + data:@{@"array" : @[ @42 ]}]; [self updateDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]]}]; // Nothing should be cached since it was an update and we had no base doc. XCTAssertNil([self getFromCache]); @@ -229,14 +213,10 @@ - (void)testServerApplicationOfUpdateWithNoCachedBaseDoc { - (void)testServerApplicationOfMergeSetWithNoCachedBaseDoc { // Write an initial document out-of-band so it's not in our cache [self writeDocumentRef:[[self firestore] documentWithPath:_docRef.path] - data:@{ - @"array" : @[ @42 ] - }]; + data:@{@"array" : @[ @42 ]}]; [self mergeDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]]}]; // Document will be cached but we'll be missing 42. id expected = @{@"array" : @[ @1, @2 ]}; @@ -248,9 +228,7 @@ - (void)testServerApplicationOfArrayUnionUpdateWithCachedBaseDoc { [self writeDocumentRef:_docRef data:@{@"array" : @[ @42 ]}]; [self updateDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @2 ]]}]; // Should have merged the update with the cached doc. id expected = @{@"array" : @[ @42, @1, @2 ]}; @@ -262,9 +240,7 @@ - (void)testServerApplicationOfArrayRemoveUpdateWithCachedBaseDoc { [self writeDocumentRef:_docRef data:@{@"array" : @[ @42, @1, @2 ]}]; [self updateDocumentRef:_docRef - data:@{ - @"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @2 ]] - }]; + data:@{@"array" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @2 ]]}]; // Should have merged the update with the cached doc. id expected = @{@"array" : @[ @42 ]}; diff --git a/Firestore/Example/Tests/Integration/API/FIRCursorTests.mm b/Firestore/Example/Tests/Integration/API/FIRCursorTests.mm index baf09077e76..4302d793cf7 100644 --- a/Firestore/Example/Tests/Integration/API/FIRCursorTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRCursorTests.mm @@ -71,21 +71,13 @@ - (void)testCanBeCreatedFromDocuments { XCTAssertTrue(snapshot.exists); FIRQuerySnapshot *querySnapshot = [self readDocumentSetForRef:[query queryStartingAtDocument:snapshot]]; - XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), (@[ - @{@"v" : @"c", - @"sort" : @2.0}, - @{@"v" : @"d", - @"sort" : @2.0} - ])); + XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), + (@[ @{@"v" : @"c", @"sort" : @2.0}, @{@"v" : @"d", @"sort" : @2.0} ])); querySnapshot = [self readDocumentSetForRef:[query queryEndingBeforeDocument:snapshot]]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), (@[ - @{@"v" : @"e", - @"sort" : @0.0}, - @{@"v" : @"a", - @"sort" : @1.0}, - @{@"v" : @"b", - @"sort" : @2.0} + @{@"v" : @"e", @"sort" : @0.0}, @{@"v" : @"a", @"sort" : @1.0}, + @{@"v" : @"b", @"sort" : @2.0} ])); } @@ -103,21 +95,13 @@ - (void)testCanBeCreatedFromValues { FIRQuerySnapshot *querySnapshot = [self readDocumentSetForRef:[query queryStartingAtValues:@[ @2.0 ]]]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), (@[ - @{@"v" : @"b", - @"sort" : @2.0}, - @{@"v" : @"c", - @"sort" : @2.0}, - @{@"v" : @"d", - @"sort" : @2.0} + @{@"v" : @"b", @"sort" : @2.0}, @{@"v" : @"c", @"sort" : @2.0}, + @{@"v" : @"d", @"sort" : @2.0} ])); querySnapshot = [self readDocumentSetForRef:[query queryEndingBeforeValues:@[ @2.0 ]]]; - XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), (@[ - @{@"v" : @"e", - @"sort" : @0.0}, - @{@"v" : @"a", - @"sort" : @1.0} - ])); + XCTAssertEqualObjects(FIRQuerySnapshotGetData(querySnapshot), + (@[ @{@"v" : @"e", @"sort" : @0.0}, @{@"v" : @"a", @"sort" : @1.0} ])); } - (void)testCanBeCreatedUsingDocumentId { @@ -178,14 +162,8 @@ - (void)testCanBeUsedInDescendingQueries { FIRQuerySnapshot *snapshot = [self readDocumentSetForRef:[query queryStartingAtValues:@[ @2.0 ]]]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(snapshot), (@[ - @{@"v" : @"c", - @"sort" : @2.0}, - @{@"v" : @"b", - @"sort" : @2.0}, - @{@"v" : @"a", - @"sort" : @1.0}, - @{@"v" : @"e", - @"sort" : @0.0} + @{@"v" : @"c", @"sort" : @2.0}, @{@"v" : @"b", @"sort" : @2.0}, + @{@"v" : @"a", @"sort" : @1.0}, @{@"v" : @"e", @"sort" : @0.0} ])); snapshot = [self readDocumentSetForRef:[query queryEndingBeforeValues:@[ @2.0 ]]]; @@ -256,14 +234,14 @@ - (void)testTimestampsAreTruncatedToMicroseconds { // Because Timestamp should have been truncated to microseconds, the microsecond timestamp // should be considered equal to the nanosecond one. - querySnapshot = - [self readDocumentSetForRef:[testCollection queryWhereField:@"timestamp" isEqualTo:micros]]; + querySnapshot = [self readDocumentSetForRef:[testCollection queryWhereField:@"timestamp" + isEqualTo:micros]]; XCTAssertEqualObjects(FIRQuerySnapshotGetIDs(querySnapshot), (@[ @"a" ])); // The truncation is just to the microseconds, however, so the millisecond timestamp should be // treated as different and thus the query should return no results. - querySnapshot = - [self readDocumentSetForRef:[testCollection queryWhereField:@"timestamp" isEqualTo:millis]]; + querySnapshot = [self readDocumentSetForRef:[testCollection queryWhereField:@"timestamp" + isEqualTo:millis]]; XCTAssertEqualObjects(FIRQuerySnapshotGetIDs(querySnapshot), (@[])); } diff --git a/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm b/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm index 487dc04ac8b..6782563908e 100644 --- a/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRDatabaseTests.mm @@ -33,13 +33,11 @@ @implementation FIRDatabaseTests - (void)testCanUpdateAnExistingDocument { FIRDocumentReference *doc = [self.db documentWithPath:@"rooms/eros"]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *updateData = @{@"desc" : @"NewDescription", @"owner.email" : @"new@xyz.com"}; NSDictionary *finalData = - @{@"desc" : @"NewDescription", - @"owner" : @{@"name" : @"Jonny", @"email" : @"new@xyz.com"}}; + @{@"desc" : @"NewDescription", @"owner" : @{@"name" : @"Jonny", @"email" : @"new@xyz.com"}}; [self writeDocumentRef:doc data:initialData]; @@ -62,8 +60,8 @@ - (void)testCanUpdateAnUnknownDocument { [self writeDocumentRef:writerRef data:@{@"a" : @"a"}]; [self updateDocumentRef:readerRef data:@{@"b" : @"b"}]; - FIRDocumentSnapshot *writerSnap = - [self readDocumentForRef:writerRef source:FIRFirestoreSourceCache]; + FIRDocumentSnapshot *writerSnap = [self readDocumentForRef:writerRef + source:FIRFirestoreSourceCache]; XCTAssertTrue(writerSnap.exists); XCTestExpectation *expectation = @@ -85,13 +83,11 @@ - (void)testCanUpdateAnUnknownDocument { - (void)testCanDeleteAFieldWithAnUpdate { FIRDocumentReference *doc = [self.db documentWithPath:@"rooms/eros"]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *updateData = @{@"owner.email" : [FIRFieldValue fieldValueForDelete]}; NSDictionary *finalData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny"}}; [self writeDocumentRef:doc data:initialData]; [self updateDocumentRef:doc data:updateData]; @@ -139,8 +135,7 @@ - (void)testCanOverwriteDataAnExistingDocumentUsingSet { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *udpateData = @{@"desc" : @"NewDescription"}; [self writeDocumentRef:doc data:initialData]; @@ -154,11 +149,9 @@ - (void)testCanMergeDataWithAnExistingDocumentUsingSet { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner.data" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner.data" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *mergeData = - @{@"updated" : @YES, - @"owner.data" : @{@"name" : @"Sebastian"}}; + @{@"updated" : @YES, @"owner.data" : @{@"name" : @"Sebastian"}}; NSDictionary *finalData = @{ @"desc" : @"Description", @"updated" : @YES, @@ -243,9 +236,7 @@ - (void)testCanDeleteFieldUsingMerge { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"untouched" : @YES, - @"foo" : @"bar", - @"nested" : @{@"untouched" : @YES, @"foo" : @"bar"}}; + @{@"untouched" : @YES, @"foo" : @"bar", @"nested" : @{@"untouched" : @YES, @"foo" : @"bar"}}; NSDictionary *mergeData = @{ @"foo" : [FIRFieldValue fieldValueForDelete], @"nested" : @{@"foo" : [FIRFieldValue fieldValueForDelete]} @@ -290,9 +281,7 @@ - (void)testCanDeleteFieldUsingMergeFields { } }; NSDictionary *finalData = - @{@"untouched" : @YES, - @"inner" : @{}, - @"nested" : @{@"untouched" : @YES}}; + @{@"untouched" : @YES, @"inner" : @{}, @"nested" : @{@"untouched" : @YES}}; [self writeDocumentRef:doc data:initialData]; @@ -316,9 +305,7 @@ - (void)testCanSetServerTimestampsUsingMergeFields { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"untouched" : @YES, - @"foo" : @"bar", - @"nested" : @{@"untouched" : @YES, @"foo" : @"bar"}}; + @{@"untouched" : @YES, @"foo" : @"bar", @"nested" : @{@"untouched" : @YES, @"foo" : @"bar"}}; NSDictionary *mergeData = @{ @"foo" : [FIRFieldValue fieldValueForServerTimestamp], @"inner" : @{@"foo" : [FIRFieldValue fieldValueForServerTimestamp]}, @@ -356,9 +343,7 @@ - (void)testMergeReplacesArrays { @"mapInArray" : @[ @{@"data" : @"old"} ] }; NSDictionary *mergeData = - @{@"data" : @"new", - @"topLevel" : @[ @"new" ], - @"mapInArray" : @[ @{@"data" : @"new"} ]}; + @{@"data" : @"new", @"topLevel" : @[ @"new" ], @"mapInArray" : @[ @{@"data" : @"new"} ]}; NSDictionary *finalData = @{ @"untouched" : @YES, @"data" : @"new", @@ -396,8 +381,7 @@ - (void)testCanSetASubsetOfFieldsUsingMask { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *finalData = @{@"desc" : @"Description", @"owner" : @"Sebastian"}; @@ -423,8 +407,7 @@ - (void)testDoesNotApplyFieldDeleteOutsideOfMask { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *finalData = @{@"desc" : @"Description", @"owner" : @"Sebastian"}; @@ -450,8 +433,7 @@ - (void)testDoesNotApplyFieldTransformOutsideOfMask { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *finalData = @{@"desc" : @"Description", @"owner" : @"Sebastian"}; @@ -477,8 +459,7 @@ - (void)testCanSetEmptyFieldMask { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *finalData = initialData; @@ -504,12 +485,10 @@ - (void)testCanSpecifyFieldsMultipleTimesInFieldMask { FIRDocumentReference *doc = [[self.db collectionWithPath:@"rooms"] documentWithAutoID]; NSDictionary *initialData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Jonny", @"email" : @"abc@xyz.com"}}; NSDictionary *finalData = - @{@"desc" : @"Description", - @"owner" : @{@"name" : @"Sebastian", @"email" : @"new@xyz.com"}}; + @{@"desc" : @"Description", @"owner" : @{@"name" : @"Sebastian", @"email" : @"new@xyz.com"}}; [self writeDocumentRef:doc data:initialData]; @@ -521,10 +500,10 @@ - (void)testCanSpecifyFieldsMultipleTimesInFieldMask { @"owner" : @{@"name" : @"Sebastian", @"email" : @"new@xyz.com"} } mergeFields:@[ @"owner.name", @"owner", @"owner" ] - completion:^(NSError *error) { - XCTAssertNil(error); - [completed fulfill]; - }]; + completion:^(NSError *error) { + XCTAssertNil(error); + [completed fulfill]; + }]; [self awaitExpectations]; diff --git a/Firestore/Example/Tests/Integration/API/FIRFieldsTests.mm b/Firestore/Example/Tests/Integration/API/FIRFieldsTests.mm index b4c40969e4b..4d1657a44cb 100644 --- a/Firestore/Example/Tests/Integration/API/FIRFieldsTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRFieldsTests.mm @@ -228,8 +228,7 @@ - (void)testFieldsWithSpecialCharsCanBeUsedInOrderBy { - (FIRDocumentSnapshot *)snapshotWithTimestamps:(FIRTimestamp *)timestamp { FIRDocumentReference *doc = [self documentRef]; NSDictionary *data = - @{@"timestamp" : timestamp, - @"nested" : @{@"timestamp2" : timestamp}}; + @{@"timestamp" : timestamp, @"nested" : @{@"timestamp2" : timestamp}}; [self writeDocumentRef:doc data:data]; return [self readDocumentForRef:doc]; } diff --git a/Firestore/Example/Tests/Integration/API/FIRQueryTests.mm b/Firestore/Example/Tests/Integration/API/FIRQueryTests.mm index 83127b550b5..da20d92ea26 100644 --- a/Firestore/Example/Tests/Integration/API/FIRQueryTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRQueryTests.mm @@ -47,15 +47,11 @@ - (void)testLimitQueriesWithDescendingSortOrder { }]; FIRQuerySnapshot *snapshot = - [self readDocumentSetForRef:[[collRef queryOrderedByField:@"sort" descending:YES] - queryLimitedTo:2]]; + [self readDocumentSetForRef:[[collRef queryOrderedByField:@"sort" + descending:YES] queryLimitedTo:2]]; - XCTAssertEqualObjects(FIRQuerySnapshotGetData(snapshot), (@[ - @{@"k" : @"d", - @"sort" : @2}, - @{@"k" : @"c", - @"sort" : @1} - ])); + XCTAssertEqualObjects(FIRQuerySnapshotGetData(snapshot), + (@[ @{@"k" : @"d", @"sort" : @2}, @{@"k" : @"c", @"sort" : @1} ])); } - (void)testKeyOrderIsDescendingForDescendingInequality { @@ -69,9 +65,9 @@ - (void)testKeyOrderIsDescendingForDescendingInequality { @"g" : @{@"foo" : @66.0}, }]; FIRQuerySnapshot *snapshot = - [self readDocumentSetForRef:[[collRef queryWhereField:@"foo" isGreaterThan:@21] - queryOrderedByField:@"foo" - descending:YES]]; + [self readDocumentSetForRef:[[collRef queryWhereField:@"foo" + isGreaterThan:@21] queryOrderedByField:@"foo" + descending:YES]]; XCTAssertEqualObjects(FIRQuerySnapshotGetIDs(snapshot), (@[ @"g", @"f", @"c", @"b", @"a" ])); } @@ -83,25 +79,20 @@ - (void)testUnaryFilterQueries { }]; FIRQuerySnapshot *results = - [self readDocumentSetForRef:[[collRef queryWhereField:@"null" isEqualTo:[NSNull null]] - queryWhereField:@"nan" - isEqualTo:@(NAN)]]; + [self readDocumentSetForRef:[[collRef queryWhereField:@"null" + isEqualTo:[NSNull null]] queryWhereField:@"nan" + isEqualTo:@(NAN)]]; - XCTAssertEqualObjects(FIRQuerySnapshotGetData(results), (@[ - @{@"null" : [NSNull null], - @"nan" : @(NAN)} - ])); + XCTAssertEqualObjects(FIRQuerySnapshotGetData(results), + (@[ @{@"null" : [NSNull null], @"nan" : @(NAN)} ])); } - (void)testQueryWithFieldPaths { - FIRCollectionReference *collRef = [self collectionRefWithDocuments:@{ - @"a" : @{@"a" : @1}, - @"b" : @{@"a" : @2}, - @"c" : @{@"a" : @3} - }]; + FIRCollectionReference *collRef = [self + collectionRefWithDocuments:@{@"a" : @{@"a" : @1}, @"b" : @{@"a" : @2}, @"c" : @{@"a" : @3}}]; - FIRQuery *query = - [collRef queryWhereFieldPath:[[FIRFieldPath alloc] initWithFields:@[ @"a" ]] isLessThan:@3]; + FIRQuery *query = [collRef queryWhereFieldPath:[[FIRFieldPath alloc] initWithFields:@[ @"a" ]] + isLessThan:@3]; query = [query queryOrderedByFieldPath:[[FIRFieldPath alloc] initWithFields:@[ @"a" ]] descending:YES]; @@ -111,11 +102,8 @@ - (void)testQueryWithFieldPaths { } - (void)testQueryWithPredicate { - FIRCollectionReference *collRef = [self collectionRefWithDocuments:@{ - @"a" : @{@"a" : @1}, - @"b" : @{@"a" : @2}, - @"c" : @{@"a" : @3} - }]; + FIRCollectionReference *collRef = [self + collectionRefWithDocuments:@{@"a" : @{@"a" : @1}, @"b" : @{@"a" : @2}, @"c" : @{@"a" : @3}}]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"a < 3"]; FIRQuery *query = [collRef queryFilteredUsingPredicate:predicate]; @@ -133,8 +121,8 @@ - (void)testFilterOnInfinity { @"b" : @{@"inf" : @(-INFINITY)} }]; - FIRQuerySnapshot *results = - [self readDocumentSetForRef:[collRef queryWhereField:@"inf" isEqualTo:@(INFINITY)]]; + FIRQuerySnapshot *results = [self readDocumentSetForRef:[collRef queryWhereField:@"inf" + isEqualTo:@(INFINITY)]]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(results), (@[ @{@"inf" : @(INFINITY)} ])); } @@ -289,20 +277,17 @@ - (void)testArrayContainsQueries { NSDictionary *testDocs = @{ @"a" : @{@"array" : @[ @42 ]}, @"b" : @{@"array" : @[ @"a", @42, @"c" ]}, - @"c" : @{@"array" : @[ @41.999, @"42", - @{@"a" : @[ @42 ]} ]}, + @"c" : @{@"array" : @[ @41.999, @"42", @{@"a" : @[ @42 ]} ]}, @"d" : @{@"array" : @[ @42 ], @"array2" : @[ @"bingo" ]} }; FIRCollectionReference *collection = [self collectionRefWithDocuments:testDocs]; // Search for 42 - FIRQuerySnapshot *snapshot = - [self readDocumentSetForRef:[collection queryWhereField:@"array" arrayContains:@42]]; + FIRQuerySnapshot *snapshot = [self readDocumentSetForRef:[collection queryWhereField:@"array" + arrayContains:@42]]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(snapshot), (@[ - @{@"array" : @[ @42 ]}, - @{@"array" : @[ @"a", @42, @"c" ]}, - @{@"array" : @[ @42 ], - @"array2" : @[ @"bingo" ]} + @{@"array" : @[ @42 ]}, @{@"array" : @[ @"a", @42, @"c" ]}, + @{@"array" : @[ @42 ], @"array2" : @[ @"bingo" ]} ])); // NOTE: The backend doesn't currently support null, NaN, objects, or arrays, so there isn't much diff --git a/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.mm b/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.mm index 4698bcdfd71..860c8aac9ee 100644 --- a/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRServerTimestampTests.mm @@ -97,8 +97,8 @@ - (void)verifyTimestampsAreNullInSnapshot:(FIRDocumentSnapshot *)snapshot { /** Verifies a snapshot containing _setData but with a local estimate for the timestamps. */ - (void)verifyTimestampsAreEstimatedInSnapshot:(FIRDocumentSnapshot *)snapshot { - id timestamp = - [snapshot valueForField:@"when" serverTimestampBehavior:FIRServerTimestampBehaviorEstimate]; + id timestamp = [snapshot valueForField:@"when" + serverTimestampBehavior:FIRServerTimestampBehaviorEstimate]; XCTAssertTrue([timestamp isKindOfClass:[FIRTimestamp class]]); XCTAssertEqualObjects( [snapshot dataWithServerTimestampBehavior:FIRServerTimestampBehaviorEstimate], @@ -190,20 +190,20 @@ - (void)testServerTimestampsWithPreviousValueOfDifferentType { [_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}]; FIRDocumentSnapshot *localSnapshot = [_accumulator awaitLocalEvent]; XCTAssertEqualObjects([localSnapshot valueForField:@"a"], [NSNull null]); - XCTAssertEqualObjects( - [localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], - @42); - XCTAssertTrue( - [[localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorEstimate] - isKindOfClass:[FIRTimestamp class]]); + XCTAssertEqualObjects([localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], + @42); + XCTAssertTrue([[localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorEstimate] + isKindOfClass:[FIRTimestamp class]]); FIRDocumentSnapshot *remoteSnapshot = [_accumulator awaitRemoteEvent]; XCTAssertTrue([[remoteSnapshot valueForField:@"a"] isKindOfClass:[FIRTimestamp class]]); - XCTAssertTrue([ - [remoteSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious] + XCTAssertTrue([[remoteSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious] isKindOfClass:[FIRTimestamp class]]); - XCTAssertTrue([ - [remoteSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorEstimate] + XCTAssertTrue([[remoteSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorEstimate] isKindOfClass:[FIRTimestamp class]]); } @@ -216,15 +216,15 @@ - (void)testServerTimestampsWithConsecutiveUpdates { [_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}]; FIRDocumentSnapshot *localSnapshot = [_accumulator awaitLocalEvent]; - XCTAssertEqualObjects( - [localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], - @42); + XCTAssertEqualObjects([localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], + @42); [_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}]; localSnapshot = [_accumulator awaitLocalEvent]; - XCTAssertEqualObjects( - [localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], - @42); + XCTAssertEqualObjects([localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], + @42); [self enableNetwork]; @@ -241,9 +241,9 @@ - (void)testServerTimestampsPreviousValueFromLocalMutation { [_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}]; FIRDocumentSnapshot *localSnapshot = [_accumulator awaitLocalEvent]; - XCTAssertEqualObjects( - [localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], - @42); + XCTAssertEqualObjects([localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], + @42); [_docRef updateData:@{@"a" : @1337}]; localSnapshot = [_accumulator awaitLocalEvent]; @@ -251,9 +251,9 @@ - (void)testServerTimestampsPreviousValueFromLocalMutation { [_docRef updateData:@{@"a" : [FIRFieldValue fieldValueForServerTimestamp]}]; localSnapshot = [_accumulator awaitLocalEvent]; - XCTAssertEqualObjects( - [localSnapshot valueForField:@"a" serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], - @1337); + XCTAssertEqualObjects([localSnapshot valueForField:@"a" + serverTimestampBehavior:FIRServerTimestampBehaviorPrevious], + @1337); [self enableNetwork]; diff --git a/Firestore/Example/Tests/Integration/API/FIRValidationTests.mm b/Firestore/Example/Tests/Integration/API/FIRValidationTests.mm index e5a6284d68d..b3a72f43ae7 100644 --- a/Firestore/Example/Tests/Integration/API/FIRValidationTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRValidationTests.mm @@ -99,9 +99,8 @@ - (void)testWrongLengthCollectionPathsFail { NSArray *badAbsolutePaths = @[ @"foo/bar", @"foo/bar/baz/quu" ]; NSArray *badRelativePaths = @[ @"", @"baz/quu" ]; NSArray *badPathLengths = @[ @2, @4 ]; - NSString *errorFormat = - @"Invalid collection reference. Collection references must have an odd " - @"number of segments, but %@ has %@"; + NSString *errorFormat = @"Invalid collection reference. Collection references must have an odd " + @"number of segments, but %@ has %@"; for (NSUInteger i = 0; i < badAbsolutePaths.count; i++) { NSString *error = [NSString stringWithFormat:errorFormat, badAbsolutePaths[i], badPathLengths[i]]; @@ -122,9 +121,8 @@ - (void)testWrongLengthDocumentPathsFail { NSArray *badAbsolutePaths = @[ @"foo", @"foo/bar/baz" ]; NSArray *badRelativePaths = @[ @"", @"bar/baz" ]; NSArray *badPathLengths = @[ @1, @3 ]; - NSString *errorFormat = - @"Invalid document reference. Document references must have an even " - @"number of segments, but %@ has %@"; + NSString *errorFormat = @"Invalid document reference. Document references must have an even " + @"number of segments, but %@ has %@"; for (NSUInteger i = 0; i < badAbsolutePaths.count; i++) { NSString *error = [NSString stringWithFormat:errorFormat, badAbsolutePaths[i], badPathLengths[i]]; @@ -164,9 +162,7 @@ - (void)testWritesWithNonDictionaryValuesFail { } - (void)testWritesWithDirectlyNestedArraysFail { - [self expectWrite:@{ - @"nested-array" : @[ @1, @[ @2 ] ] - } + [self expectWrite:@{@"nested-array" : @[ @1, @[ @2 ] ]} toFailWithReason:@"Nested arrays are not supported"]; } @@ -185,11 +181,11 @@ - (void)testWritesWithIndirectlyNestedArraysSucceed { [self awaitExpectations]; expectation = [self expectationWithDescription:@"batch.setData"]; - [[[ref.firestore batch] setData:data forDocument:ref] - commitWithCompletion:^(NSError *_Nullable error) { - XCTAssertNil(error); - [expectation fulfill]; - }]; + [[[ref.firestore batch] setData:data + forDocument:ref] commitWithCompletion:^(NSError *_Nullable error) { + XCTAssertNil(error); + [expectation fulfill]; + }]; [self awaitExpectations]; expectation = [self expectationWithDescription:@"updateData"]; @@ -201,11 +197,11 @@ - (void)testWritesWithIndirectlyNestedArraysSucceed { [self awaitExpectations]; expectation = [self expectationWithDescription:@"batch.updateData"]; - [[[ref.firestore batch] updateData:data forDocument:ref] - commitWithCompletion:^(NSError *_Nullable error) { - XCTAssertNil(error); - [expectation fulfill]; - }]; + [[[ref.firestore batch] updateData:data + forDocument:ref] commitWithCompletion:^(NSError *_Nullable error) { + XCTAssertNil(error); + [expectation fulfill]; + }]; [self awaitExpectations]; XCTestExpectation *transactionDone = [self expectationWithDescription:@"transaction done"]; @@ -225,9 +221,7 @@ - (void)testWritesWithIndirectlyNestedArraysSucceed { } - (void)testWritesWithInvalidTypesFail { - [self expectWrite:@{ - @"foo" : @{@"bar" : self} - } + [self expectWrite:@{@"foo" : @{@"bar" : self}} toFailWithReason:@"Unsupported type: FIRValidationTests (found in field foo.bar)"]; } @@ -251,50 +245,34 @@ - (void)testWritesWithReferencesToADifferentDatabaseFail { } - (void)testWritesWithReservedFieldsFail { - [self expectWrite:@{ - @"__baz__" : @1 - } + [self expectWrite:@{@"__baz__" : @1} toFailWithReason:@"Document fields cannot begin and end with __ (found in field __baz__)"]; - [self expectWrite:@{ - @"foo" : @{@"__baz__" : @1} - } + [self expectWrite:@{@"foo" : @{@"__baz__" : @1}} toFailWithReason: @"Document fields cannot begin and end with __ (found in field foo.__baz__)"]; - [self expectWrite:@{ - @"__baz__" : @{@"foo" : @1} - } + [self expectWrite:@{@"__baz__" : @{@"foo" : @1}} toFailWithReason:@"Document fields cannot begin and end with __ (found in field __baz__)"]; - [self expectUpdate:@{ - @"foo.__baz__" : @1 - } + [self expectUpdate:@{@"foo.__baz__" : @1} toFailWithReason: @"Document fields cannot begin and end with __ (found in field foo.__baz__)"]; - [self expectUpdate:@{ - @"__baz__.foo" : @1 - } + [self expectUpdate:@{@"__baz__.foo" : @1} toFailWithReason: @"Document fields cannot begin and end with __ (found in field __baz__.foo)"]; - [self expectUpdate:@{ - @1 : @1 - } + [self expectUpdate:@{@1 : @1} toFailWithReason:@"Dictionary keys in updateData: must be NSStrings or FIRFieldPaths."]; } - (void)testSetsWithFieldValueDeleteFail { [self expectSet:@{@"foo" : [FIRFieldValue fieldValueForDelete]} - toFailWithReason: - @"FieldValue.delete() can only be used with updateData() and setData() with " - @"merge:true (found in field foo)"]; + toFailWithReason:@"FieldValue.delete() can only be used with updateData() and setData() with " + @"merge:true (found in field foo)"]; } - (void)testUpdatesWithNestedFieldValueDeleteFail { - [self expectUpdate:@{ - @"foo" : @{@"bar" : [FIRFieldValue fieldValueForDelete]} - } - toFailWithReason: - @"FieldValue.delete() can only appear at the top level of your update data " - "(found in field foo.bar)"]; + [self expectUpdate:@{@"foo" : @{@"bar" : [FIRFieldValue fieldValueForDelete]}} + toFailWithReason:@"FieldValue.delete() can only appear at the top level of your update data " + "(found in field foo.bar)"]; } - (void)testBatchWritesWithIncorrectReferencesFail { @@ -347,10 +325,9 @@ - (void)testFieldPathsWithEmptySegmentsFail { for (NSString *fieldPath in badFieldPaths) { NSString *reason = - [NSString stringWithFormat: - @"Invalid field path (%@). Paths must not be empty, begin with " - @"'.', end with '.', or contain '..'", - fieldPath]; + [NSString stringWithFormat:@"Invalid field path (%@). Paths must not be empty, begin with " + @"'.', end with '.', or contain '..'", + fieldPath]; [self expectFieldPath:fieldPath toFailWithReason:reason]; } } @@ -371,44 +348,34 @@ - (void)testFieldPathsWithInvalidSegmentsFail { - (void)testArrayTransformsInQueriesFail { FSTAssertThrows( - [[self collectionRef] queryWhereField:@"test" - isEqualTo:@{ - @"test" : [FIRFieldValue fieldValueForArrayUnion:@[ @1 ]] - }], + [[self collectionRef] + queryWhereField:@"test" + isEqualTo:@{@"test" : [FIRFieldValue fieldValueForArrayUnion:@[ @1 ]]}], @"FieldValue.arrayUnion() can only be used with updateData() and setData() (found in field " "test)"); FSTAssertThrows( - [[self collectionRef] queryWhereField:@"test" - isEqualTo:@{ - @"test" : [FIRFieldValue fieldValueForArrayRemove:@[ @1 ]] - }], + [[self collectionRef] + queryWhereField:@"test" + isEqualTo:@{@"test" : [FIRFieldValue fieldValueForArrayRemove:@[ @1 ]]}], @"FieldValue.arrayRemove() can only be used with updateData() and setData() (found in field " @"test)"); } - (void)testInvalidArrayTransformElementFails { - [self expectWrite:@{ - @"foo" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, self ]] - } + [self expectWrite:@{@"foo" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, self ]]} toFailWithReason:@"Unsupported type: FIRValidationTests"]; - [self expectWrite:@{ - @"foo" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, self ]] - } + [self expectWrite:@{@"foo" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, self ]]} toFailWithReason:@"Unsupported type: FIRValidationTests"]; } - (void)testArraysInArrayTransformsFail { // This would result in a directly nested array which is not supported. - [self expectWrite:@{ - @"foo" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @[ @"nested" ] ]] - } + [self expectWrite:@{@"foo" : [FIRFieldValue fieldValueForArrayUnion:@[ @1, @[ @"nested" ] ]]} toFailWithReason:@"Nested arrays are not supported"]; - [self expectWrite:@{ - @"foo" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @[ @"nested" ] ]] - } + [self expectWrite:@{@"foo" : [FIRFieldValue fieldValueForArrayRemove:@[ @1, @[ @"nested" ] ]]} toFailWithReason:@"Nested arrays are not supported"]; } @@ -438,17 +405,15 @@ - (void)testNonEqualityQueriesOnNullOrNaNFail { } - (void)testQueryCannotBeCreatedFromDocumentsMissingSortValues { - FIRCollectionReference *testCollection = [self collectionRefWithDocuments:@{ - @"f" : @{@"v" : @"f", @"nosort" : @1.0} - }]; + FIRCollectionReference *testCollection = + [self collectionRefWithDocuments:@{@"f" : @{@"v" : @"f", @"nosort" : @1.0}}]; FIRQuery *query = [testCollection queryOrderedByField:@"sort"]; FIRDocumentSnapshot *snapshot = [self readDocumentForRef:[testCollection documentWithPath:@"f"]]; XCTAssertTrue(snapshot.exists); - NSString *reason = - @"Invalid query. You are trying to start or end a query using a document for " - "which the field 'sort' (used as the order by) does not exist."; + NSString *reason = @"Invalid query. You are trying to start or end a query using a document for " + "which the field 'sort' (used as the order by) does not exist."; FSTAssertThrows([query queryStartingAtDocument:snapshot], reason); FSTAssertThrows([query queryStartingAfterDocument:snapshot], reason); FSTAssertThrows([query queryEndingBeforeDocument:snapshot], reason); @@ -459,9 +424,8 @@ - (void)testQueryBoundMustNotHaveMoreComponentsThanSortOrders { FIRCollectionReference *testCollection = [self collectionRef]; FIRQuery *query = [testCollection queryOrderedByField:@"foo"]; - NSString *reason = - @"Invalid query. You are trying to start or end a query using more values " - "than were specified in the order by."; + NSString *reason = @"Invalid query. You are trying to start or end a query using more values " + "than were specified in the order by."; // More elements than order by FSTAssertThrows(([query queryStartingAtValues:@[ @1, @2 ]]), reason); FSTAssertThrows(([[query queryOrderedByField:@"bar"] queryStartingAtValues:@[ @1, @2, @3 ]]), @@ -491,20 +455,17 @@ - (void)testQueryMustNotSpecifyStartingOrEndingPointAfterOrder { - (void)testQueriesFilteredByDocumentIDMustUseStringsOrDocumentReferences { FIRCollectionReference *collection = [self collectionRef]; - NSString *reason = - @"Invalid query. When querying by document ID you must provide a valid " - "document ID, but it was an empty string."; + NSString *reason = @"Invalid query. When querying by document ID you must provide a valid " + "document ID, but it was an empty string."; FSTAssertThrows([collection queryWhereFieldPath:[FIRFieldPath documentID] isEqualTo:@""], reason); - reason = - @"Invalid query. When querying by document ID you must provide a valid document ID, " - "but 'foo/bar/baz' contains a '/' character."; + reason = @"Invalid query. When querying by document ID you must provide a valid document ID, " + "but 'foo/bar/baz' contains a '/' character."; FSTAssertThrows( [collection queryWhereFieldPath:[FIRFieldPath documentID] isEqualTo:@"foo/bar/baz"], reason); - reason = - @"Invalid query. When querying by document ID you must provide a valid string or " - "DocumentReference, but it was of type: __NSCFNumber"; + reason = @"Invalid query. When querying by document ID you must provide a valid string or " + "DocumentReference, but it was of type: __NSCFNumber"; FSTAssertThrows([collection queryWhereFieldPath:[FIRFieldPath documentID] isEqualTo:@1], reason); reason = @@ -560,9 +521,9 @@ - (void)testQueryInequalityFieldMustMatchFirstOrderByField { - (void)testQueryMustNotHaveMultipleArrayContainsFilters { FIRCollectionReference *coll = [self.db collectionWithPath:@"collection"]; - FSTAssertThrows( - [[coll queryWhereField:@"foo" arrayContains:@1] queryWhereField:@"foo" arrayContains:@2], - @"Invalid Query. Queries only support a single arrayContains filter."); + FSTAssertThrows([[coll queryWhereField:@"foo" arrayContains:@1] queryWhereField:@"foo" + arrayContains:@2], + @"Invalid Query. Queries only support a single arrayContains filter."); } #pragma mark - GeoPoint Validation diff --git a/Firestore/Example/Tests/Integration/API/FIRWriteBatchTests.mm b/Firestore/Example/Tests/Integration/API/FIRWriteBatchTests.mm index 7f2f98520a8..472b8ac565e 100644 --- a/Firestore/Example/Tests/Integration/API/FIRWriteBatchTests.mm +++ b/Firestore/Example/Tests/Integration/API/FIRWriteBatchTests.mm @@ -91,10 +91,7 @@ - (void)testSetDocumentWithMerge { FIRDocumentSnapshot *snapshot = [self readDocumentForRef:doc]; XCTAssertTrue(snapshot.exists); XCTAssertEqualObjects(snapshot.data, - ( - @{@"a" : @"b", - @"c" : @"d", - @"nested" : @{@"a" : @"b", @"c" : @"d"}})); + (@{@"a" : @"b", @"c" : @"d", @"nested" : @{@"a" : @"b", @"c" : @"d"}})); } - (void)testUpdateDocuments { @@ -251,10 +248,7 @@ - (void)testCanWriteTheSameDocumentMultipleTimes { FIRWriteBatch *batch = [doc.firestore batch]; [batch deleteDocument:doc]; [batch setData:@{@"a" : @1, @"b" : @1, @"when" : @"when"} forDocument:doc]; - [batch updateData:@{ - @"b" : @2, - @"when" : [FIRFieldValue fieldValueForServerTimestamp] - } + [batch updateData:@{@"b" : @2, @"when" : [FIRFieldValue fieldValueForServerTimestamp]} forDocument:doc]; [batch commitWithCompletion:^(NSError *_Nullable error) { XCTAssertNil(error); @@ -296,17 +290,11 @@ - (void)testUpdateNestedFields { XCTestExpectation *expectation = [self expectationWithDescription:@"testUpdateNestedFields"]; FIRWriteBatch *batch = [doc.firestore batch]; - [batch setData:@{ - @"a" : @{@"b" : @"old"}, - @"c" : @{@"d" : @"old"}, - @"e" : @{@"f" : @"old"} - } + [batch setData:@{@"a" : @{@"b" : @"old"}, @"c" : @{@"d" : @"old"}, @"e" : @{@"f" : @"old"}} + forDocument:doc]; + [batch + updateData:@{@"a.b" : @"new", [[FIRFieldPath alloc] initWithFields:@[ @"c", @"d" ]] : @"new"} forDocument:doc]; - [batch updateData:@{ - @"a.b" : @"new", - [[FIRFieldPath alloc] initWithFields:@[ @"c", @"d" ]] : @"new" - } - forDocument:doc]; [batch commitWithCompletion:^(NSError *_Nullable error) { XCTAssertNil(error); [doc getDocumentWithCompletion:^(FIRDocumentSnapshot *snapshot, NSError *error) { diff --git a/Firestore/Example/Tests/Integration/FSTSmokeTests.mm b/Firestore/Example/Tests/Integration/FSTSmokeTests.mm index cb726b86ad5..4b4920f013a 100644 --- a/Firestore/Example/Tests/Integration/FSTSmokeTests.mm +++ b/Firestore/Example/Tests/Integration/FSTSmokeTests.mm @@ -115,8 +115,8 @@ - (void)xtestQueryByFieldAndUseOrderBy { FIRCollectionReference *coll = [self collectionRefWithDocuments:testDocs]; - FIRQuery *query = - [[coll queryWhereField:@"filter" isEqualTo:@YES] queryOrderedByField:@"sort" descending:YES]; + FIRQuery *query = [[coll queryWhereField:@"filter" isEqualTo:@YES] queryOrderedByField:@"sort" + descending:YES]; FIRQuerySnapshot *result = [self readDocumentSetForRef:query]; XCTAssertEqualObjects(FIRQuerySnapshotGetData(result), (@[ testDocs[@"2"], testDocs[@"3"], testDocs[@"1"] ])); diff --git a/Firestore/Example/Tests/Integration/FSTTransactionTests.mm b/Firestore/Example/Tests/Integration/FSTTransactionTests.mm index d69bfca24ac..e5634113d56 100644 --- a/Firestore/Example/Tests/Integration/FSTTransactionTests.mm +++ b/Firestore/Example/Tests/Integration/FSTTransactionTests.mm @@ -221,10 +221,7 @@ - (void)testSetDocumentWithMerge { FIRDocumentSnapshot *snapshot = [self readDocumentForRef:doc]; XCTAssertEqualObjects(snapshot.data, - ( - @{@"a" : @"b", - @"c" : @"d", - @"nested" : @{@"a" : @"b", @"c" : @"d"}})); + (@{@"a" : @"b", @"c" : @"d", @"nested" : @{@"a" : @"b", @"c" : @"d"}})); } - (void)testCannotUpdateNonExistentDocument { diff --git a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm index adae5d01003..727244a9636 100644 --- a/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm +++ b/Firestore/Example/Tests/Local/FSTLRUGarbageCollectorTests.mm @@ -388,8 +388,8 @@ - (void)testRemoveQueriesUpThroughSequenceNumber { } // GC up through 20th query, which is 20%. // Expect to have GC'd 10 targets, since every other target is live - int removed = - [self removeQueriesThroughSequenceNumber:20 + _initialSequenceNumber liveQueries:liveQueries]; + int removed = [self removeQueriesThroughSequenceNumber:20 + _initialSequenceNumber + liveQueries:liveQueries]; XCTAssertEqual(10, removed); // Make sure we removed the even targets with targetID <= 20. _persistence.run("verify remaining targets are > 20 or odd", [&]() { diff --git a/Firestore/Example/Tests/Local/FSTLevelDBTransactionTests.mm b/Firestore/Example/Tests/Local/FSTLevelDBTransactionTests.mm index debf9a43e6f..3cae1e234ca 100644 --- a/Firestore/Example/Tests/Local/FSTLevelDBTransactionTests.mm +++ b/Firestore/Example/Tests/Local/FSTLevelDBTransactionTests.mm @@ -206,8 +206,9 @@ - (void)testProtobufSupport { std::string value; Status status = transaction.Get("theKey", &value); - NSData *result = - [[NSData alloc] initWithBytesNoCopy:(void *)value.data() length:value.size() freeWhenDone:NO]; + NSData *result = [[NSData alloc] initWithBytesNoCopy:(void *)value.data() + length:value.size() + freeWhenDone:NO]; NSError *error; FSTPBTarget *parsed = [FSTPBTarget parseFromData:result error:&error]; XCTAssertNil(error); @@ -292,17 +293,15 @@ - (void)testToString { transaction.Put(key, message); description = transaction.ToString(); - XCTAssertEqual(description, - ""); + XCTAssertEqual(description, ""); std::string key2 = LevelDbMutationKey::Key("user1", 43); transaction.Delete(key2); description = transaction.ToString(); - XCTAssertEqual(description, - ""); + XCTAssertEqual(description, ""); } @end diff --git a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm index 99d5600273a..538f6c61e86 100644 --- a/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalSerializerTests.mm @@ -80,12 +80,11 @@ - (void)setUp { - (void)testEncodesMutationBatch { FSTMutation *set = FSTTestSetMutation(@"foo/bar", @{@"a" : @"b", @"num" : @1}); - FSTMutation *patch = [[FSTPatchMutation alloc] initWithKey:FSTTestDocKey(@"bar/baz") - fieldMask:FieldMask{testutil::Field("a")} - value:FSTTestObjectValue( - @{@"a" : @"b", - @"num" : @1}) - precondition:Precondition::Exists(true)]; + FSTMutation *patch = + [[FSTPatchMutation alloc] initWithKey:FSTTestDocKey(@"bar/baz") + fieldMask:FieldMask{testutil::Field("a")} + value:FSTTestObjectValue(@{@"a" : @"b", @"num" : @1}) + precondition:Precondition::Exists(true)]; FSTMutation *del = FSTTestDeleteMutation(@"baz/quux"); FIRTimestamp *writeTime = [FIRTimestamp timestamp]; FSTMutationBatch *model = [[FSTMutationBatch alloc] initWithBatchID:42 diff --git a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm index 3caa80bf6ef..98635767d38 100644 --- a/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm +++ b/Firestore/Example/Tests/Local/FSTLocalStoreTests.mm @@ -84,8 +84,8 @@ - (void)setUp { id persistence = [self persistence]; self.localStorePersistence = persistence; - self.localStore = - [[FSTLocalStore alloc] initWithPersistence:persistence initialUser:User::Unauthenticated()]; + self.localStore = [[FSTLocalStore alloc] initWithPersistence:persistence + initialUser:User::Unauthenticated()]; [self.localStore start]; _batches = [NSMutableArray array]; @@ -141,8 +141,8 @@ - (void)acknowledgeMutationWithVersion:(FSTTestSnapshotVersion)documentVersion { [self.batches removeObjectAtIndex:0]; XCTAssertEqual(batch.mutations.count, 1, @"Acknowledging more than one mutation not supported."); SnapshotVersion version = testutil::Version(documentVersion); - FSTMutationResult *mutationResult = - [[FSTMutationResult alloc] initWithVersion:version transformResults:nil]; + FSTMutationResult *mutationResult = [[FSTMutationResult alloc] initWithVersion:version + transformResults:nil]; FSTMutationBatchResult *result = [FSTMutationBatchResult resultWithBatch:batch commitVersion:version mutationResults:@[ mutationResult ] diff --git a/Firestore/Example/Tests/Local/FSTMutationQueueTests.mm b/Firestore/Example/Tests/Local/FSTMutationQueueTests.mm index dec5ef8c2bb..aa6e61733ea 100644 --- a/Firestore/Example/Tests/Local/FSTMutationQueueTests.mm +++ b/Firestore/Example/Tests/Local/FSTMutationQueueTests.mm @@ -213,18 +213,10 @@ - (void)testAllMutationBatchesAffectingDocumentKey { self.persistence.run("testAllMutationBatchesAffectingDocumentKey", [&]() { NSArray *mutations = @[ - FSTTestSetMutation(@"foi/bar", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/bar", - @{@"a" : @1}), - FSTTestPatchMutation("foo/bar", - @{@"b" : @1}, {}), - FSTTestSetMutation(@"foo/bar/suffix/key", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/baz", - @{@"a" : @1}), - FSTTestSetMutation(@"food/bar", - @{@"a" : @1}) + FSTTestSetMutation(@"foi/bar", @{@"a" : @1}), FSTTestSetMutation(@"foo/bar", @{@"a" : @1}), + FSTTestPatchMutation("foo/bar", @{@"b" : @1}, {}), + FSTTestSetMutation(@"foo/bar/suffix/key", @{@"a" : @1}), + FSTTestSetMutation(@"foo/baz", @{@"a" : @1}), FSTTestSetMutation(@"food/bar", @{@"a" : @1}) ]; // Store all the mutations. @@ -249,18 +241,10 @@ - (void)testAllMutationBatchesAffectingDocumentKeys { self.persistence.run("testAllMutationBatchesAffectingDocumentKey", [&]() { NSArray *mutations = @[ - FSTTestSetMutation(@"fob/bar", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/bar", - @{@"a" : @1}), - FSTTestPatchMutation("foo/bar", - @{@"b" : @1}, {}), - FSTTestSetMutation(@"foo/bar/suffix/key", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/baz", - @{@"a" : @1}), - FSTTestSetMutation(@"food/bar", - @{@"a" : @1}) + FSTTestSetMutation(@"fob/bar", @{@"a" : @1}), FSTTestSetMutation(@"foo/bar", @{@"a" : @1}), + FSTTestPatchMutation("foo/bar", @{@"b" : @1}, {}), + FSTTestSetMutation(@"foo/bar/suffix/key", @{@"a" : @1}), + FSTTestSetMutation(@"foo/baz", @{@"a" : @1}), FSTTestSetMutation(@"food/bar", @{@"a" : @1}) ]; // Store all the mutations. @@ -290,10 +274,8 @@ - (void)testAllMutationBatchesAffectingDocumentKeys_handlesOverlap { self.persistence.run("testAllMutationBatchesAffectingDocumentKeys_handlesOverlap", [&]() { NSArray *group1 = @[ - FSTTestSetMutation(@"foo/bar", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/baz", - @{@"a" : @1}), + FSTTestSetMutation(@"foo/bar", @{@"a" : @1}), + FSTTestSetMutation(@"foo/baz", @{@"a" : @1}), ]; FSTMutationBatch *batch1 = [self.mutationQueue addMutationBatchWithWriteTime:[FIRTimestamp timestamp] @@ -303,8 +285,7 @@ - (void)testAllMutationBatchesAffectingDocumentKeys_handlesOverlap { [self.mutationQueue addMutationBatchWithWriteTime:[FIRTimestamp timestamp] mutations:group2]; NSArray *group3 = @[ - FSTTestSetMutation(@"foo/bar", - @{@"b" : @1}), + FSTTestSetMutation(@"foo/bar", @{@"b" : @1}), ]; FSTMutationBatch *batch3 = [self.mutationQueue addMutationBatchWithWriteTime:[FIRTimestamp timestamp] @@ -328,18 +309,10 @@ - (void)testAllMutationBatchesAffectingQuery { self.persistence.run("testAllMutationBatchesAffectingQuery", [&]() { NSArray *mutations = @[ - FSTTestSetMutation(@"fob/bar", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/bar", - @{@"a" : @1}), - FSTTestPatchMutation("foo/bar", - @{@"b" : @1}, {}), - FSTTestSetMutation(@"foo/bar/suffix/key", - @{@"a" : @1}), - FSTTestSetMutation(@"foo/baz", - @{@"a" : @1}), - FSTTestSetMutation(@"food/bar", - @{@"a" : @1}) + FSTTestSetMutation(@"fob/bar", @{@"a" : @1}), FSTTestSetMutation(@"foo/bar", @{@"a" : @1}), + FSTTestPatchMutation("foo/bar", @{@"b" : @1}, {}), + FSTTestSetMutation(@"foo/bar/suffix/key", @{@"a" : @1}), + FSTTestSetMutation(@"foo/baz", @{@"a" : @1}), FSTTestSetMutation(@"food/bar", @{@"a" : @1}) ]; // Store all the mutations. diff --git a/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm b/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm index dcbef0d9427..1c5bdbbfb2a 100644 --- a/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm +++ b/Firestore/Example/Tests/Local/FSTPersistenceTestHelpers.mm @@ -69,8 +69,10 @@ + (FSTLevelDB *)levelDBPersistenceWithDir:(Path)dir { + (FSTLevelDB *)levelDBPersistenceWithDir:(Path)dir lruParams:(LruParams)params { FSTLocalSerializer *serializer = [self localSerializer]; FSTLevelDB *ldb; - util::Status status = - [FSTLevelDB dbWithDirectory:std::move(dir) serializer:serializer lruParams:params ptr:&ldb]; + util::Status status = [FSTLevelDB dbWithDirectory:std::move(dir) + serializer:serializer + lruParams:params + ptr:&ldb]; if (!status.ok()) { [NSException raise:NSInternalInconsistencyException format:@"Failed to open DB: %s", status.ToString().c_str()]; diff --git a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm index cea556a0c66..2e0082aa29d 100644 --- a/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm +++ b/Firestore/Example/Tests/Local/FSTQueryCacheTests.mm @@ -128,12 +128,16 @@ - (void)testSetQueryToNewValue { if ([self isTestBaseClass]) return; self.persistence.run("testSetQueryToNewValue", [&]() { - FSTQueryData *queryData1 = - [self queryDataWithQuery:_queryRooms targetID:1 listenSequenceNumber:10 version:1]; + FSTQueryData *queryData1 = [self queryDataWithQuery:_queryRooms + targetID:1 + listenSequenceNumber:10 + version:1]; self.queryCache->AddTarget(queryData1); - FSTQueryData *queryData2 = - [self queryDataWithQuery:_queryRooms targetID:1 listenSequenceNumber:10 version:2]; + FSTQueryData *queryData2 = [self queryDataWithQuery:_queryRooms + targetID:1 + listenSequenceNumber:10 + version:2]; self.queryCache->AddTarget(queryData2); FSTQueryData *result = self.queryCache->GetTarget(_queryRooms); diff --git a/Firestore/Example/Tests/Model/FSTDocumentTests.mm b/Firestore/Example/Tests/Model/FSTDocumentTests.mm index be919d8b08a..ae8db452d95 100644 --- a/Firestore/Example/Tests/Model/FSTDocumentTests.mm +++ b/Firestore/Example/Tests/Model/FSTDocumentTests.mm @@ -40,8 +40,10 @@ - (void)testConstructor { DocumentKey key = testutil::Key("messages/first"); SnapshotVersion version = testutil::Version(1); FSTObjectValue *data = FSTTestObjectValue(@{@"a" : @1}); - FSTDocument *doc = - [FSTDocument documentWithData:data key:key version:version state:FSTDocumentStateSynced]; + FSTDocument *doc = [FSTDocument documentWithData:data + key:key + version:version + state:FSTDocumentStateSynced]; XCTAssertEqual(doc.key, FSTTestDocKey(@"messages/first")); XCTAssertEqual(doc.version, version); @@ -56,8 +58,10 @@ - (void)testExtractsFields { @"desc" : @"Discuss all the project related stuff", @"owner" : @{@"name" : @"Jonny", @"title" : @"scallywag"} }); - FSTDocument *doc = - [FSTDocument documentWithData:data key:key version:version state:FSTDocumentStateSynced]; + FSTDocument *doc = [FSTDocument documentWithData:data + key:key + version:version + state:FSTDocumentStateSynced]; XCTAssertEqualObjects([doc fieldForPath:testutil::Field("desc")], [FSTStringValue stringValue:@"Discuss all the project related stuff"]); @@ -66,31 +70,21 @@ - (void)testExtractsFields { } - (void)testIsEqual { - XCTAssertEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced), - FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced)); - XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced), - FSTTestDoc("messages/first", 1, - @{@"b" : @1}, FSTDocumentStateSynced)); - XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced), - FSTTestDoc("messages/second", 1, - @{@"b" : @1}, FSTDocumentStateSynced)); - XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced), - FSTTestDoc("messages/first", 2, - @{@"a" : @1}, FSTDocumentStateSynced)); - XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateSynced), - FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateLocalMutations)); - - XCTAssertEqualObjects(FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateLocalMutations), - FSTTestDoc("messages/first", 1, - @{@"a" : @1}, FSTDocumentStateLocalMutations)); + XCTAssertEqualObjects(FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced), + FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced)); + XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced), + FSTTestDoc("messages/first", 1, @{@"b" : @1}, FSTDocumentStateSynced)); + XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced), + FSTTestDoc("messages/second", 1, @{@"b" : @1}, FSTDocumentStateSynced)); + XCTAssertNotEqualObjects(FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced), + FSTTestDoc("messages/first", 2, @{@"a" : @1}, FSTDocumentStateSynced)); + XCTAssertNotEqualObjects( + FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateSynced), + FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateLocalMutations)); + + XCTAssertEqualObjects( + FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateLocalMutations), + FSTTestDoc("messages/first", 1, @{@"a" : @1}, FSTDocumentStateLocalMutations)); } @end diff --git a/Firestore/Example/Tests/Model/FSTFieldValueTests.mm b/Firestore/Example/Tests/Model/FSTFieldValueTests.mm index c522464ab2a..7fb501d83f1 100644 --- a/Firestore/Example/Tests/Model/FSTFieldValueTests.mm +++ b/Firestore/Example/Tests/Model/FSTFieldValueTests.mm @@ -54,8 +54,8 @@ } else if ([value isKindOfClass:[FSTDocumentKeyReference class]]) { // We directly convert these here so that the databaseIDs can be different. FSTDocumentKeyReference *reference = (FSTDocumentKeyReference *)value; - wrappedValue = - [FSTReferenceValue referenceValue:reference.key databaseID:reference.databaseID]; + wrappedValue = [FSTReferenceValue referenceValue:reference.key + databaseID:reference.databaseID]; } else { wrappedValue = FSTTestFieldValue(value); } @@ -269,11 +269,8 @@ - (void)testWrapsEmptyObjects { } - (void)testWrapsSimpleObjects { - FSTObjectValue *actual = FSTTestObjectValue( - @{@"a" : @"foo", - @"b" : @(1L), - @"c" : @YES, - @"d" : [NSNull null]}); + FSTObjectValue *actual = + FSTTestObjectValue(@{@"a" : @"foo", @"b" : @(1L), @"c" : @YES, @"d" : [NSNull null]}); FSTObjectValue *expected = [[FSTObjectValue alloc] initWithDictionary:@{ @"a" : [FSTStringValue stringValue:@"foo"], @"b" : [FSTIntegerValue integerValue:1LL], @@ -311,8 +308,8 @@ - (void)testExtractsFields { - (void)testOverwritesExistingFields { FSTObjectValue *old = FSTTestObjectValue(@{@"a" : @"old"}); - FSTObjectValue *mod = - [old objectBySettingValue:FSTTestFieldValue(@"mod") forPath:testutil::Field("a")]; + FSTObjectValue *mod = [old objectBySettingValue:FSTTestFieldValue(@"mod") + forPath:testutil::Field("a")]; // Should return a new object, leaving the old one unmodified. XCTAssertNotEqual(old, mod); @@ -322,8 +319,8 @@ - (void)testOverwritesExistingFields { - (void)testAddsNewFields { FSTObjectValue *empty = [FSTObjectValue objectValue]; - FSTObjectValue *mod = - [empty objectBySettingValue:FSTTestFieldValue(@"mod") forPath:testutil::Field("a")]; + FSTObjectValue *mod = [empty objectBySettingValue:FSTTestFieldValue(@"mod") + forPath:testutil::Field("a")]; XCTAssertNotEqual(empty, mod); XCTAssertEqualObjects(empty, FSTTestFieldValue(@{})); XCTAssertEqualObjects(mod, FSTTestFieldValue(@{@"a" : @"mod"})); @@ -337,19 +334,18 @@ - (void)testAddsNewFields { - (void)testImplicitlyCreatesObjects { FSTObjectValue *old = FSTTestObjectValue(@{@"a" : @"old"}); - FSTObjectValue *mod = - [old objectBySettingValue:FSTTestFieldValue(@"mod") forPath:testutil::Field("b.c.d")]; + FSTObjectValue *mod = [old objectBySettingValue:FSTTestFieldValue(@"mod") + forPath:testutil::Field("b.c.d")]; XCTAssertNotEqual(old, mod); XCTAssertEqualObjects(old, FSTTestFieldValue(@{@"a" : @"old"})); - XCTAssertEqualObjects(mod, FSTTestFieldValue( - @{@"a" : @"old", - @"b" : @{@"c" : @{@"d" : @"mod"}}})); + XCTAssertEqualObjects(mod, + FSTTestFieldValue(@{@"a" : @"old", @"b" : @{@"c" : @{@"d" : @"mod"}}})); } - (void)testCanOverwritePrimitivesWithObjects { FSTObjectValue *old = FSTTestObjectValue(@{@"a" : @{@"b" : @"old"}}); - FSTObjectValue *mod = - [old objectBySettingValue:FSTTestFieldValue(@{@"b" : @"mod"}) forPath:testutil::Field("a")]; + FSTObjectValue *mod = [old objectBySettingValue:FSTTestFieldValue(@{@"b" : @"mod"}) + forPath:testutil::Field("a")]; XCTAssertNotEqual(old, mod); XCTAssertEqualObjects(old, FSTTestFieldValue(@{@"a" : @{@"b" : @"old"}})); XCTAssertEqualObjects(mod, FSTTestFieldValue(@{@"a" : @{@"b" : @"mod"}})); @@ -357,8 +353,8 @@ - (void)testCanOverwritePrimitivesWithObjects { - (void)testAddsToNestedObjects { FSTObjectValue *old = FSTTestObjectValue(@{@"a" : @{@"b" : @"old"}}); - FSTObjectValue *mod = - [old objectBySettingValue:FSTTestFieldValue(@"mod") forPath:testutil::Field("a.c")]; + FSTObjectValue *mod = [old objectBySettingValue:FSTTestFieldValue(@"mod") + forPath:testutil::Field("a.c")]; XCTAssertNotEqual(old, mod); XCTAssertEqualObjects(old, FSTTestFieldValue(@{@"a" : @{@"b" : @"old"}})); XCTAssertEqualObjects(mod, FSTTestFieldValue(@{@"a" : @{@"b" : @"old", @"c" : @"mod"}})); @@ -396,8 +392,8 @@ - (void)testDeletesNestedKeys { FSTObjectValue *old = FSTTestObjectValue(@{@"a" : @{@"b" : @1, @"c" : @{@"d" : @2, @"e" : @3}}}); FSTObjectValue *mod = [old objectByDeletingPath:testutil::Field("a.c.d")]; XCTAssertNotEqual(old, mod); - XCTAssertEqualObjects(old, FSTTestFieldValue( - @{@"a" : @{@"b" : @1, @"c" : @{@"d" : @2, @"e" : @3}}})); + XCTAssertEqualObjects(old, + FSTTestFieldValue(@{@"a" : @{@"b" : @1, @"c" : @{@"d" : @2, @"e" : @3}}})); XCTAssertEqualObjects(mod, FSTTestFieldValue(@{@"a" : @{@"b" : @1, @"c" : @{@"e" : @3}}})); old = mod; @@ -470,21 +466,10 @@ - (void)testValueEquality { @[ FSTTestFieldValue(@[ @"foo", @"bar" ]), FSTTestFieldValue(@[ @"foo", @"bar" ]) ], @[ FSTTestFieldValue(@[ @"foo", @"bar", @"baz" ]) ], @[ FSTTestFieldValue(@[ @"foo" ]) ], @[ - FSTTestFieldValue( - @{@"bar" : @1, - @"foo" : @2}), - FSTTestFieldValue( - @{@"foo" : @2, - @"bar" : @1}) + FSTTestFieldValue(@{@"bar" : @1, @"foo" : @2}), FSTTestFieldValue(@{@"foo" : @2, @"bar" : @1}) ], - @[ FSTTestFieldValue( - @{@"bar" : @2, - @"foo" : @1}) ], - @[ FSTTestFieldValue( - @{@"bar" : @1, - @"foo" : @1}) ], - @[ FSTTestFieldValue( - @{@"foo" : @1}) ] + @[ FSTTestFieldValue(@{@"bar" : @2, @"foo" : @1}) ], + @[ FSTTestFieldValue(@{@"bar" : @1, @"foo" : @1}) ], @[ FSTTestFieldValue(@{@"foo" : @1}) ] ]; FSTAssertEqualityGroups(groups); @@ -542,19 +527,7 @@ - (void)testValueOrdering { @[ @[ @"foo", @"0" ] ], // Objects - @[ - @{@"bar" : @0} - ], - @[ - @{@"bar" : @0, - @"foo" : @1} - ], - @[ - @{@"foo" : @1} - ], - @[ - @{@"foo" : @2} - ], + @[ @{@"bar" : @0} ], @[ @{@"bar" : @0, @"foo" : @1} ], @[ @{@"foo" : @1} ], @[ @{@"foo" : @2} ], @[ @{@"foo" : @"0"} ] ]; diff --git a/Firestore/Example/Tests/Model/FSTMutationTests.mm b/Firestore/Example/Tests/Model/FSTMutationTests.mm index 878668fe817..3ee31a5ed78 100644 --- a/Firestore/Example/Tests/Model/FSTMutationTests.mm +++ b/Firestore/Example/Tests/Model/FSTMutationTests.mm @@ -60,8 +60,9 @@ - (void)testAppliesSetsToDocuments { FSTDocument *baseDoc = FSTTestDoc("collection/key", 0, docData, FSTDocumentStateSynced); FSTMutation *set = FSTTestSetMutation(@"collection/key", @{@"bar" : @"bar-value"}); - FSTMaybeDocument *setDoc = - [set applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *setDoc = [set applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; NSDictionary *expectedData = @{@"bar" : @"bar-value"}; XCTAssertEqualObjects( @@ -73,8 +74,9 @@ - (void)testAppliesPatchesToDocuments { FSTDocument *baseDoc = FSTTestDoc("collection/key", 0, docData, FSTDocumentStateSynced); FSTMutation *patch = FSTTestPatchMutation("collection/key", @{@"foo.bar" : @"new-bar-value"}, {}); - FSTMaybeDocument *patchedDoc = - [patch applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *patchedDoc = [patch applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; NSDictionary *expectedData = @{@"foo" : @{@"bar" : @"new-bar-value"}, @"baz" : @"baz-value"}; XCTAssertEqualObjects( @@ -90,8 +92,9 @@ - (void)testDeletesValuesFromTheFieldMask { fieldMask:{testutil::Field("foo.bar")} value:[FSTObjectValue objectValue] precondition:Precondition::None()]; - FSTMaybeDocument *patchedDoc = - [patch applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *patchedDoc = [patch applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; NSDictionary *expectedData = @{@"foo" : @{@"baz" : @"baz-value"}}; XCTAssertEqualObjects( @@ -103,8 +106,9 @@ - (void)testPatchesPrimitiveValue { FSTDocument *baseDoc = FSTTestDoc("collection/key", 0, docData, FSTDocumentStateSynced); FSTMutation *patch = FSTTestPatchMutation("collection/key", @{@"foo.bar" : @"new-bar-value"}, {}); - FSTMaybeDocument *patchedDoc = - [patch applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *patchedDoc = [patch applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; NSDictionary *expectedData = @{@"foo" : @{@"bar" : @"new-bar-value"}, @"baz" : @"baz-value"}; XCTAssertEqualObjects( @@ -114,8 +118,9 @@ - (void)testPatchesPrimitiveValue { - (void)testPatchingDeletedDocumentsDoesNothing { FSTMaybeDocument *baseDoc = FSTTestDeletedDoc("collection/key", 0, NO); FSTMutation *patch = FSTTestPatchMutation("collection/key", @{@"foo" : @"bar"}, {}); - FSTMaybeDocument *patchedDoc = - [patch applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *patchedDoc = [patch applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; XCTAssertEqualObjects(patchedDoc, baseDoc); } @@ -125,13 +130,13 @@ - (void)testAppliesLocalServerTimestampTransformToDocuments { FSTMutation *transform = FSTTestTransformMutation( @"collection/key", @{@"foo.bar" : [FIRFieldValue fieldValueForServerTimestamp]}); - FSTMaybeDocument *transformedDoc = - [transform applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *transformedDoc = [transform applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; // Server timestamps aren't parsed, so we manually insert it. - FSTObjectValue *expectedData = FSTTestObjectValue( - @{@"foo" : @{@"bar" : @""}, - @"baz" : @"baz-value"}); + FSTObjectValue *expectedData = + FSTTestObjectValue(@{@"foo" : @{@"bar" : @""}, @"baz" : @"baz-value"}); expectedData = [expectedData objectBySettingValue:[FSTServerTimestampValue serverTimestampValueWithLocalWriteTime:_timestamp @@ -152,8 +157,7 @@ - (void)testCreateArrayUnionTransform { FSTTransformMutation *transform = FSTTestTransformMutation(@"collection/key", @{ @"foo" : [FIRFieldValue fieldValueForArrayUnion:@[ @"tag" ]], @"bar.baz" : - [FIRFieldValue fieldValueForArrayUnion:@[ @YES, - @{@"nested" : @{@"a" : @[ @1, @2 ]}} ]] + [FIRFieldValue fieldValueForArrayUnion:@[ @YES, @{@"nested" : @{@"a" : @[ @1, @2 ]}} ]] }); XCTAssertEqual(transform.fieldTransforms.size(), 2); @@ -301,8 +305,9 @@ - (void)transformBaseDoc:(NSDictionary *)baseData FSTMutation *transform = FSTTestTransformMutation(@"collection/key", transformData); - FSTMaybeDocument *transformedDoc = - [transform applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *transformedDoc = [transform applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; FSTDocument *expectedDoc = [FSTDocument documentWithData:FSTTestObjectValue(expectedData) key:FSTTestDocKey(@"collection/key") @@ -323,8 +328,8 @@ - (void)testAppliesServerAckedServerTimestampTransformToDocuments { initWithVersion:testutil::Version(1) transformResults:@[ [FSTTimestampValue timestampValue:_timestamp] ]]; - FSTMaybeDocument *transformedDoc = - [transform applyToRemoteDocument:baseDoc mutationResult:mutationResult]; + FSTMaybeDocument *transformedDoc = [transform applyToRemoteDocument:baseDoc + mutationResult:mutationResult]; NSDictionary *expectedData = @{@"foo" : @{@"bar" : _timestamp.dateValue}, @"baz" : @"baz-value"}; XCTAssertEqualObjects(transformedDoc, FSTTestDoc("collection/key", 1, expectedData, @@ -345,8 +350,8 @@ - (void)testAppliesServerAckedArrayTransformsToDocuments { initWithVersion:testutil::Version(1) transformResults:@[ [FSTNullValue nullValue], [FSTNullValue nullValue] ]]; - FSTMaybeDocument *transformedDoc = - [transform applyToRemoteDocument:baseDoc mutationResult:mutationResult]; + FSTMaybeDocument *transformedDoc = [transform applyToRemoteDocument:baseDoc + mutationResult:mutationResult]; NSDictionary *expectedData = @{@"array_1" : @[ @1, @2, @3 ], @"array_2" : @[ @"b" ]}; XCTAssertEqualObjects(transformedDoc, FSTTestDoc("collection/key", 1, expectedData, @@ -358,8 +363,9 @@ - (void)testDeleteDeletes { FSTDocument *baseDoc = FSTTestDoc("collection/key", 0, docData, FSTDocumentStateSynced); FSTMutation *mutation = FSTTestDeleteMutation(@"collection/key"); - FSTMaybeDocument *result = - [mutation applyToLocalDocument:baseDoc baseDocument:baseDoc localWriteTime:_timestamp]; + FSTMaybeDocument *result = [mutation applyToLocalDocument:baseDoc + baseDocument:baseDoc + localWriteTime:_timestamp]; XCTAssertEqualObjects(result, FSTTestDeletedDoc("collection/key", 0, NO)); } @@ -384,8 +390,8 @@ - (void)testPatchWithMutationResult { FSTMutation *patch = FSTTestPatchMutation("collection/key", @{@"foo" : @"new-bar"}, {}); FSTMutationResult *mutationResult = [[FSTMutationResult alloc] initWithVersion:testutil::Version(4) transformResults:nil]; - FSTMaybeDocument *patchedDoc = - [patch applyToRemoteDocument:baseDoc mutationResult:mutationResult]; + FSTMaybeDocument *patchedDoc = [patch applyToRemoteDocument:baseDoc + mutationResult:mutationResult]; NSDictionary *expectedData = @{@"foo" : @"new-bar"}; XCTAssertEqualObjects(patchedDoc, FSTTestDoc("collection/key", 4, expectedData, diff --git a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm index 131a1df4e10..c957f196129 100644 --- a/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm +++ b/Firestore/Example/Tests/Remote/FSTSerializerBetaTests.mm @@ -287,8 +287,7 @@ - (void)testEncodesNestedObjects { @"i" : @1, @"n" : [NSNull null], @"s" : @"foo", - @"a" : @[ @2, @"bar", - @{@"b" : @NO} ], + @"a" : @[ @2, @"bar", @{@"b" : @NO} ], @"o" : @{ @"d" : @100, @"nested" : @{@"e" : @(LLONG_MIN)}, @@ -346,12 +345,8 @@ - (void)testEncodesSetMutation { } - (void)testEncodesPatchMutation { - FSTPatchMutation *mutation = - FSTTestPatchMutation("docs/1", - @{@"a" : @"b", - @"num" : @1, - @"some.de\\\\ep.th\\ing'" : @2}, - {}); + FSTPatchMutation *mutation = FSTTestPatchMutation( + "docs/1", @{@"a" : @"b", @"num" : @1, @"some.de\\\\ep.th\\ing'" : @2}, {}); GCFSWrite *proto = [GCFSWrite message]; proto.update = [self.serializer encodedDocumentWithFields:mutation.value key:mutation.key]; proto.updateMask = [self.serializer encodedFieldMask:mutation.fieldMask]; @@ -386,9 +381,7 @@ - (void)testEncodesServerTimestampTransformMutation { - (void)testEncodesArrayTransformMutations { FSTTransformMutation *mutation = FSTTestTransformMutation(@"docs/1", @{ @"a" : [FIRFieldValue fieldValueForArrayUnion:@[ @"a", @2 ]], - @"bar.baz" : [FIRFieldValue fieldValueForArrayRemove:@[ - @{@"x" : @1} - ]] + @"bar.baz" : [FIRFieldValue fieldValueForArrayRemove:@[ @{@"x" : @1} ]] }); GCFSWrite *proto = [GCFSWrite message]; proto.transform = [GCFSDocumentTransform message]; @@ -418,9 +411,7 @@ - (void)testEncodesArrayTransformMutations { - (void)testEncodesSetMutationWithPrecondition { FSTSetMutation *mutation = [[FSTSetMutation alloc] initWithKey:FSTTestDocKey(@"foo/bar") - value:FSTTestObjectValue( - @{@"a" : @"b", - @"num" : @1}) + value:FSTTestObjectValue(@{@"a" : @"b", @"num" : @1}) precondition:Precondition::UpdateTime(testutil::Version(4))]; GCFSWrite *proto = [GCFSWrite message]; proto.update = [self.serializer encodedDocumentWithFields:mutation.value key:mutation.key]; @@ -444,8 +435,8 @@ - (void)testDecodesMutationResult { proto.updateTime = [self.serializer encodedTimestamp:updateVersion.timestamp()]; [proto.transformResultsArray addObject:[self.serializer encodedString:@"result"]]; - FSTMutationResult *result = - [self.serializer decodedMutationResult:proto commitVersion:commitVersion]; + FSTMutationResult *result = [self.serializer decodedMutationResult:proto + commitVersion:commitVersion]; XCTAssertEqual(result.version, updateVersion); XCTAssertEqualObjects(result.transformResults, @[ [FSTStringValue stringValue:@"result"] ]); @@ -455,8 +446,8 @@ - (void)testDecodesDeleteMutationResult { GCFSWriteResult *proto = [GCFSWriteResult message]; SnapshotVersion commitVersion = testutil::Version(4000); - FSTMutationResult *result = - [self.serializer decodedMutationResult:proto commitVersion:commitVersion]; + FSTMutationResult *result = [self.serializer decodedMutationResult:proto + commitVersion:commitVersion]; XCTAssertEqual(result.version, commitVersion); XCTAssertEqual(result.transformResults.count, 0); diff --git a/Firestore/Example/Tests/Remote/FSTWatchChangeTests.mm b/Firestore/Example/Tests/Remote/FSTWatchChangeTests.mm index 99017ffb354..a00eba6d711 100644 --- a/Firestore/Example/Tests/Remote/FSTWatchChangeTests.mm +++ b/Firestore/Example/Tests/Remote/FSTWatchChangeTests.mm @@ -46,8 +46,8 @@ - (void)testDocumentChange { - (void)testExistenceFilterChange { FSTExistenceFilter *filter = [FSTExistenceFilter filterWithCount:7]; - FSTExistenceFilterWatchChange *change = - [FSTExistenceFilterWatchChange changeWithFilter:filter targetID:5]; + FSTExistenceFilterWatchChange *change = [FSTExistenceFilterWatchChange changeWithFilter:filter + targetID:5]; XCTAssertEqual(change.filter.count, 7); XCTAssertEqual(change.targetID, 5); } diff --git a/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm b/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm index acbb31c6b41..827051029af 100644 --- a/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm +++ b/Firestore/Example/Tests/SpecTests/FSTSpecTests.mm @@ -357,8 +357,8 @@ - (void)doWriteAck:(NSDictionary *)spec { @"'keepInQueue=true' is not supported on iOS and should only be set in " @"multi-client tests"); - FSTMutationResult *mutationResult = - [[FSTMutationResult alloc] initWithVersion:version transformResults:nil]; + FSTMutationResult *mutationResult = [[FSTMutationResult alloc] initWithVersion:version + transformResults:nil]; [self.driver receiveWriteAckWithVersion:version mutationResults:@[ mutationResult ]]; } @@ -479,9 +479,8 @@ - (void)doStep:(NSDictionary *)step { } else if (step[@"restart"]) { [self doRestart]; } else if (step[@"applyClientState"]) { - XCTFail( - @"'applyClientState' is not supported on iOS and should only be used in multi-client " - @"tests"); + XCTFail(@"'applyClientState' is not supported on iOS and should only be used in multi-client " + @"tests"); } else { XCTFail(@"Unknown step: %@", step); } @@ -497,23 +496,23 @@ - (void)validateEvent:(FSTQueryEvent *)actual matches:(NSDictionary *)expected { NSMutableArray *expectedChanges = [NSMutableArray array]; NSMutableArray *removed = expected[@"removed"]; for (NSDictionary *changeSpec in removed) { - [expectedChanges - addObject:[self parseChange:changeSpec ofType:FSTDocumentViewChangeTypeRemoved]]; + [expectedChanges addObject:[self parseChange:changeSpec + ofType:FSTDocumentViewChangeTypeRemoved]]; } NSMutableArray *added = expected[@"added"]; for (NSDictionary *changeSpec in added) { - [expectedChanges - addObject:[self parseChange:changeSpec ofType:FSTDocumentViewChangeTypeAdded]]; + [expectedChanges addObject:[self parseChange:changeSpec + ofType:FSTDocumentViewChangeTypeAdded]]; } NSMutableArray *modified = expected[@"modified"]; for (NSDictionary *changeSpec in modified) { - [expectedChanges - addObject:[self parseChange:changeSpec ofType:FSTDocumentViewChangeTypeModified]]; + [expectedChanges addObject:[self parseChange:changeSpec + ofType:FSTDocumentViewChangeTypeModified]]; } NSMutableArray *metadata = expected[@"metadata"]; for (NSDictionary *changeSpec in metadata) { - [expectedChanges - addObject:[self parseChange:changeSpec ofType:FSTDocumentViewChangeTypeMetadata]]; + [expectedChanges addObject:[self parseChange:changeSpec + ofType:FSTDocumentViewChangeTypeMetadata]]; } XCTAssertEqualObjects(actual.viewSnapshot.documentChanges, expectedChanges); diff --git a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm index 70d3307290c..451bc7adf87 100644 --- a/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm +++ b/Firestore/Example/Tests/SpecTests/FSTSyncEngineTestDriver.mm @@ -212,9 +212,8 @@ - (void)start { - (void)validateUsage { // We could relax this if we found a reason to. - HARD_ASSERT(self.events.count == 0, - "You must clear all pending events by calling" - " capturedEventsSinceLastCall before calling shutdown."); + HARD_ASSERT(self.events.count == 0, "You must clear all pending events by calling" + " capturedEventsSinceLastCall before calling shutdown."); } - (void)shutdown { @@ -285,8 +284,9 @@ - (FSTOutstandingWrite *)receiveWriteAckWithVersion:(const SnapshotVersion &)com - (FSTOutstandingWrite *)receiveWriteError:(int)errorCode userInfo:(NSDictionary *)userInfo keepInQueue:(BOOL)keepInQueue { - NSError *error = - [NSError errorWithDomain:FIRFirestoreErrorDomain code:errorCode userInfo:userInfo]; + NSError *error = [NSError errorWithDomain:FIRFirestoreErrorDomain + code:errorCode + userInfo:userInfo]; FSTOutstandingWrite *write = [self currentOutstandingWrites].firstObject; [self validateNextWriteSent:write.write]; @@ -380,8 +380,9 @@ - (void)receiveWatchChange:(FSTWatchChange *)change } - (void)receiveWatchStreamError:(int)errorCode userInfo:(NSDictionary *)userInfo { - NSError *error = - [NSError errorWithDomain:FIRFirestoreErrorDomain code:errorCode userInfo:userInfo]; + NSError *error = [NSError errorWithDomain:FIRFirestoreErrorDomain + code:errorCode + userInfo:userInfo]; _workerQueue->EnqueueBlocking([&] { [self.datastore failWatchStreamWithError:error]; diff --git a/Firestore/Example/Tests/Util/FSTHelpers.mm b/Firestore/Example/Tests/Util/FSTHelpers.mm index 5eeb201bb79..406f237a9ba 100644 --- a/Firestore/Example/Tests/Util/FSTHelpers.mm +++ b/Firestore/Example/Tests/Util/FSTHelpers.mm @@ -282,8 +282,8 @@ FieldMask mask(merge ? std::set(updateMask.begin(), updateMask.end()) } FSTDeleteMutation *FSTTestDeleteMutation(NSString *path) { - return - [[FSTDeleteMutation alloc] initWithKey:FSTTestDocKey(path) precondition:Precondition::None()]; + return [[FSTDeleteMutation alloc] initWithKey:FSTTestDocKey(path) + precondition:Precondition::None()]; } MaybeDocumentMap FSTTestDocUpdates(NSArray *docs) { diff --git a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm index 0d42a11bf19..1d123caf1d3 100644 --- a/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm +++ b/Firestore/Example/Tests/Util/FSTIntegrationTestCase.mm @@ -154,11 +154,10 @@ + (void)setUpDefaults { [[[NSFileManager defaultManager] attributesOfItemAtPath:certsPath error:nil] fileSize]; if (fileSize == 0) { - NSLog( - @"Please set up a GoogleServices-Info.plist for Firestore in Firestore/Example/App using " - "instructions at . " - "Alternatively, if you're a Googler with a Hexa preproduction environment, run " - "setup_integration_tests.py to properly configure testing SSL certificates."); + NSLog(@"Please set up a GoogleServices-Info.plist for Firestore in Firestore/Example/App using " + "instructions at . " + "Alternatively, if you're a Googler with a Hexa preproduction environment, run " + "setup_integration_tests.py to properly configure testing SSL certificates."); } GrpcConnection::UseTestCertificate(util::MakeString(defaultSettings.host), Path::FromNSString(certsPath), "test_cert_2"); diff --git a/Firestore/Source/API/FIRCollectionReference.mm b/Firestore/Source/API/FIRCollectionReference.mm index c5327c6525c..76f441359eb 100644 --- a/Firestore/Source/API/FIRCollectionReference.mm +++ b/Firestore/Source/API/FIRCollectionReference.mm @@ -56,10 +56,9 @@ @implementation FIRCollectionReference - (instancetype)initWithPath:(const ResourcePath &)path firestore:(FIRFirestore *)firestore { if (path.size() % 2 != 1) { - FSTThrowInvalidArgument( - @"Invalid collection reference. Collection references must have an odd " - "number of segments, but %s has %zu", - path.CanonicalString().c_str(), path.size()); + FSTThrowInvalidArgument(@"Invalid collection reference. Collection references must have an odd " + "number of segments, but %s has %zu", + path.CanonicalString().c_str(), path.size()); } self = [super initWithQuery:[FSTQuery queryWithPath:path] firestore:firestore]; return self; diff --git a/Firestore/Source/API/FIRDocumentReference.mm b/Firestore/Source/API/FIRDocumentReference.mm index f8f350a6278..0222843c718 100644 --- a/Firestore/Source/API/FIRDocumentReference.mm +++ b/Firestore/Source/API/FIRDocumentReference.mm @@ -99,8 +99,8 @@ - (NSString *)documentID { } - (FIRCollectionReference *)parent { - return - [FIRCollectionReference referenceWithPath:self.key.path().PopLast() firestore:self.firestore]; + return [FIRCollectionReference referenceWithPath:self.key.path().PopLast() + firestore:self.firestore]; } - (NSString *)path { @@ -137,9 +137,9 @@ - (void)setData:(NSDictionary *)documentData - (void)setData:(NSDictionary *)documentData merge:(BOOL)merge completion:(nullable void (^)(NSError *_Nullable error))completion { - ParsedSetData parsed = - merge ? [self.firestore.dataConverter parsedMergeData:documentData fieldMask:nil] - : [self.firestore.dataConverter parsedSetData:documentData]; + ParsedSetData parsed = merge ? [self.firestore.dataConverter parsedMergeData:documentData + fieldMask:nil] + : [self.firestore.dataConverter parsedSetData:documentData]; return [self.firestore.client writeMutations:std::move(parsed).ToMutations(self.key, Precondition::None()) completion:completion]; @@ -148,8 +148,8 @@ - (void)setData:(NSDictionary *)documentData - (void)setData:(NSDictionary *)documentData mergeFields:(NSArray *)mergeFields completion:(nullable void (^)(NSError *_Nullable error))completion { - ParsedSetData parsed = - [self.firestore.dataConverter parsedMergeData:documentData fieldMask:mergeFields]; + ParsedSetData parsed = [self.firestore.dataConverter parsedMergeData:documentData + fieldMask:mergeFields]; return [self.firestore.client writeMutations:std::move(parsed).ToMutations(self.key, Precondition::None()) completion:completion]; @@ -172,8 +172,8 @@ - (void)deleteDocument { } - (void)deleteDocumentWithCompletion:(nullable void (^)(NSError *_Nullable error))completion { - FSTDeleteMutation *mutation = - [[FSTDeleteMutation alloc] initWithKey:self.key precondition:Precondition::None()]; + FSTDeleteMutation *mutation = [[FSTDeleteMutation alloc] initWithKey:self.key + precondition:Precondition::None()]; return [self.firestore.client writeMutations:@[ mutation ] completion:completion]; } @@ -312,10 +312,9 @@ @implementation FIRDocumentReference (Internal) + (instancetype)referenceWithPath:(const ResourcePath &)path firestore:(FIRFirestore *)firestore { if (path.size() % 2 != 0) { - FSTThrowInvalidArgument( - @"Invalid document reference. Document references must have an even " - "number of segments, but %s has %zu", - path.CanonicalString().c_str(), path.size()); + FSTThrowInvalidArgument(@"Invalid document reference. Document references must have an even " + "number of segments, but %s has %zu", + path.CanonicalString().c_str(), path.size()); } return [FIRDocumentReference referenceWithKey:DocumentKey{path} firestore:firestore]; } diff --git a/Firestore/Source/API/FIRDocumentSnapshot.mm b/Firestore/Source/API/FIRDocumentSnapshot.mm index 18f8747b330..8ae3bd70d07 100644 --- a/Firestore/Source/API/FIRDocumentSnapshot.mm +++ b/Firestore/Source/API/FIRDocumentSnapshot.mm @@ -220,13 +220,12 @@ - (id)convertedValue:(FSTFieldValue *)value options:(FSTFieldValueOptions *)opti const DatabaseId *database = self.firestore.databaseID; if (*refDatabase != *database) { // TODO(b/32073923): Log this as a proper warning. - NSLog( - @"WARNING: Document %@ contains a document reference within a different database " - "(%s/%s) which is not supported. It will be treated as a reference within the " - "current database (%s/%s) instead.", - self.reference.path, refDatabase->project_id().c_str(), - refDatabase->database_id().c_str(), database->project_id().c_str(), - database->database_id().c_str()); + NSLog(@"WARNING: Document %@ contains a document reference within a different database " + "(%s/%s) which is not supported. It will be treated as a reference within the " + "current database (%s/%s) instead.", + self.reference.path, refDatabase->project_id().c_str(), + refDatabase->database_id().c_str(), database->project_id().c_str(), + database->database_id().c_str()); } DocumentKey key = [[ref valueWithOptions:options] key]; return [FIRDocumentReference referenceWithKey:key firestore:self.firestore]; diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm index a98c03cb2a9..f1f5ffd4879 100644 --- a/Firestore/Source/API/FIRFirestore.mm +++ b/Firestore/Source/API/FIRFirestore.mm @@ -149,15 +149,13 @@ + (instancetype)firestoreForApp:(FIRApp *)app { // TODO(b/62410906): make this public + (instancetype)firestoreForApp:(FIRApp *)app database:(NSString *)database { if (!app) { - FSTThrowInvalidArgument( - @"FirebaseApp instance may not be nil. Use FirebaseApp.app() if you'd " - "like to use the default FirebaseApp instance."); + FSTThrowInvalidArgument(@"FirebaseApp instance may not be nil. Use FirebaseApp.app() if you'd " + "like to use the default FirebaseApp instance."); } if (!database) { - FSTThrowInvalidArgument( - @"database identifier may not be nil. Use '%s' if you want the default " - "database", - DatabaseId::kDefault); + FSTThrowInvalidArgument(@"database identifier may not be nil. Use '%s' if you want the default " + "database", + DatabaseId::kDefault); } id provider = @@ -182,8 +180,8 @@ - (instancetype)initWithProjectID:(std::string)projectID return input; } }; - _dataConverter = - [[FSTUserDataConverter alloc] initWithDatabaseID:&_databaseID preConverter:block]; + _dataConverter = [[FSTUserDataConverter alloc] initWithDatabaseID:&_databaseID + preConverter:block]; _persistenceKey = persistenceKey; _credentialsProvider = std::move(credentialsProvider); _workerQueue = std::move(workerQueue); diff --git a/Firestore/Source/API/FIRGeoPoint.mm b/Firestore/Source/API/FIRGeoPoint.mm index 8d896330279..cfd70fb5507 100644 --- a/Firestore/Source/API/FIRGeoPoint.mm +++ b/Firestore/Source/API/FIRGeoPoint.mm @@ -31,16 +31,14 @@ @implementation FIRGeoPoint - (instancetype)initWithLatitude:(double)latitude longitude:(double)longitude { if (self = [super init]) { if (latitude < -90 || latitude > 90 || !isfinite(latitude)) { - FSTThrowInvalidArgument( - @"GeoPoint requires a latitude value in the range of [-90, 90], " - "but was %f", - latitude); + FSTThrowInvalidArgument(@"GeoPoint requires a latitude value in the range of [-90, 90], " + "but was %f", + latitude); } if (longitude < -180 || longitude > 180 || !isfinite(longitude)) { - FSTThrowInvalidArgument( - @"GeoPoint requires a longitude value in the range of [-180, 180], " - "but was %f", - longitude); + FSTThrowInvalidArgument(@"GeoPoint requires a longitude value in the range of [-180, 180], " + "but was %f", + longitude); } _latitude = latitude; diff --git a/Firestore/Source/API/FIRQuery.mm b/Firestore/Source/API/FIRQuery.mm index b0811bf385e..e4d2f7066cd 100644 --- a/Firestore/Source/API/FIRQuery.mm +++ b/Firestore/Source/API/FIRQuery.mm @@ -143,8 +143,8 @@ - (void)getDocumentsWithSource:(FIRFirestoreSource)source } }; - listenerRegistration = - [self addSnapshotListenerInternalWithOptions:listenOptions listener:listener]; + listenerRegistration = [self addSnapshotListenerInternalWithOptions:listenOptions + listener:listener]; dispatch_semaphore_signal(registered); } @@ -228,8 +228,9 @@ - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path isLessThanOrEqualTo:(id)v } - (FIRQuery *)queryWhereField:(NSString *)field isGreaterThan:(id)value { - return - [self queryWithFilterOperator:FSTRelationFilterOperatorGreaterThan field:field value:value]; + return [self queryWithFilterOperator:FSTRelationFilterOperatorGreaterThan + field:field + value:value]; } - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path isGreaterThan:(id)value { @@ -239,8 +240,9 @@ - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path isGreaterThan:(id)value { } - (FIRQuery *)queryWhereField:(NSString *)field arrayContains:(id)value { - return - [self queryWithFilterOperator:FSTRelationFilterOperatorArrayContains field:field value:value]; + return [self queryWithFilterOperator:FSTRelationFilterOperatorArrayContains + field:field + value:value]; } - (FIRQuery *)queryWhereFieldPath:(FIRFieldPath *)path arrayContains:(id)value { @@ -338,21 +340,19 @@ - (FIRQuery *)queryFilteredUsingPredicate:(NSPredicate *)predicate { predicateWithBlock:^BOOL(id obj, NSDictionary *bindings) { return true; }] class]]) { - FSTThrowInvalidArgument( - @"Invalid query. Block-based predicates are not " - "supported. Please use predicateWithFormat to " - "create predicates instead."); + FSTThrowInvalidArgument(@"Invalid query. Block-based predicates are not " + "supported. Please use predicateWithFormat to " + "create predicates instead."); } else { - FSTThrowInvalidArgument( - @"Invalid query. Expect comparison or compound of " - "comparison predicate. Please use " - "predicateWithFormat to create predicates."); + FSTThrowInvalidArgument(@"Invalid query. Expect comparison or compound of " + "comparison predicate. Please use " + "predicateWithFormat to create predicates."); } } - (FIRQuery *)queryOrderedByField:(NSString *)field { - return - [self queryOrderedByFieldPath:[FIRFieldPath pathWithDotSeparatedString:field] descending:NO]; + return [self queryOrderedByFieldPath:[FIRFieldPath pathWithDotSeparatedString:field] + descending:NO]; } - (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)fieldPath { @@ -376,8 +376,8 @@ - (FIRQuery *)queryOrderedByFieldPath:(FIRFieldPath *)fieldPath descending:(BOOL @"InvalidQueryException", @"Invalid query. You must not specify an ending point before specifying the order by."); } - FSTSortOrder *sortOrder = - [FSTSortOrder sortOrderWithFieldPath:fieldPath.internalValue ascending:!descending]; + FSTSortOrder *sortOrder = [FSTSortOrder sortOrderWithFieldPath:fieldPath.internalValue + ascending:!descending]; return [FIRQuery referenceWithQuery:[self.query queryByAddingSortOrder:sortOrder] firestore:self.firestore]; } @@ -416,26 +416,26 @@ - (FIRQuery *)queryStartingAfterValues:(NSArray *)fieldValues { - (FIRQuery *)queryEndingBeforeDocument:(FIRDocumentSnapshot *)snapshot { FSTBound *bound = [self boundFromSnapshot:snapshot isBefore:YES]; - return - [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] firestore:self.firestore]; + return [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] + firestore:self.firestore]; } - (FIRQuery *)queryEndingBeforeValues:(NSArray *)fieldValues { FSTBound *bound = [self boundFromFieldValues:fieldValues isBefore:YES]; - return - [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] firestore:self.firestore]; + return [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] + firestore:self.firestore]; } - (FIRQuery *)queryEndingAtDocument:(FIRDocumentSnapshot *)snapshot { FSTBound *bound = [self boundFromSnapshot:snapshot isBefore:NO]; - return - [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] firestore:self.firestore]; + return [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] + firestore:self.firestore]; } - (FIRQuery *)queryEndingAtValues:(NSArray *)fieldValues { FSTBound *bound = [self boundFromFieldValues:fieldValues isBefore:NO]; - return - [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] firestore:self.firestore]; + return [FIRQuery referenceWithQuery:[self.query queryByAddingEndAt:bound] + firestore:self.firestore]; } #pragma mark - Private Methods @@ -462,33 +462,31 @@ - (FIRQuery *)queryWithFilterOperator:(FSTRelationFilterOperator)filterOperator if ([value isKindOfClass:[NSString class]]) { NSString *documentKey = (NSString *)value; if ([documentKey containsString:@"/"]) { - FSTThrowInvalidArgument( - @"Invalid query. When querying by document ID you must provide " - "a valid document ID, but '%@' contains a '/' character.", - documentKey); + FSTThrowInvalidArgument(@"Invalid query. When querying by document ID you must provide " + "a valid document ID, but '%@' contains a '/' character.", + documentKey); } else if (documentKey.length == 0) { - FSTThrowInvalidArgument( - @"Invalid query. When querying by document ID you must provide " - "a valid document ID, but it was an empty string."); + FSTThrowInvalidArgument(@"Invalid query. When querying by document ID you must provide " + "a valid document ID, but it was an empty string."); } ResourcePath path = self.query.path.Append([documentKey UTF8String]); - fieldValue = - [FSTReferenceValue referenceValue:DocumentKey{path} databaseID:self.firestore.databaseID]; + fieldValue = [FSTReferenceValue referenceValue:DocumentKey{path} + databaseID:self.firestore.databaseID]; } else if ([value isKindOfClass:[FIRDocumentReference class]]) { FIRDocumentReference *ref = (FIRDocumentReference *)value; fieldValue = [FSTReferenceValue referenceValue:ref.key databaseID:self.firestore.databaseID]; } else { - FSTThrowInvalidArgument( - @"Invalid query. When querying by document ID you must provide a " - "valid string or DocumentReference, but it was of type: %@", - NSStringFromClass([value class])); + FSTThrowInvalidArgument(@"Invalid query. When querying by document ID you must provide a " + "valid string or DocumentReference, but it was of type: %@", + NSStringFromClass([value class])); } } else { fieldValue = [self.firestore.dataConverter parsedQueryValue:value]; } - FSTFilter *filter = - [FSTFilter filterWithField:fieldPath filterOperator:filterOperator value:fieldValue]; + FSTFilter *filter = [FSTFilter filterWithField:fieldPath + filterOperator:filterOperator + value:fieldValue]; if ([filter isKindOfClass:[FSTRelationFilter class]]) { [self validateNewRelationFilter:(FSTRelationFilter *)filter]; @@ -612,8 +610,8 @@ - (FSTBound *)boundFromFieldValues:(NSArray *)fieldValues isBefore:(BOOL)isB @"Invalid query. Document ID '%@' contains a slash.", documentID); } const DocumentKey key{self.query.path.Append([documentID UTF8String])}; - [components - addObject:[FSTReferenceValue referenceValue:key databaseID:self.firestore.databaseID]]; + [components addObject:[FSTReferenceValue referenceValue:key + databaseID:self.firestore.databaseID]]; } else { FSTFieldValue *fieldValue = [self.firestore.dataConverter parsedQueryValue:rawValue]; [components addObject:fieldValue]; diff --git a/Firestore/Source/API/FSTFirestoreComponent.mm b/Firestore/Source/API/FSTFirestoreComponent.mm index 875347b46a3..4791c121442 100644 --- a/Firestore/Source/API/FSTFirestoreComponent.mm +++ b/Firestore/Source/API/FSTFirestoreComponent.mm @@ -127,8 +127,8 @@ + (void)load { #pragma mark - Interoperability + (NSArray *)componentsToRegister { - FIRDependency *auth = - [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) isRequired:NO]; + FIRDependency *auth = [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) + isRequired:NO]; FIRComponent *firestoreProvider = [FIRComponent componentWithProtocol:@protocol(FSTFirestoreMultiDBProvider) instantiationTiming:FIRInstantiationTimingLazy diff --git a/Firestore/Source/API/FSTUserDataConverter.mm b/Firestore/Source/API/FSTUserDataConverter.mm index 84e717da3b9..5b981f645f5 100644 --- a/Firestore/Source/API/FSTUserDataConverter.mm +++ b/Firestore/Source/API/FSTUserDataConverter.mm @@ -127,8 +127,8 @@ - (ParsedSetData)parsedMergeData:(id)input fieldMask:(nullable NSArray *)fie ParseAccumulator accumulator{UserDataSource::MergeSet}; - FSTObjectValue *updateData = - (FSTObjectValue *)[self parseData:input context:accumulator.RootContext()]; + FSTObjectValue *updateData = (FSTObjectValue *)[self parseData:input + context:accumulator.RootContext()]; if (fieldMask) { std::set validatedFieldPaths; @@ -191,8 +191,8 @@ - (ParsedUpdateData)parsedUpdateData:(id)input { // Add it to the field mask, but don't add anything to updateData. context.AddToFieldMask(std::move(path)); } else { - FSTFieldValue *_Nullable parsedValue = - [self parseData:value context:context.ChildContext(path)]; + FSTFieldValue *_Nullable parsedValue = [self parseData:value + context:context.ChildContext(path)]; if (parsedValue) { context.AddToFieldMask(path); updateData = [updateData objectBySettingValue:parsedValue forPath:path]; @@ -313,10 +313,9 @@ - (void)parseSentinelFieldValue:(FIRFieldValue *)fieldValue context:(ParseContex } else if (context.data_source() == UserDataSource::Update) { HARD_ASSERT(context.path()->size() > 0, "FieldValue.delete() at the top level should have already been handled."); - FSTThrowInvalidArgument( - @"FieldValue.delete() can only appear at the top level of your " - "update data%s", - context.FieldDescription().c_str()); + FSTThrowInvalidArgument(@"FieldValue.delete() can only appear at the top level of your " + "update data%s", + context.FieldDescription().c_str()); } else { // We shouldn't encounter delete sentinels for queries or non-merge setData calls. FSTThrowInvalidArgument( diff --git a/Firestore/Source/Core/FSTQuery.mm b/Firestore/Source/Core/FSTQuery.mm index f5f3e971652..76598d9c0d5 100644 --- a/Firestore/Source/Core/FSTQuery.mm +++ b/Firestore/Source/Core/FSTQuery.mm @@ -623,8 +623,8 @@ - (NSArray *)sortOrders { // it to be a valid query. Note that the default inequality field and key ordering is // ascending. if (inequalityField->IsKeyFieldPath()) { - self.memoizedSortOrders = - @[ [FSTSortOrder sortOrderWithFieldPath:FieldPath::KeyFieldPath() ascending:YES] ]; + self.memoizedSortOrders = @[ [FSTSortOrder sortOrderWithFieldPath:FieldPath::KeyFieldPath() + ascending:YES] ]; } else { self.memoizedSortOrders = @[ [FSTSortOrder sortOrderWithFieldPath:*inequalityField ascending:YES], @@ -666,7 +666,7 @@ - (instancetype)queryByAddingFilter:(FSTFilter *)filter { const FieldPath *newInequalityField = nullptr; if ([filter isKindOfClass:[FSTRelationFilter class]] && - [((FSTRelationFilter *)filter)isInequality]) { + [((FSTRelationFilter *)filter) isInequality]) { newInequalityField = &filter.field; } const FieldPath *queryInequalityField = [self inequalityFilterField]; diff --git a/Firestore/Source/Core/FSTSyncEngine.mm b/Firestore/Source/Core/FSTSyncEngine.mm index c5ac31f0cbf..41340b93521 100644 --- a/Firestore/Source/Core/FSTSyncEngine.mm +++ b/Firestore/Source/Core/FSTSyncEngine.mm @@ -218,8 +218,8 @@ - (FSTViewSnapshot *)initializeViewAndComputeSnapshotForQueryData:(FSTQueryData DocumentMap docs = [self.localStore executeQuery:queryData.query]; DocumentKeySet remoteKeys = [self.localStore remoteDocumentKeysForTarget:queryData.targetID]; - FSTView *view = - [[FSTView alloc] initWithQuery:queryData.query remoteDocuments:std::move(remoteKeys)]; + FSTView *view = [[FSTView alloc] initWithQuery:queryData.query + remoteDocuments:std::move(remoteKeys)]; FSTViewDocumentChanges *viewDocChanges = [view computeChangesWithDocuments:docs.underlying_map()]; FSTViewChange *viewChange = [view applyChangesToDocuments:viewDocChanges]; HARD_ASSERT(viewChange.limboChanges.count == 0, @@ -506,8 +506,8 @@ - (void)emitNewSnapshotsAndNotifyLocalStoreWithChanges:(const MaybeDocumentMap & targetChange = it->second; } } - FSTViewChange *viewChange = - [queryView.view applyChangesToDocuments:viewDocChanges targetChange:targetChange]; + FSTViewChange *viewChange = [queryView.view applyChangesToDocuments:viewDocChanges + targetChange:targetChange]; [self updateTrackedLimboDocumentsWithChanges:viewChange.limboChanges targetID:queryView.targetID]; diff --git a/Firestore/Source/Core/FSTViewSnapshot.mm b/Firestore/Source/Core/FSTViewSnapshot.mm index 655d8459546..7b356c4d4bf 100644 --- a/Firestore/Source/Core/FSTViewSnapshot.mm +++ b/Firestore/Source/Core/FSTViewSnapshot.mm @@ -117,8 +117,8 @@ - (void)addChange:(FSTDocumentViewChange *)change { } else if (change.type == FSTDocumentViewChangeTypeMetadata && oldChange.type != FSTDocumentViewChangeTypeRemoved) { - FSTDocumentViewChange *newChange = - [FSTDocumentViewChange changeWithDocument:change.document type:oldChange.type]; + FSTDocumentViewChange *newChange = [FSTDocumentViewChange changeWithDocument:change.document + type:oldChange.type]; _changeMap = _changeMap.insert(key, newChange); } else if (change.type == FSTDocumentViewChangeTypeModified && @@ -224,15 +224,15 @@ - (BOOL)hasPendingWrites { } - (NSString *)description { - return - [NSString stringWithFormat: - @"", - self.query, self.documents, self.oldDocuments, self.documentChanges, - (self.fromCache ? @"YES" : @"NO"), static_cast(self.mutatedKeys.size()), - (self.syncStateChanged ? @"YES" : @"NO"), - (self.excludesMetadataChanges ? @"YES" : @"NO")]; + return [NSString + stringWithFormat:@"", + self.query, self.documents, self.oldDocuments, self.documentChanges, + (self.fromCache ? @"YES" : @"NO"), + static_cast(self.mutatedKeys.size()), + (self.syncStateChanged ? @"YES" : @"NO"), + (self.excludesMetadataChanges ? @"YES" : @"NO")]; } - (BOOL)isEqual:(id)object { diff --git a/Firestore/Source/Local/FSTLRUGarbageCollector.mm b/Firestore/Source/Local/FSTLRUGarbageCollector.mm index 3f2ba121004..7994c160131 100644 --- a/Firestore/Source/Local/FSTLRUGarbageCollector.mm +++ b/Firestore/Source/Local/FSTLRUGarbageCollector.mm @@ -123,8 +123,8 @@ - (LruResults)runGCWithLiveTargets:(NSDictionary *)l ListenSequenceNumber upperBound = [self sequenceNumberForQueryCount:sequenceNumbers]; Timestamp foundUpperBound = Timestamp::Now(); - int numTargetsRemoved = - [self removeQueriesUpThroughSequenceNumber:upperBound liveQueries:liveTargets]; + int numTargetsRemoved = [self removeQueriesUpThroughSequenceNumber:upperBound + liveQueries:liveTargets]; Timestamp removedTargets = Timestamp::Now(); int numDocumentsRemoved = [self removeOrphanedDocumentsThroughSequenceNumber:upperBound]; diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm index 9fcec701b83..eea2f4b3d9f 100644 --- a/Firestore/Source/Local/FSTLevelDB.mm +++ b/Firestore/Source/Local/FSTLevelDB.mm @@ -341,8 +341,8 @@ - (instancetype)initWithLevelDB:(std::unique_ptr)db _serializer = serializer; _queryCache = absl::make_unique(self, _serializer); _documentCache = absl::make_unique(self, _serializer); - _referenceDelegate = - [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self lruParams:lruParams]; + _referenceDelegate = [[FSTLevelDBLRUDelegate alloc] initWithPersistence:self + lruParams:lruParams]; _transactionRunner.SetBackingPersistence(self); _users = std::move(users); // TODO(gsoltis): set up a leveldb transaction for these operations. diff --git a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm index f28ba386051..2463514335f 100644 --- a/Firestore/Source/Local/FSTLevelDBMutationQueue.mm +++ b/Firestore/Source/Local/FSTLevelDBMutationQueue.mm @@ -364,10 +364,10 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { std::string mutationKey = LevelDbMutationKey::Key(_userID, rowKey.batch_id()); mutationIterator->Seek(mutationKey); if (!mutationIterator->Valid() || mutationIterator->key() != mutationKey) { - HARD_FAIL( - "Dangling document-mutation reference found: " - "%s points to %s; seeking there found %s", - DescribeKey(indexIterator), DescribeKey(mutationKey), DescribeKey(mutationIterator)); + HARD_FAIL("Dangling document-mutation reference found: " + "%s points to %s; seeking there found %s", + DescribeKey(indexIterator), DescribeKey(mutationKey), + DescribeKey(mutationIterator)); } [result addObject:[self decodedMutationBatch:mutationIterator->value()]]; @@ -474,10 +474,9 @@ - (nullable FSTMutationBatch *)nextMutationBatchAfterBatchID:(BatchId)batchID { std::string mutationKey = LevelDbMutationKey::Key(_userID, batchID); mutationIterator->Seek(mutationKey); if (!mutationIterator->Valid() || mutationIterator->key() != mutationKey) { - HARD_FAIL( - "Dangling document-mutation reference found: " - "Missing batch %s; seeking there found %s", - DescribeKey(mutationKey), DescribeKey(mutationIterator)); + HARD_FAIL("Dangling document-mutation reference found: " + "Missing batch %s; seeking there found %s", + DescribeKey(mutationKey), DescribeKey(mutationIterator)); } [result addObject:[self decodedMutationBatch:mutationIterator->value()]]; @@ -558,8 +557,9 @@ - (void)performConsistencyCheck { /** Parses the MutationQueue metadata from the given LevelDB row contents. */ - (FSTPBMutationQueue *)parsedMetadata:(Slice)slice { - NSData *data = - [[NSData alloc] initWithBytesNoCopy:(void *)slice.data() length:slice.size() freeWhenDone:NO]; + NSData *data = [[NSData alloc] initWithBytesNoCopy:(void *)slice.data() + length:slice.size() + freeWhenDone:NO]; NSError *error; FSTPBMutationQueue *proto = [FSTPBMutationQueue parseFromData:data error:&error]; diff --git a/Firestore/Source/Local/FSTLocalSerializer.mm b/Firestore/Source/Local/FSTLocalSerializer.mm index 3b9a34f52ae..5ad70e43c47 100644 --- a/Firestore/Source/Local/FSTLocalSerializer.mm +++ b/Firestore/Source/Local/FSTLocalSerializer.mm @@ -87,8 +87,8 @@ - (FSTPBMaybeDocument *)encodedMaybeDocument:(FSTMaybeDocument *)document { - (FSTMaybeDocument *)decodedMaybeDocument:(FSTPBMaybeDocument *)proto { switch (proto.documentTypeOneOfCase) { case FSTPBMaybeDocument_DocumentType_OneOfCase_Document: - return - [self decodedDocument:proto.document withCommittedMutations:proto.hasCommittedMutations]; + return [self decodedDocument:proto.document + withCommittedMutations:proto.hasCommittedMutations]; case FSTPBMaybeDocument_DocumentType_OneOfCase_NoDocument: return [self decodedDeletedDocument:proto.noDocument diff --git a/Firestore/Source/Local/FSTLocalStore.mm b/Firestore/Source/Local/FSTLocalStore.mm index 129b7c1b2be..90e4cd2f45a 100644 --- a/Firestore/Source/Local/FSTLocalStore.mm +++ b/Firestore/Source/Local/FSTLocalStore.mm @@ -163,8 +163,8 @@ - (MaybeDocumentMap)userDidChange:(const User &)user { - (FSTLocalWriteResult *)locallyWriteMutations:(NSArray *)mutations { return self.persistence.run("Locally write mutations", [&]() -> FSTLocalWriteResult * { FIRTimestamp *localWriteTime = [FIRTimestamp timestamp]; - FSTMutationBatch *batch = - [self.mutationQueue addMutationBatchWithWriteTime:localWriteTime mutations:mutations]; + FSTMutationBatch *batch = [self.mutationQueue addMutationBatchWithWriteTime:localWriteTime + mutations:mutations]; DocumentKeySet keys = [batch keys]; MaybeDocumentMap changedDocuments = [self.localDocuments documentsForKeys:keys]; return [FSTLocalWriteResult resultForBatchID:batch.batchID changes:std::move(changedDocuments)]; @@ -292,11 +292,10 @@ - (MaybeDocumentMap)applyRemoteEvent:(FSTRemoteEvent *)remoteEvent { _remoteDocumentCache->Add(doc); changedDocs = changedDocs.insert(key, doc); } else { - LOG_DEBUG( - "FSTLocalStore Ignoring outdated watch update for %s. " - "Current version: %s Watch version: %s", - key.ToString(), existingDoc.version.timestamp().ToString(), - doc.version.timestamp().ToString()); + LOG_DEBUG("FSTLocalStore Ignoring outdated watch update for %s. " + "Current version: %s Watch version: %s", + key.ToString(), existingDoc.version.timestamp().ToString(), + doc.version.timestamp().ToString()); } // If this was a limbo resolution, make sure we mark when it was accessed. diff --git a/Firestore/Source/Model/FSTDocument.mm b/Firestore/Source/Model/FSTDocument.mm index aaa3964865b..40f5666f641 100644 --- a/Firestore/Source/Model/FSTDocument.mm +++ b/Firestore/Source/Model/FSTDocument.mm @@ -180,8 +180,8 @@ @implementation FSTDeletedDocument { + (instancetype)documentWithKey:(DocumentKey)key version:(SnapshotVersion)version hasCommittedMutations:(BOOL)committedMutations { - FSTDeletedDocument *deletedDocument = - [[FSTDeletedDocument alloc] initWithKey:std::move(key) version:std::move(version)]; + FSTDeletedDocument *deletedDocument = [[FSTDeletedDocument alloc] initWithKey:std::move(key) + version:std::move(version)]; if (deletedDocument) { deletedDocument->_hasCommittedMutations = committedMutations; diff --git a/Firestore/Source/Public/FIRFirestore.h b/Firestore/Source/Public/FIRFirestore.h index 5e2b40fbd8e..f2c914398ee 100644 --- a/Firestore/Source/Public/FIRFirestore.h +++ b/Firestore/Source/Public/FIRFirestore.h @@ -136,9 +136,9 @@ NS_SWIFT_NAME(Firestore) #pragma mark - Logging /** Enables or disables logging from the Firestore client. */ -+ (void)enableLogging:(BOOL)logging DEPRECATED_MSG_ATTRIBUTE( - "Use FirebaseConfiguration.shared.setLoggerLevel(.debug) to enable " - "logging."); ++ (void)enableLogging:(BOOL)logging + DEPRECATED_MSG_ATTRIBUTE("Use FirebaseConfiguration.shared.setLoggerLevel(.debug) to enable " + "logging."); #pragma mark - Network diff --git a/Firestore/Source/Remote/FSTDatastore.mm b/Firestore/Source/Remote/FSTDatastore.mm index 2bf686ec1bd..06ee2f56ee9 100644 --- a/Firestore/Source/Remote/FSTDatastore.mm +++ b/Firestore/Source/Remote/FSTDatastore.mm @@ -128,8 +128,9 @@ + (NSError *)firestoreErrorForError:(NSError *)error { } else if ([error.domain isEqualToString:kGRPCErrorDomain]) { HARD_ASSERT(error.code >= grpc::CANCELLED && error.code <= grpc::UNAUTHENTICATED, "Unknown GRPC error code: %s", error.code); - return - [NSError errorWithDomain:FIRFirestoreErrorDomain code:error.code userInfo:error.userInfo]; + return [NSError errorWithDomain:FIRFirestoreErrorDomain + code:error.code + userInfo:error.userInfo]; } else { return [NSError errorWithDomain:FIRFirestoreErrorDomain code:FIRFirestoreErrorCodeUnknown diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm index 2ca7c727929..39267a1cf8c 100644 --- a/Firestore/Source/Remote/FSTSerializerBeta.mm +++ b/Firestore/Source/Remote/FSTSerializerBeta.mm @@ -1169,8 +1169,9 @@ - (FSTDocumentWatchChange *)decodedDocumentDelete:(GCFSDocumentDelete *)change { const DocumentKey key = [self decodedDocumentKey:change.document]; // Note that version might be unset in which case we use SnapshotVersion::None() SnapshotVersion version = [self decodedVersion:change.readTime]; - FSTMaybeDocument *document = - [FSTDeletedDocument documentWithKey:key version:version hasCommittedMutations:NO]; + FSTMaybeDocument *document = [FSTDeletedDocument documentWithKey:key + version:version + hasCommittedMutations:NO]; NSArray *removedTargetIds = [self decodedIntegerArray:change.removedTargetIdsArray]; diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm index 454c2b625c7..bec5725e3e5 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/leveldb_query_cache.mm @@ -58,8 +58,8 @@ freeWhenDone:NO]; NSError* error; - FSTPBTargetGlobal* proto = - [FSTPBTargetGlobal parseFromData:data error:&error]; + FSTPBTargetGlobal* proto = [FSTPBTargetGlobal parseFromData:data + error:&error]; if (!proto) { HARD_FAIL("FSTPBTargetGlobal failed to parse: %s", error); } @@ -153,11 +153,10 @@ std::string target_key = LevelDbTargetKey::Key(row_key.target_id()); target_iterator->Seek(target_key); if (!target_iterator->Valid() || target_iterator->key() != target_key) { - HARD_FAIL( - "Dangling query-target reference found: " - "%s points to %s; seeking there found %s", - DescribeKey(index_iterator), DescribeKey(target_key), - DescribeKey(target_iterator)); + HARD_FAIL("Dangling query-target reference found: " + "%s points to %s; seeking there found %s", + DescribeKey(index_iterator), DescribeKey(target_key), + DescribeKey(target_iterator)); } // Finally after finding a potential match, check that the query is actually diff --git a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm index 1a8bbeaecc6..b30aa705c90 100644 --- a/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm +++ b/Firestore/core/src/firebase/firestore/local/leveldb_remote_document_cache.mm @@ -120,8 +120,8 @@ freeWhenDone:NO]; NSError* error; - FSTPBMaybeDocument* proto = - [FSTPBMaybeDocument parseFromData:data error:&error]; + FSTPBMaybeDocument* proto = [FSTPBMaybeDocument parseFromData:data + error:&error]; if (!proto) { HARD_FAIL("FSTPBMaybeDocument failed to parse: %s", error); } diff --git a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.mm b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.mm index 062c003904c..5d5bebf8447 100644 --- a/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.mm +++ b/Firestore/core/src/firebase/firestore/remote/remote_objc_bridge.mm @@ -100,12 +100,12 @@ } } - std::string error_description = StringFormat( - "Unable to parse response from the server.\n" - "Underlying error: %s\n" - "Expected class: %s\n" - "Received value: %s\n", - error, [Proto class], ToHexString(message)); + std::string error_description = + StringFormat("Unable to parse response from the server.\n" + "Underlying error: %s\n" + "Expected class: %s\n" + "Received value: %s\n", + error, [Proto class], ToHexString(message)); *out_status = {FirestoreErrorCode::Internal, error_description}; return nil; diff --git a/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm b/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm index 6df629b8629..807845b6f1d 100644 --- a/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm +++ b/Firestore/core/test/firebase/firestore/auth/firebase_credentials_provider_test.mm @@ -112,8 +112,8 @@ - (void)getTokenForcingRefresh:(BOOL)forceRefresh TEST(FirebaseCredentialsProviderTest, GetToken) { FIRApp* app = testutil::AppForUnitTesting(); - FSTAuthFake* auth = - [[FSTAuthFake alloc] initWithToken:@"token for fake uid" uid:@"fake uid"]; + FSTAuthFake* auth = [[FSTAuthFake alloc] initWithToken:@"token for fake uid" + uid:@"fake uid"]; FirebaseCredentialsProvider credentials_provider(app, auth); credentials_provider.GetToken([](util::StatusOr result) { EXPECT_TRUE(result.ok()); @@ -127,8 +127,8 @@ - (void)getTokenForcingRefresh:(BOOL)forceRefresh TEST(FirebaseCredentialsProviderTest, SetListener) { FIRApp* app = testutil::AppForUnitTesting(); - FSTAuthFake* auth = - [[FSTAuthFake alloc] initWithToken:@"default token" uid:@"fake uid"]; + FSTAuthFake* auth = [[FSTAuthFake alloc] initWithToken:@"default token" + uid:@"fake uid"]; FirebaseCredentialsProvider credentials_provider(app, auth); credentials_provider.SetCredentialChangeListener([](User user) { EXPECT_EQ("fake uid", user.uid()); @@ -140,8 +140,8 @@ - (void)getTokenForcingRefresh:(BOOL)forceRefresh TEST(FirebaseCredentialsProviderTest, InvalidateToken) { FIRApp* app = testutil::AppForUnitTesting(); - FSTAuthFake* auth = - [[FSTAuthFake alloc] initWithToken:@"token for fake uid" uid:@"fake uid"]; + FSTAuthFake* auth = [[FSTAuthFake alloc] initWithToken:@"token for fake uid" + uid:@"fake uid"]; FirebaseCredentialsProvider credentials_provider(app, auth); credentials_provider.InvalidateToken(); credentials_provider.GetToken([&auth](util::StatusOr result) { diff --git a/Firestore/core/test/firebase/firestore/remote/datastore_test.mm b/Firestore/core/test/firebase/firestore/remote/datastore_test.mm index ee6a18b268f..34d14441a11 100644 --- a/Firestore/core/test/firebase/firestore/remote/datastore_test.mm +++ b/Firestore/core/test/firebase/firestore/remote/datastore_test.mm @@ -161,13 +161,12 @@ void ForceFinishAnyTypeOrder( {"x-google-service", "service 2"}, // Duplicate names are allowed }; std::string result = Datastore::GetWhitelistedHeadersAsString(headers); - EXPECT_EQ(result, - "date: date value\n" - "x-google-backends: backend value\n" - "x-google-gfe-request-trace: request trace\n" - "x-google-netmon-label: netmon label\n" - "x-google-service: service 1\n" - "x-google-service: service 2\n"); + EXPECT_EQ(result, "date: date value\n" + "x-google-backends: backend value\n" + "x-google-gfe-request-trace: request trace\n" + "x-google-netmon-label: netmon label\n" + "x-google-service: service 1\n" + "x-google-service: service 2\n"); } // Normal operation diff --git a/Functions/Example/IntegrationTests/FIRIntegrationTests.m b/Functions/Example/IntegrationTests/FIRIntegrationTests.m index 4f8b750052b..ce7e1215484 100644 --- a/Functions/Example/IntegrationTests/FIRIntegrationTests.m +++ b/Functions/Example/IntegrationTests/FIRIntegrationTests.m @@ -90,11 +90,11 @@ - (void)testToken { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [functions HTTPSCallableWithName:@"tokenTest"]; [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNil(error); - XCTAssertEqualObjects(@{}, result.data); - [expectation fulfill]; - }]; + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNil(error); + XCTAssertEqualObjects(@{}, result.data); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } @@ -102,11 +102,11 @@ - (void)testInstanceID { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [_functions HTTPSCallableWithName:@"instanceIdTest"]; [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNil(error); - XCTAssertEqualObjects(@{}, result.data); - [expectation fulfill]; - }]; + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNil(error); + XCTAssertEqualObjects(@{}, result.data); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } @@ -148,11 +148,11 @@ - (void)testUnhandledError { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [_functions HTTPSCallableWithName:@"unhandledErrorTest"]; [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNotNil(error); - XCTAssertEqual(FIRFunctionsErrorCodeInternal, error.code); - [expectation fulfill]; - }]; + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNotNil(error); + XCTAssertEqual(FIRFunctionsErrorCodeInternal, error.code); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } @@ -160,26 +160,27 @@ - (void)testUnknownError { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [_functions HTTPSCallableWithName:@"unknownErrorTest"]; [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNotNil(error); - XCTAssertEqual(FIRFunctionsErrorCodeInternal, error.code); - [expectation fulfill]; - }]; + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNotNil(error); + XCTAssertEqual(FIRFunctionsErrorCodeInternal, error.code); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } - (void)testExplicitError { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [_functions HTTPSCallableWithName:@"explicitErrorTest"]; - [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNotNil(error); - XCTAssertEqual(FIRFunctionsErrorCodeOutOfRange, error.code); - XCTAssertEqualObjects(@"explicit nope", error.userInfo[NSLocalizedDescriptionKey]); - NSDictionary *expectedDetails = @{@"start" : @10, @"end" : @20, @"long" : @30L}; - XCTAssertEqualObjects(expectedDetails, error.userInfo[FIRFunctionsErrorDetailsKey]); - [expectation fulfill]; - }]; + [function + callWithObject:@{} + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNotNil(error); + XCTAssertEqual(FIRFunctionsErrorCodeOutOfRange, error.code); + XCTAssertEqualObjects(@"explicit nope", error.userInfo[NSLocalizedDescriptionKey]); + NSDictionary *expectedDetails = @{@"start" : @10, @"end" : @20, @"long" : @30L}; + XCTAssertEqualObjects(expectedDetails, error.userInfo[FIRFunctionsErrorDetailsKey]); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } @@ -187,11 +188,11 @@ - (void)testHttpError { XCTestExpectation *expectation = [[XCTestExpectation alloc] init]; FIRHTTPSCallable *function = [_functions HTTPSCallableWithName:@"httpErrorTest"]; [function callWithObject:@{} - completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { - XCTAssertNotNil(error); - XCTAssertEqual(FIRFunctionsErrorCodeInvalidArgument, error.code); - [expectation fulfill]; - }]; + completion:^(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error) { + XCTAssertNotNil(error); + XCTAssertEqual(FIRFunctionsErrorCodeInvalidArgument, error.code); + [expectation fulfill]; + }]; [self waitForExpectations:@[ expectation ] timeout:10]; } diff --git a/Functions/Example/Tests/FIRFunctionsTests.m b/Functions/Example/Tests/FIRFunctionsTests.m index 954a0015002..875a8171942 100644 --- a/Functions/Example/Tests/FIRFunctionsTests.m +++ b/Functions/Example/Tests/FIRFunctionsTests.m @@ -31,8 +31,9 @@ - (void)tearDown { } - (void)testURLWithName { - FIRFunctions *functions = - [[FIRFunctions alloc] initWithProjectID:@"my-project" region:@"my-region" auth:nil]; + FIRFunctions *functions = [[FIRFunctions alloc] initWithProjectID:@"my-project" + region:@"my-region" + auth:nil]; NSString *url = [functions URLWithName:@"my-endpoint"]; XCTAssertEqualObjects(@"https://my-region-my-project.cloudfunctions.net/my-endpoint", url); } diff --git a/Functions/FirebaseFunctions/FIRFunctions.m b/Functions/FirebaseFunctions/FIRFunctions.m index 9342db52e93..115ebc88539 100644 --- a/Functions/FirebaseFunctions/FIRFunctions.m +++ b/Functions/FirebaseFunctions/FIRFunctions.m @@ -85,8 +85,8 @@ + (void)load { *isCacheable = YES; return [self functionsForApp:container.app]; }; - FIRDependency *auth = - [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) isRequired:NO]; + FIRDependency *auth = [FIRDependency dependencyWithProtocol:@protocol(FIRAuthInterop) + isRequired:NO]; FIRComponent *internalProvider = [FIRComponent componentWithProtocol:@protocol(FIRFunctionsInstanceProvider) instantiationTiming:FIRInstantiationTimingLazy diff --git a/GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m b/GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m index 59f400dcc6c..bb71991b0e7 100644 --- a/GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m +++ b/GoogleUtilities/AppDelegateSwizzler/GULAppDelegateSwizzler.m @@ -335,8 +335,8 @@ + (void)createSubclassWithObject:(id)anObject { NSValue *continueUserActivityIMPPointer = [NSValue valueWithPointer:continueUserActivityIMP]; // For application:openURL:sourceApplication:annotation: - SEL openURLSourceApplicationAnnotationSEL = - @selector(application:openURL:sourceApplication:annotation:); + SEL openURLSourceApplicationAnnotationSEL = @selector(application: + openURL:sourceApplication:annotation:); [GULAppDelegateSwizzler addInstanceMethodWithSelector:openURLSourceApplicationAnnotationSEL fromClass:[GULAppDelegateSwizzler class] toClass:appDelegateSubClass]; @@ -348,8 +348,8 @@ + (void)createSubclassWithObject:(id)anObject { [NSValue valueWithPointer:openURLSourceApplicationAnnotationIMP]; // For application:handleEventsForBackgroundURLSession:completionHandler: - SEL handleEventsForBackgroundURLSessionSEL = - @selector(application:handleEventsForBackgroundURLSession:completionHandler:); + SEL handleEventsForBackgroundURLSessionSEL = @selector(application: + handleEventsForBackgroundURLSession:completionHandler:); [GULAppDelegateSwizzler addInstanceMethodWithSelector:handleEventsForBackgroundURLSessionSEL fromClass:[GULAppDelegateSwizzler class] toClass:appDelegateSubClass]; @@ -602,8 +602,8 @@ - (void)application:(UIApplication *)application [handleBackgroundSessionPointer pointerValue]; // Notify interceptors. - SEL methodSelector = - @selector(application:handleEventsForBackgroundURLSession:completionHandler:); + SEL methodSelector = @selector(application: + handleEventsForBackgroundURLSession:completionHandler:); [GULAppDelegateSwizzler notifyInterceptorsWithMethodSelector:methodSelector callback:^(id interceptor) { diff --git a/GoogleUtilities/Example/GoogleUtilities.xcodeproj/project.pbxproj b/GoogleUtilities/Example/GoogleUtilities.xcodeproj/project.pbxproj index 8307b1c52d1..754333d6676 100644 --- a/GoogleUtilities/Example/GoogleUtilities.xcodeproj/project.pbxproj +++ b/GoogleUtilities/Example/GoogleUtilities.xcodeproj/project.pbxproj @@ -14,6 +14,9 @@ 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; DE5CF98E20F686310063FFDD /* GULAppEnvironmentUtilTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DE5CF98C20F686290063FFDD /* GULAppEnvironmentUtilTest.m */; }; + DE84BBC421D7EC900048A176 /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE84BBC321D7EC900048A176 /* GULUserDefaultsTests.m */; }; + DE84BBC521D7EC900048A176 /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE84BBC321D7EC900048A176 /* GULUserDefaultsTests.m */; }; + DE84BBC621D7EC900048A176 /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DE84BBC321D7EC900048A176 /* GULUserDefaultsTests.m */; }; DEC977D720F68C3300014E20 /* GULReachabilityCheckerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC977D320F68C3300014E20 /* GULReachabilityCheckerTest.m */; }; DEC977D820F68C3300014E20 /* GULMutableDictionaryTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC977D520F68C3300014E20 /* GULMutableDictionaryTest.m */; }; DEC977D920F68C3300014E20 /* GULNetworkTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC977D620F68C3300014E20 /* GULNetworkTest.m */; }; @@ -46,9 +49,6 @@ DEC9788720F6E1E000014E20 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DEC9788020F6E1DF00014E20 /* Main.storyboard */; }; DEC9788820F6E1E000014E20 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC9788120F6E1DF00014E20 /* main.m */; }; DEC9788920F6E1E000014E20 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC9788220F6E1DF00014E20 /* AppDelegate.m */; }; - ED18C2A0213EDB98009F633D /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = ED18C29F213EDB98009F633D /* GULUserDefaultsTests.m */; }; - ED18C2A1213EDB98009F633D /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = ED18C29F213EDB98009F633D /* GULUserDefaultsTests.m */; }; - ED18C2A2213EDB98009F633D /* GULUserDefaultsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = ED18C29F213EDB98009F633D /* GULUserDefaultsTests.m */; }; EFBE67FA2101401100E756A7 /* GULSwizzlerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EFBE67F02101401100E756A7 /* GULSwizzlerTest.m */; }; EFBE67FB2101401100E756A7 /* GULSwizzlingCacheTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EFBE67F12101401100E756A7 /* GULSwizzlingCacheTest.m */; }; EFBE67FC2101401100E756A7 /* GULRuntimeClassDiffTests.m in Sources */ = {isa = PBXBuildFile; fileRef = EFBE67F22101401100E756A7 /* GULRuntimeClassDiffTests.m */; }; @@ -94,6 +94,7 @@ 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; 7BEA793625C8DE7C8EC60006 /* GoogleUtilities.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = GoogleUtilities.podspec; path = ../GoogleUtilities.podspec; sourceTree = ""; }; DE5CF98C20F686290063FFDD /* GULAppEnvironmentUtilTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULAppEnvironmentUtilTest.m; sourceTree = ""; }; + DE84BBC321D7EC900048A176 /* GULUserDefaultsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULUserDefaultsTests.m; sourceTree = ""; }; DEC977D320F68C3300014E20 /* GULReachabilityCheckerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULReachabilityCheckerTest.m; sourceTree = ""; }; DEC977D520F68C3300014E20 /* GULMutableDictionaryTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULMutableDictionaryTest.m; sourceTree = ""; }; DEC977D620F68C3300014E20 /* GULNetworkTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULNetworkTest.m; sourceTree = ""; }; @@ -129,7 +130,6 @@ DEC9788320F6E1DF00014E20 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; DEC9788420F6E1DF00014E20 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; E0A8D570636E99E7C3396DF8 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - ED18C29F213EDB98009F633D /* GULUserDefaultsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GULUserDefaultsTests.m; sourceTree = ""; }; EFBE67F02101401100E756A7 /* GULSwizzlerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULSwizzlerTest.m; sourceTree = ""; }; EFBE67F12101401100E756A7 /* GULSwizzlingCacheTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULSwizzlingCacheTest.m; sourceTree = ""; }; EFBE67F22101401100E756A7 /* GULRuntimeClassDiffTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GULRuntimeClassDiffTests.m; sourceTree = ""; }; @@ -235,7 +235,7 @@ 6003F5B5195388D20070C39A /* Tests */ = { isa = PBXGroup; children = ( - ED18C29E213ED7B9009F633D /* User Defaults */, + DE84BBC221D7EC900048A176 /* UserDefaults */, EFBE67EF2101401100E756A7 /* Swizzler */, DEC977DE20F6A7A700014E20 /* Logger */, DEC977D420F68C3300014E20 /* Network */, @@ -272,6 +272,14 @@ path = Environment; sourceTree = ""; }; + DE84BBC221D7EC900048A176 /* UserDefaults */ = { + isa = PBXGroup; + children = ( + DE84BBC321D7EC900048A176 /* GULUserDefaultsTests.m */, + ); + path = UserDefaults; + sourceTree = ""; + }; DEC977D220F68C3300014E20 /* Reachability */ = { isa = PBXGroup; children = ( @@ -352,14 +360,6 @@ path = tvOS; sourceTree = ""; }; - ED18C29E213ED7B9009F633D /* User Defaults */ = { - isa = PBXGroup; - children = ( - ED18C29F213EDB98009F633D /* GULUserDefaultsTests.m */, - ); - path = "User Defaults"; - sourceTree = ""; - }; EFBE67EF2101401100E756A7 /* Swizzler */ = { isa = PBXGroup; children = ( @@ -610,8 +610,8 @@ EFBE67FF2101401100E756A7 /* GULRuntimeDiffTests.m in Sources */, DEC977DD20F68FE100014E20 /* GTMHTTPServer.m in Sources */, EFBE68022101401100E756A7 /* GULRuntimeSnapshotTests.m in Sources */, - ED18C2A0213EDB98009F633D /* GULUserDefaultsTests.m in Sources */, EFBE68002101401100E756A7 /* GULSwizzlerInheritedMethodsSwizzlingTest.m in Sources */, + DE84BBC421D7EC900048A176 /* GULUserDefaultsTests.m in Sources */, EFBE68012101401100E756A7 /* GULRuntimeStateHelperTests.m in Sources */, DEC977D820F68C3300014E20 /* GULMutableDictionaryTest.m in Sources */, DEC977E120F6A7C100014E20 /* GULLoggerTest.m in Sources */, @@ -643,7 +643,7 @@ DEC9781920F6D38500014E20 /* GULAppEnvironmentUtilTest.m in Sources */, DEC9781A20F6D38800014E20 /* GULReachabilityCheckerTest.m in Sources */, DEC9781820F6D37400014E20 /* GULLoggerTest.m in Sources */, - ED18C2A1213EDB98009F633D /* GULUserDefaultsTests.m in Sources */, + DE84BBC521D7EC900048A176 /* GULUserDefaultsTests.m in Sources */, DEC9781D20F6D39900014E20 /* GTMHTTPServer.m in Sources */, DEC9781B20F6D39500014E20 /* GULMutableDictionaryTest.m in Sources */, DEC9781C20F6D39500014E20 /* GULNetworkTest.m in Sources */, @@ -667,7 +667,7 @@ DEC9786920F6D66300014E20 /* GTMHTTPServer.m in Sources */, DEC9786B20F6D66300014E20 /* GULNetworkTest.m in Sources */, DEC9786A20F6D66300014E20 /* GULMutableDictionaryTest.m in Sources */, - ED18C2A2213EDB98009F633D /* GULUserDefaultsTests.m in Sources */, + DE84BBC621D7EC900048A176 /* GULUserDefaultsTests.m in Sources */, DEC9786C20F6D66700014E20 /* GULReachabilityCheckerTest.m in Sources */, DEC9786820F6D65B00014E20 /* GULLoggerTest.m in Sources */, DEC9786D20F6D66B00014E20 /* GULAppEnvironmentUtilTest.m in Sources */, diff --git a/GoogleUtilities/Example/Tests/Network/GULNetworkTest.m b/GoogleUtilities/Example/Tests/Network/GULNetworkTest.m index 4d315037cf4..0fb973bf4df 100644 --- a/GoogleUtilities/Example/Tests/Network/GULNetworkTest.m +++ b/GoogleUtilities/Example/Tests/Network/GULNetworkTest.m @@ -93,8 +93,8 @@ - (void)testReachability { XCTAssertNotNil(reachability); id reachabilityMock = OCMPartialMock(reachability); - [[[reachabilityMock stub] andCall:@selector(reachabilityStatus) onObject:self] - reachabilityStatus]; + [[[reachabilityMock stub] andCall:@selector(reachabilityStatus) + onObject:self] reachabilityStatus]; // Fake scenario with connectivity. _fakeNetworkIsReachable = YES; @@ -504,8 +504,8 @@ - (void)testSessionNetworkAsync_GET_foreground { usingBackgroundSession:NO completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, "There must be no pending request"); @@ -601,8 +601,8 @@ - (void)testNilQueueNSURLSession_GET_foreground { usingBackgroundSession:NO completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, "There must be no pending request"); @@ -631,8 +631,8 @@ - (void)testHasRequestPendingNSURLSession_GET_foreground { usingBackgroundSession:NO completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, @@ -665,8 +665,8 @@ - (void)testHeaders_foreground { usingBackgroundSession:NO completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); @@ -700,8 +700,8 @@ - (void)testSessionNetworkAsync_GET_background { usingBackgroundSession:YES completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, "There must be no pending request"); @@ -797,8 +797,8 @@ - (void)testNilQueueNSURLSession_GET_background { usingBackgroundSession:YES completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, "There must be no pending request"); @@ -827,8 +827,8 @@ - (void)testHasRequestPendingNSURLSession_GET_background { usingBackgroundSession:YES completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); XCTAssertFalse(self->_network.hasUploadInProgress, @@ -861,8 +861,8 @@ - (void)testHeaders_background { usingBackgroundSession:YES completionHandler:^(NSHTTPURLResponse *response, NSData *data, NSError *error) { XCTAssertNotNil(data); - NSString *responseBody = - [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; + NSString *responseBody = [[NSString alloc] initWithData:data + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(responseBody, @"Hello, World!"); XCTAssertNil(error); @@ -953,8 +953,8 @@ - (void)verifyRequest { // Test whether the request is compressed correctly. NSData *requestBody = [_request body]; NSData *decompressedRequestData = [NSData gul_dataByInflatingGzippedData:requestBody error:NULL]; - NSString *requestString = - [[NSString alloc] initWithData:decompressedRequestData encoding:NSUTF8StringEncoding]; + NSString *requestString = [[NSString alloc] initWithData:decompressedRequestData + encoding:NSUTF8StringEncoding]; XCTAssertEqualObjects(requestString, @"Google", @"Request is not compressed correctly."); // The request has to be a POST. diff --git a/GoogleUtilities/Example/Tests/Reachability/GULReachabilityCheckerTest.m b/GoogleUtilities/Example/Tests/Reachability/GULReachabilityCheckerTest.m index da9fbf13fbc..07cf2750d28 100644 --- a/GoogleUtilities/Example/Tests/Reachability/GULReachabilityCheckerTest.m +++ b/GoogleUtilities/Example/Tests/Reachability/GULReachabilityCheckerTest.m @@ -58,8 +58,8 @@ - (void)releaseReachability:(const void *)reachability; static SCNetworkReachabilityRef ReachabilityCreateWithName(CFAllocatorRef allocator, const char *hostname) { - return (SCNetworkReachabilityRef) - [FakeReachabilityTest createReachabilityWithAllocator:allocator withName:hostname]; + return (SCNetworkReachabilityRef)[FakeReachabilityTest createReachabilityWithAllocator:allocator + withName:hostname]; } static Boolean ReachabilitySetCallback(SCNetworkReachabilityRef reachability, diff --git a/GoogleUtilities/Example/Tests/Swizzler/GULAppDelegateSwizzlerTest.m b/GoogleUtilities/Example/Tests/Swizzler/GULAppDelegateSwizzlerTest.m index e9fa793be9d..4eb1cbc9cdf 100644 --- a/GoogleUtilities/Example/Tests/Swizzler/GULAppDelegateSwizzlerTest.m +++ b/GoogleUtilities/Example/Tests/Swizzler/GULAppDelegateSwizzlerTest.m @@ -98,8 +98,8 @@ + (void)load { gRespondsToOpenURLHandler_iOS9 = [self instancesRespondToSelector:@selector(application:openURL:options:)]; gRespondsToHandleBackgroundSession = - [self instancesRespondToSelector:@selector - (application:handleEventsForBackgroundURLSession:completionHandler:)]; + [self instancesRespondToSelector:@selector(application: + handleEventsForBackgroundURLSession:completionHandler:)]; gRespondsToContinueUserActivity = [self instancesRespondToSelector:@selector(application:continueUserActivity:restorationHandler:)]; #pragma clang diagnostic pop @@ -236,12 +236,12 @@ - (void)testProxyAppDelegate { // After being proxied, it should be able to respond to the required method selector. XCTAssertTrue([realAppDelegate respondsToSelector:@selector(application:openURL:sourceApplication:annotation:)]); - XCTAssertTrue([realAppDelegate - respondsToSelector:@selector(application:continueUserActivity:restorationHandler:)]); + XCTAssertTrue([realAppDelegate respondsToSelector:@selector(application: + continueUserActivity:restorationHandler:)]); XCTAssertTrue([realAppDelegate respondsToSelector:@selector(application:openURL:options:)]); - XCTAssertTrue( - [realAppDelegate respondsToSelector:@selector - (application:handleEventsForBackgroundURLSession:completionHandler:)]); + XCTAssertTrue([realAppDelegate + respondsToSelector:@selector(application: + handleEventsForBackgroundURLSession:completionHandler:)]); // Make sure that the class has changed. XCTAssertNotEqualObjects([realAppDelegate class], realAppDelegateClassBefore); diff --git a/GoogleUtilities/Example/Tests/Swizzler/GULRuntimeStateHelperTests.m b/GoogleUtilities/Example/Tests/Swizzler/GULRuntimeStateHelperTests.m index 9edc6410bd1..6d5ae6bab70 100644 --- a/GoogleUtilities/Example/Tests/Swizzler/GULRuntimeStateHelperTests.m +++ b/GoogleUtilities/Example/Tests/Swizzler/GULRuntimeStateHelperTests.m @@ -72,9 +72,8 @@ - (void)testDiffBetweenFirstSnapshotSecondSnapshot { } } } - XCTAssertTrue(found, - @"One of the classdiffs should contain the address of the original IMP of " - "the method that was modified above"); + XCTAssertTrue(found, @"One of the classdiffs should contain the address of the original IMP of " + "the method that was modified above"); } #pragma mark - Helper methods diff --git a/GoogleUtilities/Example/Tests/Swizzler/GULSwizzlerTest.m b/GoogleUtilities/Example/Tests/Swizzler/GULSwizzlerTest.m index e4cd2888f61..ea3017d00d8 100644 --- a/GoogleUtilities/Example/Tests/Swizzler/GULSwizzlerTest.m +++ b/GoogleUtilities/Example/Tests/Swizzler/GULSwizzlerTest.m @@ -90,10 +90,12 @@ - (void)testOriginalImpInstanceMethod { - (void)testCurrentImplementationReturnsDifferentIMPsForClassAndInstanceMethod { Class aClass = [NSObject class]; SEL aSelector = @selector(description); - IMP descriptionClassIMP = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:NO]; - IMP descriptionInstanceIMP = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:YES]; + IMP descriptionClassIMP = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:NO]; + IMP descriptionInstanceIMP = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:YES]; XCTAssertNotEqual(descriptionClassIMP, descriptionInstanceIMP); } @@ -103,10 +105,12 @@ - (void)testCurrentImplementationReturnsDifferentIMPsForClassAndInstanceMethod { - (void)testCurrentImplementationReturnsSameIMPsWhenNotSwizzledBetweenInvocations { Class aClass = [NSObject class]; SEL aSelector = @selector(description); - IMP descriptionClassIMPOne = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:NO]; - IMP descriptionClassIMPTwo = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:NO]; + IMP descriptionClassIMPOne = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:NO]; + IMP descriptionClassIMPTwo = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:NO]; XCTAssertEqual(descriptionClassIMPOne, descriptionClassIMPTwo); } @@ -116,8 +120,9 @@ - (void)testCurrentImplementationReturnsSameIMPsWhenNotSwizzledBetweenInvocation - (void)testCurrentImplementationReturnsDifferentIMPsWhenSwizzledBetweenInvocations { Class aClass = [NSObject class]; SEL aSelector = @selector(description); - IMP originalIMP = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:NO]; + IMP originalIMP = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:NO]; NSString * (^newImplementation)(id) = ^NSString *(id _self) { return @"nonsense"; }; @@ -125,8 +130,9 @@ - (void)testCurrentImplementationReturnsDifferentIMPsWhenSwizzledBetweenInvocati selector:aSelector isClassSelector:NO withBlock:newImplementation]; - IMP newIMP = - [GULSwizzler currentImplementationForClass:aClass selector:aSelector isClassSelector:NO]; + IMP newIMP = [GULSwizzler currentImplementationForClass:aClass + selector:aSelector + isClassSelector:NO]; XCTAssertNotEqual(newIMP, originalIMP); [GULSwizzler unswizzleClass:aClass selector:aSelector isClassSelector:NO]; } @@ -136,8 +142,9 @@ - (void)testOriginalImpCallThrough { SEL selector = @selector(description); Class aClass = [NSObject class]; id newDescription = ^NSString *(id object) { - IMP originalImp = - [GULSwizzler originalImplementationForClass:aClass selector:selector isClassSelector:NO]; + IMP originalImp = [GULSwizzler originalImplementationForClass:aClass + selector:selector + isClassSelector:NO]; NSString *originalDescription = GUL_INVOKE_ORIGINAL_IMP0(object, selector, NSString *, originalImp); diff --git a/GoogleUtilities/Example/Tests/User Defaults/GULUserDefaultsTests.m b/GoogleUtilities/Example/Tests/UserDefaults/GULUserDefaultsTests.m similarity index 95% rename from GoogleUtilities/Example/Tests/User Defaults/GULUserDefaultsTests.m rename to GoogleUtilities/Example/Tests/UserDefaults/GULUserDefaultsTests.m index e38d2741695..2b957307813 100644 --- a/GoogleUtilities/Example/Tests/User Defaults/GULUserDefaultsTests.m +++ b/GoogleUtilities/Example/Tests/UserDefaults/GULUserDefaultsTests.m @@ -83,7 +83,7 @@ - (void)testNewUserDefaultsWithStandardUserDefaults { XCTAssertEqualObjects([userDefaults objectForKey:key3], array); NSString *key4 = @"DictionaryKey"; - NSDictionary *dictionary = @{ @"testing" : @"Hi there!" }; + NSDictionary *dictionary = @{@"testing" : @"Hi there!"}; [newUserDefaults setObject:dictionary forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary); XCTAssertEqualObjects([newUserDefaults dictionaryForKey:key4], dictionary); @@ -115,8 +115,8 @@ - (void)testNewUserDefaultsWithStandardUserDefaults { XCTAssertNotNil([userDefaults objectForKey:key7]); XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[newUserDefaults objectForKey:key7]], 0.0, sEpsilon); - XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], - 0.0, sEpsilon); + XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], 0.0, + sEpsilon); NSString *key8 = @"FloatKey"; [newUserDefaults setFloat:0.99 forKey:key8]; @@ -146,7 +146,7 @@ - (void)testNewUserDefaultsWithStandardUserDefaults { XCTAssertEqualObjects([newUserDefaults arrayForKey:key3], array2); XCTAssertEqualObjects([userDefaults objectForKey:key3], array2); - NSDictionary *dictionary2 = @{ @"testing 2" : @3 }; + NSDictionary *dictionary2 = @{@"testing 2" : @3}; [newUserDefaults setObject:dictionary2 forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary2); XCTAssertEqualObjects([newUserDefaults dictionaryForKey:key4], dictionary2); @@ -202,7 +202,7 @@ - (void)testNSUserDefaultsWithNewUserDefaults { XCTAssertEqualObjects([userDefaults objectForKey:key3], array); NSString *key4 = @"DictionaryKey"; - NSDictionary *dictionary = @{ @"testing" : @"Hi there!" }; + NSDictionary *dictionary = @{@"testing" : @"Hi there!"}; [userDefaults setObject:dictionary forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary); XCTAssertEqualObjects([newUserDefaults dictionaryForKey:key4], dictionary); @@ -234,8 +234,8 @@ - (void)testNSUserDefaultsWithNewUserDefaults { XCTAssertNotNil([userDefaults objectForKey:key7]); XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[newUserDefaults objectForKey:key7]], 0.0, sEpsilon); - XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], - 0.0, sEpsilon); + XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], 0.0, + sEpsilon); NSString *key8 = @"FloatKey"; [userDefaults setFloat:0.99 forKey:key8]; @@ -265,7 +265,7 @@ - (void)testNSUserDefaultsWithNewUserDefaults { XCTAssertEqualObjects([newUserDefaults arrayForKey:key3], array2); XCTAssertEqualObjects([userDefaults objectForKey:key3], array2); - NSDictionary *dictionary2 = @{ @"testing 2" : @3 }; + NSDictionary *dictionary2 = @{@"testing 2" : @3}; [userDefaults setObject:dictionary2 forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary2); XCTAssertEqualObjects([newUserDefaults dictionaryForKey:key4], dictionary2); @@ -322,7 +322,7 @@ - (void)testNewSharedUserDefaultsWithStandardUserDefaults { XCTAssertEqualObjects([userDefaults objectForKey:key3], array); NSString *key4 = @"DictionaryKey"; - NSDictionary *dictionary = @{ @"testing" : @"Hi there!" }; + NSDictionary *dictionary = @{@"testing" : @"Hi there!"}; [userDefaults setObject:dictionary forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary); XCTAssertEqualObjects([newUserDefaults dictionaryForKey:key4], dictionary); @@ -354,8 +354,8 @@ - (void)testNewSharedUserDefaultsWithStandardUserDefaults { XCTAssertNotNil([userDefaults objectForKey:key7]); XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[newUserDefaults objectForKey:key7]], 0.0, sEpsilon); - XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], - 0.0, sEpsilon); + XCTAssertEqualWithAccuracy([testDate timeIntervalSinceDate:[userDefaults objectForKey:key7]], 0.0, + sEpsilon); // Remove all of the objects from the normal NSUserDefaults. The values from the new user // defaults must also be cleared! @@ -380,7 +380,7 @@ - (void)testNewSharedUserDefaultsWithStandardUserDefaults { XCTAssertEqualObjects([newUserDefaults arrayForKey:key3], array2); XCTAssertEqualObjects([userDefaults objectForKey:key3], array2); - NSDictionary *dictionary2 = @{ @"testing 2" : @3 }; + NSDictionary *dictionary2 = @{@"testing 2" : @3}; [userDefaults setObject:dictionary2 forKey:key4]; XCTAssertEqualObjects([newUserDefaults objectForKey:key4], dictionary2); XCTAssertEqualObjects([userDefaults objectForKey:key4], dictionary2); @@ -413,10 +413,10 @@ - (void)testUserDefaultNotifications { }; id observer = - [[NSNotificationCenter defaultCenter] addObserverForName:NSUserDefaultsDidChangeNotification - object:nil - queue:nil - usingBlock:callBlock]; + [[NSNotificationCenter defaultCenter] addObserverForName:NSUserDefaultsDidChangeNotification + object:nil + queue:nil + usingBlock:callBlock]; NSString *suiteName = @"test_suite_notification"; GULUserDefaults *newUserDefaults = [[GULUserDefaults alloc] initWithSuiteName:suiteName]; [newUserDefaults setObject:@"134" forKey:@"test-another"]; @@ -453,7 +453,8 @@ - (void)testSynchronizeToDisk { [newUserDefaults setObject:@"134" forKey:@"test-another"]; [newUserDefaults synchronize]; - XCTAssertTrue([fileManager fileExistsAtPath:filePath], @"The user defaults file was not synchronized to disk."); + XCTAssertTrue([fileManager fileExistsAtPath:filePath], + @"The user defaults file was not synchronized to disk."); // Now get the file directly from disk. XCTAssertTrue([fileManager fileExistsAtPath:filePath]); @@ -564,7 +565,7 @@ - (void)testNewUserDefaultsThreadSafeAddingObjects { XCTestExpectation *expectation = [self expectationForPredicate:dictionarySize evaluatedWithObject:dictionary handler:nil]; - [self waitForExpectations:@[expectation] timeout:kGULTestCaseTimeoutInterval]; + [self waitForExpectations:@[ expectation ] timeout:kGULTestCaseTimeoutInterval]; for (int i = 0; i < itemCount; i++) { NSString *key = [NSString stringWithFormat:@"%d", i]; @@ -608,7 +609,7 @@ - (void)testNewUserDefaultsRemovingObjects { XCTestExpectation *expectation = [self expectationForPredicate:emptyDictionary evaluatedWithObject:dictionary handler:nil]; - [self waitForExpectations:@[expectation] timeout:kGULTestCaseTimeoutInterval]; + [self waitForExpectations:@[ expectation ] timeout:kGULTestCaseTimeoutInterval]; for (int i = 0; i < itemCount; i++) { NSString *key = [NSString stringWithFormat:@"%d", i]; @@ -649,7 +650,7 @@ - (void)testNewUserDefaultsRemovingSomeObjects { XCTestExpectation *expectation = [self expectationForPredicate:dictionarySize evaluatedWithObject:dictionary handler:nil]; - [self waitForExpectations:@[expectation] timeout:kGULTestCaseTimeoutInterval]; + [self waitForExpectations:@[ expectation ] timeout:kGULTestCaseTimeoutInterval]; // Check the remaining of the user defaults. for (int i = 0; i < itemCount; i++) { @@ -691,7 +692,7 @@ - (void)testBothUserDefaultsThreadSafeAddingObjects { XCTestExpectation *expectation = [self expectationForPredicate:dictionarySize evaluatedWithObject:dictionary handler:nil]; - [self waitForExpectations:@[expectation] timeout:kGULTestCaseTimeoutInterval]; + [self waitForExpectations:@[ expectation ] timeout:kGULTestCaseTimeoutInterval]; for (int i = 0; i < itemCount; i++) { NSString *key = [NSString stringWithFormat:@"%d", i]; @@ -739,7 +740,7 @@ - (void)testBothUserDefaultsRemovingSomeObjects { XCTestExpectation *expectation = [self expectationForPredicate:dictionarySize evaluatedWithObject:dictionary handler:nil]; - [self waitForExpectations:@[expectation] timeout:kGULTestCaseTimeoutInterval]; + [self waitForExpectations:@[ expectation ] timeout:kGULTestCaseTimeoutInterval]; // Check the remaining of the user defaults. for (int i = 0; i < itemCount; i++) { @@ -828,10 +829,8 @@ - (NSString *)filePathForPreferencesName:(NSString *)preferencesName { XCTFail(@"Library directory not found - NSSearchPath results are empty."); } NSArray *components = @[ - paths.lastObject, - @"Preferences", - [preferencesName stringByAppendingPathExtension:@"plist"] - ]; + paths.lastObject, @"Preferences", [preferencesName stringByAppendingPathExtension:@"plist"] + ]; return [NSString pathWithComponents:components]; } diff --git a/GoogleUtilities/Logger/GULLogger.m b/GoogleUtilities/Logger/GULLogger.m index 4feb77a537c..495e5830bb0 100644 --- a/GoogleUtilities/Logger/GULLogger.m +++ b/GoogleUtilities/Logger/GULLogger.m @@ -72,8 +72,9 @@ void GULLoggerInitializeASL(void) { dispatch_set_target_queue(sGULClientQueue, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)); #ifdef DEBUG - sMessageCodeRegex = - [NSRegularExpression regularExpressionWithPattern:kMessageCodePattern options:0 error:NULL]; + sMessageCodeRegex = [NSRegularExpression regularExpressionWithPattern:kMessageCodePattern + options:0 + error:NULL]; #endif }); } @@ -155,8 +156,9 @@ void GULLogBasic(GULLoggerLevel level, #ifdef DEBUG NSCAssert(messageCode.length == 11, @"Incorrect message code length."); NSRange messageCodeRange = NSMakeRange(0, messageCode.length); - NSUInteger numberOfMatches = - [sMessageCodeRegex numberOfMatchesInString:messageCode options:0 range:messageCodeRange]; + NSUInteger numberOfMatches = [sMessageCodeRegex numberOfMatchesInString:messageCode + options:0 + range:messageCodeRange]; NSCAssert(numberOfMatches == 1, @"Incorrect message code format."); #endif NSString *logMsg = [[NSString alloc] initWithFormat:message arguments:args_ptr]; diff --git a/GoogleUtilities/MethodSwizzler/GULSwizzler.m b/GoogleUtilities/MethodSwizzler/GULSwizzler.m index 9839124dd3f..e58df96888b 100644 --- a/GoogleUtilities/MethodSwizzler/GULSwizzler.m +++ b/GoogleUtilities/MethodSwizzler/GULSwizzler.m @@ -98,8 +98,8 @@ + (void)unswizzleClass:(Class)aClass selector:(SEL)selector isClassSelector:(BOO method = class_getInstanceMethod(aClass, selector); } NSAssert(method, @"Couldn't find the method you're unswizzling in the runtime."); - IMP originalImp = - [[GULSwizzlingCache sharedInstance] cachedIMPForClass:resolvedClass withSelector:selector]; + IMP originalImp = [[GULSwizzlingCache sharedInstance] cachedIMPForClass:resolvedClass + withSelector:selector]; NSAssert(originalImp, @"This class/selector combination hasn't been swizzled"); IMP currentImp = method_setImplementation(method, originalImp); BOOL didRemoveBlock = imp_removeBlock(currentImp); @@ -120,8 +120,8 @@ + (nullable IMP)originalImplementationForClass:(Class)aClass __block IMP originalImp = nil; dispatch_sync(GetGULSwizzlingQueue(), ^{ Class resolvedClass = isClassSelector ? object_getClass(aClass) : aClass; - originalImp = - [[GULSwizzlingCache sharedInstance] cachedIMPForClass:resolvedClass withSelector:selector]; + originalImp = [[GULSwizzlingCache sharedInstance] cachedIMPForClass:resolvedClass + withSelector:selector]; NSAssert(originalImp, @"The IMP for this class/selector combo doesn't exist (%@, %@).", NSStringFromClass(resolvedClass), NSStringFromSelector(selector)); }); diff --git a/GoogleUtilities/Network/GULNetwork.m b/GoogleUtilities/Network/GULNetwork.m index 233500b5cd0..c3227278b8b 100644 --- a/GoogleUtilities/Network/GULNetwork.m +++ b/GoogleUtilities/Network/GULNetwork.m @@ -257,12 +257,12 @@ - (void)setLoggerDelegate:(id)loggerDelegate { // Explicitly check whether the delegate responds to the methods because conformsToProtocol does // not work correctly even though the delegate does respond to the methods. if (!loggerDelegate || - ![loggerDelegate - respondsToSelector:@selector(GULNetwork_logWithLevel:messageCode:message:contexts:)] || - ![loggerDelegate - respondsToSelector:@selector(GULNetwork_logWithLevel:messageCode:message:context:)] || - ! - [loggerDelegate respondsToSelector:@selector(GULNetwork_logWithLevel:messageCode:message:)]) { + ![loggerDelegate respondsToSelector:@selector(GULNetwork_logWithLevel: + messageCode:message:contexts:)] || + ![loggerDelegate respondsToSelector:@selector(GULNetwork_logWithLevel: + messageCode:message:context:)] || + ![loggerDelegate respondsToSelector:@selector(GULNetwork_logWithLevel: + messageCode:message:)]) { GULLogError(kGULLoggerNetwork, NO, [NSString stringWithFormat:@"I-NET%06ld", (long)kGULNetworkMessageCodeNetwork002], @"Cannot set the network logger delegate: delegate does not conform to the network " @@ -279,8 +279,9 @@ - (void)handleErrorWithCode:(NSInteger)code queue:(dispatch_queue_t)queue withHandler:(GULNetworkCompletionHandler)handler { NSDictionary *userInfo = @{kGULNetworkErrorContext : @"Failed to create network request"}; - NSError *error = - [[NSError alloc] initWithDomain:kGULNetworkErrorDomain code:code userInfo:userInfo]; + NSError *error = [[NSError alloc] initWithDomain:kGULNetworkErrorDomain + code:code + userInfo:userInfo]; [self GULNetwork_logWithLevel:kGULNetworkLogLevelWarning messageCode:kGULNetworkMessageCodeNetwork002 message:@"Failed to create network request. Code, error" diff --git a/GoogleUtilities/Network/GULNetworkURLSession.m b/GoogleUtilities/Network/GULNetworkURLSession.m index 257290cc7b1..416a7360195 100644 --- a/GoogleUtilities/Network/GULNetworkURLSession.m +++ b/GoogleUtilities/Network/GULNetworkURLSession.m @@ -413,9 +413,8 @@ - (void)addSystemCompletionHandler:(GULNetworkSystemCompletionHandler)handler [_loggerDelegate GULNetwork_logWithLevel:kGULNetworkLogLevelError messageCode:kGULNetworkMessageCodeURLSession010 - message: - @"Cannot store system completion handler with empty network " - "session identifier"]; + message:@"Cannot store system completion handler with empty network " + "session identifier"]; return; } @@ -517,8 +516,9 @@ - (void)maybeRemoveTempFilesAtURL:(NSURL *)folderURL expiringTime:(NSTimeInterva NSTimeInterval now = [NSDate date].timeIntervalSince1970; for (NSURL *tempFile in directoryContent) { NSDate *creationDate; - BOOL getCreationDate = - [tempFile getResourceValue:&creationDate forKey:NSURLCreationDateKey error:NULL]; + BOOL getCreationDate = [tempFile getResourceValue:&creationDate + forKey:NSURLCreationDateKey + error:NULL]; if (!getCreationDate) { continue; } diff --git a/GoogleUtilities/SwizzlerTestHelpers/GULProxy.m b/GoogleUtilities/SwizzlerTestHelpers/GULProxy.m index 7f9ea9f8e56..d9bd693181f 100644 --- a/GoogleUtilities/SwizzlerTestHelpers/GULProxy.m +++ b/GoogleUtilities/SwizzlerTestHelpers/GULProxy.m @@ -64,11 +64,11 @@ - (Class)superclass { return [_delegateObject superclass]; } -- (Class) class { +- (Class)class { return [_delegateObject class]; } - - (BOOL)isKindOfClass : (Class)aClass { +- (BOOL)isKindOfClass:(Class)aClass { return [_delegateObject isKindOfClass:aClass]; } diff --git a/README.md b/README.md index d414a4cdde1..bfaceebc6c4 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Travis will verify that any code changes are done in a style compliant way. Inst `clang-format` and `swiftformat`. This command will get the right `clang-format` version: -`brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0743d748ba8b41eec074a0a787dc80219142c525/Formula/clang-format.rb` +`brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/773cb75d360b58f32048f5964038d09825a507c8/Formula/clang-format.rb` ### Running Unit Tests diff --git a/scripts/style.sh b/scripts/style.sh index b464097b266..f816bb7500f 100755 --- a/scripts/style.sh +++ b/scripts/style.sh @@ -39,8 +39,7 @@ version="${version/ (*)/}" version="${version/.*/}" case "$version" in - 6 | 7) - # Allow an older clang-format to accommodate Travis version skew. + 8) ;; google3-trunk) echo "Please use a publicly released clang-format; a recent LLVM release" @@ -49,8 +48,9 @@ case "$version" in exit 1 ;; *) - echo "Please upgrade to clang-format version 7." - echo "If it's installed via homebrew you can run: brew upgrade clang-format" + echo "Please upgrade to clang-format version 8." + echo "If it's installed via homebrew you can run:" + echo "brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/773cb75d360b58f32048f5964038d09825a507c8/Formula/clang-format.rb" exit 1 ;; esac @@ -105,6 +105,8 @@ else clang_options+=(-i) fi +#TODO(#2223) - Find a way to handle spaces in filenames + files=$( ( if [[ $# -gt 0 ]]; then