aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.travis.yml4
-rw-r--r--Example/Core/Tests/FIRAnalyticsConfigurationTest.m117
-rw-r--r--Example/Firebase.xcodeproj/project.pbxproj8
-rw-r--r--Example/Podfile2
-rw-r--r--Firebase/Auth/CHANGELOG.md5
-rw-r--r--Firebase/Auth/Source/FIRAuth.m14
-rw-r--r--Firebase/Auth/Source/FIRAuthAppDelegateProxy.m14
-rw-r--r--Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m15
-rw-r--r--Firebase/Core/CHANGELOG.md8
-rw-r--r--Firebase/Core/FIROptions.m2
-rw-r--r--Firebase/Messaging/CHANGELOG.md4
-rw-r--r--FirebaseCore.podspec7
-rw-r--r--FirebaseDatabase.podspec2
-rw-r--r--FirebaseFirestore.podspec15
-rw-r--r--FirebaseMessaging.podspec2
-rw-r--r--Firestore/CHANGELOG.md2
-rw-r--r--Firestore/Example/Firestore.xcodeproj/project.pbxproj324
-rw-r--r--Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_FuzzTests_iOS.xcscheme57
-rw-r--r--Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm64
-rw-r--r--Firestore/Example/FuzzTests/Firestore_FuzzTests_iOS-Info.plist24
-rw-r--r--Firestore/Example/LibFuzzer.podspec45
-rw-r--r--Firestore/Example/Podfile8
-rw-r--r--Firestore/Protos/CMakeLists.txt44
-rwxr-xr-xFirestore/Protos/build-protos.sh20
-rw-r--r--Firestore/Protos/cpp/google/protobuf/any.pb.cc456
-rw-r--r--Firestore/Protos/cpp/google/protobuf/any.pb.h339
-rw-r--r--Firestore/Protos/cpp/google/protobuf/empty.pb.cc358
-rw-r--r--Firestore/Protos/cpp/google/protobuf/empty.pb.h206
-rw-r--r--Firestore/Protos/cpp/google/protobuf/struct.pb.cc1491
-rw-r--r--Firestore/Protos/cpp/google/protobuf/struct.pb.h1046
-rw-r--r--Firestore/Protos/cpp/google/protobuf/timestamp.pb.cc447
-rw-r--r--Firestore/Protos/cpp/google/protobuf/timestamp.pb.h248
-rw-r--r--Firestore/Protos/cpp/google/protobuf/wrappers.pb.cc2812
-rw-r--r--Firestore/Protos/cpp/google/protobuf/wrappers.pb.h1503
-rw-r--r--Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h (renamed from Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h)6
-rw-r--r--Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c4
-rw-r--r--Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h (renamed from Firestore/Protos/nanopb/firestore/local/mutation.pb.h)6
-rw-r--r--Firestore/Protos/nanopb/firestore/local/mutation.pb.c4
-rw-r--r--Firestore/Protos/nanopb/firestore/local/target.nanopb.h (renamed from Firestore/Protos/nanopb/firestore/local/target.pb.h)6
-rw-r--r--Firestore/Protos/nanopb/firestore/local/target.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/api/annotations.nanopb.h (renamed from Firestore/Protos/nanopb/google/api/annotations.pb.h)4
-rw-r--r--Firestore/Protos/nanopb/google/api/annotations.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/api/http.nanopb.h (renamed from Firestore/Protos/nanopb/google/api/http.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/api/http.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h (renamed from Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h)6
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h (renamed from Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h)10
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h (renamed from Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h)18
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h (renamed from Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h)8
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h (renamed from Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h)10
-rw-r--r--Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/any.nanopb.h (renamed from Firestore/Protos/nanopb/google/protobuf/any.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/any.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h (renamed from Firestore/Protos/nanopb/google/protobuf/empty.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/empty.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h (renamed from Firestore/Protos/nanopb/google/protobuf/struct.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/struct.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h (renamed from Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h (renamed from Firestore/Protos/nanopb/google/protobuf/wrappers.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/rpc/status.nanopb.h (renamed from Firestore/Protos/nanopb/google/rpc/status.pb.h)4
-rw-r--r--Firestore/Protos/nanopb/google/rpc/status.pb.c4
-rw-r--r--Firestore/Protos/nanopb/google/type/latlng.nanopb.h (renamed from Firestore/Protos/nanopb/google/type/latlng.pb.h)2
-rw-r--r--Firestore/Protos/nanopb/google/type/latlng.pb.c4
-rw-r--r--Firestore/Source/API/FIRFirestore.mm4
-rw-r--r--Firestore/Source/API/FSTUserDataConverter.mm19
-rw-r--r--Firestore/Source/Core/FSTQuery.mm3
-rw-r--r--Firestore/Source/Local/FSTLevelDB.mm6
-rw-r--r--Firestore/Source/Model/FSTFieldValue.mm7
-rw-r--r--Firestore/Source/Remote/FSTSerializerBeta.mm2
-rw-r--r--Firestore/core/include/firebase/firestore/CMakeLists.txt2
-rw-r--r--Firestore/core/include/firebase/firestore/collection_reference.h98
-rw-r--r--Firestore/core/include/firebase/firestore/document_change.h34
-rw-r--r--Firestore/core/include/firebase/firestore/document_reference.h101
-rw-r--r--Firestore/core/include/firebase/firestore/document_snapshot.h38
-rw-r--r--Firestore/core/include/firebase/firestore/event_listener.h10
-rw-r--r--Firestore/core/include/firebase/firestore/field_path.h34
-rw-r--r--Firestore/core/include/firebase/firestore/field_value.h33
-rw-r--r--Firestore/core/include/firebase/firestore/firestore.h26
-rw-r--r--Firestore/core/include/firebase/firestore/firestore_errors.h4
-rw-r--r--Firestore/core/include/firebase/firestore/listener_registration.h92
-rw-r--r--Firestore/core/include/firebase/firestore/query.h33
-rw-r--r--Firestore/core/include/firebase/firestore/query_snapshot.h34
-rw-r--r--Firestore/core/include/firebase/firestore/set_options.h39
-rw-r--r--Firestore/core/include/firebase/firestore/settings.h32
-rw-r--r--Firestore/core/include/firebase/firestore/snapshot_metadata.h46
-rw-r--r--Firestore/core/include/firebase/firestore/transaction.h32
-rw-r--r--Firestore/core/include/firebase/firestore/write_batch.h39
-rw-r--r--Firestore/core/src/firebase/firestore/nanopb/reader.cc10
-rw-r--r--Firestore/core/src/firebase/firestore/nanopb/reader.h9
-rw-r--r--Firestore/core/src/firebase/firestore/nanopb/writer.cc2
-rw-r--r--Firestore/core/src/firebase/firestore/remote/serializer.cc194
-rw-r--r--Firestore/core/src/firebase/firestore/util/CMakeLists.txt16
-rw-r--r--Firestore/core/src/firebase/firestore/util/comparison.cc6
-rw-r--r--Firestore/core/src/firebase/firestore/util/comparison.h5
-rw-r--r--Firestore/core/src/firebase/firestore/util/hard_assert_apple.mm4
-rw-r--r--Firestore/core/src/firebase/firestore/util/hashing.h39
-rw-r--r--Firestore/core/src/firebase/firestore/util/string_format.h28
-rw-r--r--Firestore/core/src/firebase/firestore/util/string_util.h5
-rw-r--r--Firestore/core/src/firebase/firestore/util/type_traits.h90
-rw-r--r--Firestore/core/test/firebase/firestore/remote/serializer_test.cc241
-rw-r--r--Firestore/core/test/firebase/firestore/util/CMakeLists.txt13
-rw-r--r--Firestore/core/test/firebase/firestore/util/hashing_test.cc18
-rw-r--r--Firestore/core/test/firebase/firestore/util/string_format_apple_test.mm60
-rw-r--r--Firestore/core/test/firebase/firestore/util/type_traits_apple_test.mm50
-rwxr-xr-xscripts/push-pods.sh8
-rwxr-xr-xscripts/style.sh1
-rwxr-xr-xscripts/update-tags.sh30
112 files changed, 2157 insertions, 9313 deletions
diff --git a/.travis.yml b/.travis.yml
index 7cec178..dea83ed 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,7 +58,7 @@ jobs:
- ./scripts/if_changed.sh bundle exec pod lib lint FirebaseCore.podspec
- ./scripts/if_changed.sh bundle exec pod lib lint FirebaseAuth.podspec
- ./scripts/if_changed.sh bundle exec pod lib lint FirebaseDatabase.podspec
-# - ./scripts/if_changed.sh bundle exec pod lib lint FirebaseMessaging.podspec
+ - ./scripts/if_changed.sh bundle exec pod lib lint FirebaseMessaging.podspec
- ./scripts/if_changed.sh bundle exec pod lib lint FirebaseStorage.podspec
- ./scripts/if_changed.sh bundle exec pod lib lint FirebaseFunctions.podspec
@@ -83,7 +83,7 @@ jobs:
- ./scripts/if_cron.sh bundle exec pod lib lint FirebaseAuth.podspec --use-libraries
- ./scripts/if_cron.sh bundle exec pod lib lint FirebaseDatabase.podspec --use-libraries
# The Protobuf dependency of FirebaseMessaging has warnings with --use-libraries
-# - ./scripts/if_cron.sh bundle exec pod lib lint FirebaseMessaging.podspec --use-libraries --allow-warnings
+ - ./scripts/if_cron.sh bundle exec pod lib lint FirebaseMessaging.podspec --use-libraries --allow-warnings
- ./scripts/if_cron.sh bundle exec pod lib lint FirebaseStorage.podspec --use-libraries
- ./scripts/if_cron.sh bundle exec pod lib lint FirebaseFunctions.podspec --use-libraries
diff --git a/Example/Core/Tests/FIRAnalyticsConfigurationTest.m b/Example/Core/Tests/FIRAnalyticsConfigurationTest.m
new file mode 100644
index 0000000..a66ad06
--- /dev/null
+++ b/Example/Core/Tests/FIRAnalyticsConfigurationTest.m
@@ -0,0 +1,117 @@
+/*
+ * 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.
+ */
+
+#import "FIRTestCase.h"
+
+#import <FirebaseCore/FIRAnalyticsConfiguration+Internal.h>
+#import <FirebaseCore/FIRAnalyticsConfiguration.h>
+
+@interface FIRAnalyticsConfigurationTest : FIRTestCase
+/// A mock for [NSNotificationCenter defaultCenter].
+@property(nonatomic, strong) id notificationCenterMock;
+@end
+
+@implementation FIRAnalyticsConfigurationTest
+
+- (void)setUp {
+ [super setUp];
+ _notificationCenterMock = OCMPartialMock([NSNotificationCenter defaultCenter]);
+}
+
+- (void)tearDown {
+ [_notificationCenterMock stopMocking];
+ [super tearDown];
+}
+
+/// Test access to the shared instance.
+- (void)testSharedInstance {
+ FIRAnalyticsConfiguration *analyticsConfig = [FIRAnalyticsConfiguration sharedInstance];
+ XCTAssertNotNil(analyticsConfig);
+}
+
+/// Test that setting the minimum session interval on the singleton fires a notification.
+- (void)testMinimumSessionIntervalNotification {
+ FIRAnalyticsConfiguration *config = [FIRAnalyticsConfiguration sharedInstance];
+ [config setMinimumSessionInterval:2601];
+ NSString *notificationName = kFIRAnalyticsConfigurationSetMinimumSessionIntervalNotification;
+ OCMVerify([self.notificationCenterMock postNotificationName:notificationName
+ object:config
+ userInfo:@{
+ notificationName : @2601
+ }]);
+}
+
+/// Test that setting the minimum session timeout interval on the singleton fires a notification.
+- (void)testSessionTimeoutIntervalNotification {
+ FIRAnalyticsConfiguration *config = [FIRAnalyticsConfiguration sharedInstance];
+ [config setSessionTimeoutInterval:1000];
+ NSString *notificationName = kFIRAnalyticsConfigurationSetSessionTimeoutIntervalNotification;
+ OCMVerify([self.notificationCenterMock postNotificationName:notificationName
+ object:config
+ userInfo:@{
+ notificationName : @1000
+ }]);
+}
+
+- (void)testSettingAnalyticsCollectionEnabled {
+ // The ordering matters for these notifications.
+ [self.notificationCenterMock setExpectationOrderMatters:YES];
+
+ // Test setting to enabled.
+ FIRAnalyticsConfiguration *config = [FIRAnalyticsConfiguration sharedInstance];
+ NSString *notificationName = kFIRAnalyticsConfigurationSetEnabledNotification;
+ [config setAnalyticsCollectionEnabled:YES];
+ OCMVerify([self.notificationCenterMock postNotificationName:notificationName
+ object:config
+ userInfo:@{
+ notificationName : @YES
+ }]);
+
+ // Test setting to disabled.
+ [config setAnalyticsCollectionEnabled:NO];
+ OCMVerify([self.notificationCenterMock postNotificationName:notificationName
+ object:config
+ userInfo:@{
+ notificationName : @NO
+ }]);
+}
+
+- (void)testSettingAnalyticsCollectionPersistence {
+ id userDefaultsMock = OCMPartialMock([NSUserDefaults standardUserDefaults]);
+ FIRAnalyticsConfiguration *config = [FIRAnalyticsConfiguration sharedInstance];
+
+ // Test that defaults are written to when persistence is enabled.
+ [config setAnalyticsCollectionEnabled:YES persistSetting:YES];
+ OCMVerify([userDefaultsMock setObject:[NSNumber numberWithInteger:kFIRAnalyticsEnabledStateSetYes]
+ forKey:kFIRAPersistedConfigMeasurementEnabledStateKey]);
+
+ [config setAnalyticsCollectionEnabled:NO persistSetting:YES];
+ OCMVerify([userDefaultsMock setObject:[NSNumber numberWithInteger:kFIRAnalyticsEnabledStateSetNo]
+ forKey:kFIRAPersistedConfigMeasurementEnabledStateKey]);
+
+ // Test that defaults are not written to when persistence is disabled.
+ [config setAnalyticsCollectionEnabled:YES persistSetting:NO];
+ OCMReject([userDefaultsMock setObject:OCMOCK_ANY
+ forKey:kFIRAPersistedConfigMeasurementEnabledStateKey]);
+
+ [config setAnalyticsCollectionEnabled:NO persistSetting:NO];
+ OCMReject([userDefaultsMock setObject:OCMOCK_ANY
+ forKey:kFIRAPersistedConfigMeasurementEnabledStateKey]);
+
+ [userDefaultsMock stopMocking];
+}
+
+@end
diff --git a/Example/Firebase.xcodeproj/project.pbxproj b/Example/Firebase.xcodeproj/project.pbxproj
index f924ed4..61c4c6a 100644
--- a/Example/Firebase.xcodeproj/project.pbxproj
+++ b/Example/Firebase.xcodeproj/project.pbxproj
@@ -580,6 +580,9 @@
ED8C81092088EFA20093EB8A /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8C80FF2088EFA20093EB8A /* GTMHTTPServer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ED8C810A2088EFA20093EB8A /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8C80FF2088EFA20093EB8A /* GTMHTTPServer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
ED8C810B2088EFA20093EB8A /* GTMHTTPServer.m in Sources */ = {isa = PBXBuildFile; fileRef = ED8C80FF2088EFA20093EB8A /* GTMHTTPServer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
+ EDD43AA420BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD43AA320BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m */; };
+ EDD43AA520BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD43AA320BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m */; };
+ EDD43AA620BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */ = {isa = PBXBuildFile; fileRef = EDD43AA320BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -1257,6 +1260,7 @@
ED8C80FC2088EFA20093EB8A /* FIRReachabilityCheckerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FIRReachabilityCheckerTest.m; sourceTree = "<group>"; };
ED8C80FE2088EFA20093EB8A /* GTMHTTPServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTMHTTPServer.h; sourceTree = "<group>"; };
ED8C80FF2088EFA20093EB8A /* GTMHTTPServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMHTTPServer.m; sourceTree = "<group>"; };
+ EDD43AA320BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FIRAnalyticsConfigurationTest.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -2265,6 +2269,7 @@
ED8C80FB2088EFA10093EB8A /* FIRNetworkTest.m */,
ED8C80FC2088EFA20093EB8A /* FIRReachabilityCheckerTest.m */,
ED8C80FD2088EFA20093EB8A /* third_party */,
+ EDD43AA320BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m */,
DE4B26DE20855F1F0030A38C /* FIRAppEnvironmentUtilTest.m */,
DEE14D7B1E844677006FA992 /* FIRTestCase.h */,
DEE14D751E844677006FA992 /* FIRAppAssociationRegistrationUnitTests.m */,
@@ -3622,6 +3627,7 @@
D064E6B31ED9B31C001956DF /* FIROptionsTest.m in Sources */,
ED8C810A2088EFA20093EB8A /* GTMHTTPServer.m in Sources */,
D064E6B41ED9B31C001956DF /* FIRBundleUtilTest.m in Sources */,
+ EDD43AA520BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */,
D064E6B51ED9B31C001956DF /* FIRTestCase.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -4080,6 +4086,7 @@
DEAAD3D81FBA34250053BF48 /* FIRConfigurationTest.m in Sources */,
ED8C810B2088EFA20093EB8A /* GTMHTTPServer.m in Sources */,
DEAAD3DB1FBA34250053BF48 /* FIRTestCase.m in Sources */,
+ EDD43AA620BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */,
DEAAD3D71FBA34250053BF48 /* FIRBundleUtilTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -4163,6 +4170,7 @@
DEE14D931E84468D006FA992 /* FIROptionsTest.m in Sources */,
ED8C81092088EFA20093EB8A /* GTMHTTPServer.m in Sources */,
DEE14D901E84468D006FA992 /* FIRBundleUtilTest.m in Sources */,
+ EDD43AA420BF7C7B005EBB36 /* FIRAnalyticsConfigurationTest.m in Sources */,
DEE14D941E84468D006FA992 /* FIRTestCase.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/Example/Podfile b/Example/Podfile
index 0a4177d..5308679 100644
--- a/Example/Podfile
+++ b/Example/Podfile
@@ -12,7 +12,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/Core', '5.0.1'
+ pod 'Firebase/Core', '5.1.0'
target 'Core_Tests_iOS' do
inherit! :search_paths
diff --git a/Firebase/Auth/CHANGELOG.md b/Firebase/Auth/CHANGELOG.md
index 5a3fcef..292f8bd 100644
--- a/Firebase/Auth/CHANGELOG.md
+++ b/Firebase/Auth/CHANGELOG.md
@@ -1,9 +1,12 @@
+# v5.0.1
+- Restore 4.x level of support for extensions (#1357).
+
# v5.0.0
- Adds APIs for phone Auth testing to bypass the verification flow (#1192).
- Changes the callback block signature for sign in and create user methods
to provide an AuthDataResult that includes the user and user info (#1123, #1186).
- Removes GoogleToolboxForMac dependency (#1175).
-- Removes misc. deprecated APIs (#1188, #1200)
+- Removes miscellaneous deprecated APIs (#1188, #1200).
# v4.6.1
- Fixes crash which occurred when certain Firebase IDTokens were being parsed (#1076).
diff --git a/Firebase/Auth/Source/FIRAuth.m b/Firebase/Auth/Source/FIRAuth.m
index c83a19a..81008ca 100644
--- a/Firebase/Auth/Source/FIRAuth.m
+++ b/Firebase/Auth/Source/FIRAuth.m
@@ -19,6 +19,7 @@
#import "FIRAuth_Internal.h"
#import <FirebaseCore/FIRAppAssociationRegistration.h>
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
#import <FirebaseCore/FIRAppInternal.h>
#import <FirebaseCore/FIRLogger.h>
#import <FirebaseCore/FIROptions.h>
@@ -438,7 +439,18 @@ static NSMutableDictionary *gKeychainServiceNameForAppName;
_settings = [[FIRAuthSettings alloc] init];
_firebaseAppName = [appName copy];
#if TARGET_OS_IOS
- UIApplication *application = [UIApplication sharedApplication];
+
+ static Class applicationClass = nil;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
+
// Initialize the shared FIRAuthAppDelegateProxy instance in the main thread if not already.
[FIRAuthAppDelegateProxy sharedInstance];
#endif
diff --git a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
index f13e94f..3289b4e 100644
--- a/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
+++ b/Firebase/Auth/Source/FIRAuthAppDelegateProxy.m
@@ -16,6 +16,8 @@
#import "FIRAuthAppDelegateProxy.h"
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
+
#import <objc/runtime.h>
NS_ASSUME_NONNULL_BEGIN
@@ -200,8 +202,18 @@ static BOOL isIOS9orLater() {
+ (nullable instancetype)sharedInstance {
static dispatch_once_t onceToken;
static FIRAuthAppDelegateProxy *_Nullable sharedInstance;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ static Class applicationClass = nil;
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
dispatch_once(&onceToken, ^{
- sharedInstance = [[self alloc] initWithApplication:[UIApplication sharedApplication]];
+ sharedInstance = [[self alloc] initWithApplication:application];
});
return sharedInstance;
}
diff --git a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
index a00d0e9..e5aa7f4 100644
--- a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
+++ b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.m
@@ -16,6 +16,8 @@
#import "FIRAuthDefaultUIDelegate.h"
+#import <FirebaseCore/FIRAppEnvironmentUtil.h>
+
NS_ASSUME_NONNULL_BEGIN
@interface FIRAuthDefaultUIDelegate ()
@@ -58,8 +60,17 @@ NS_ASSUME_NONNULL_BEGIN
}
+ (id<FIRAuthUIDelegate>)defaultUIDelegate {
- UIViewController *topViewController =
- [UIApplication sharedApplication].keyWindow.rootViewController;
+ // iOS App extensions should not call [UIApplication sharedApplication], even if UIApplication
+ // responds to it.
+ static Class applicationClass = nil;
+ if (![FIRAppEnvironmentUtil isAppExtension]) {
+ Class cls = NSClassFromString(@"UIApplication");
+ if (cls && [cls respondsToSelector:NSSelectorFromString(@"sharedApplication")]) {
+ applicationClass = cls;
+ }
+ }
+ UIApplication *application = [applicationClass sharedApplication];
+ UIViewController *topViewController = application.keyWindow.rootViewController;
while (true){
if (topViewController.presentedViewController) {
topViewController = topViewController.presentedViewController;
diff --git a/Firebase/Core/CHANGELOG.md b/Firebase/Core/CHANGELOG.md
index f4707ea..e1f157a 100644
--- a/Firebase/Core/CHANGELOG.md
+++ b/Firebase/Core/CHANGELOG.md
@@ -1,4 +1,12 @@
# Unreleased
+
+# 2018-05-29 -- v5.0.2 -- M26
+- [changed] Delayed library registration call from `+load` to `+initialize`. (#1305)
+
+# 2018-05-15 -- v5.0.1 -- M25.1
+- [fixed] Eliminated duplicate symbol in CocoaPods `-all_load build` (#1223)
+
+# 2018-05-08 -- v5.0.0 -- M25
- [changed] Removed `UIKit` import from `FIRApp.h`.
- [changed] Removed deprecated methods.
diff --git a/Firebase/Core/FIROptions.m b/Firebase/Core/FIROptions.m
index 22c9818..ecdd9e9 100644
--- a/Firebase/Core/FIROptions.m
+++ b/Firebase/Core/FIROptions.m
@@ -43,7 +43,7 @@ NSString *const kFIRIsSignInEnabled = @"IS_SIGNIN_ENABLED";
NSString *const kFIRLibraryVersionID =
@"5" // Major version (one or more digits)
@"00" // Minor version (exactly 2 digits)
- @"01" // Build number (exactly 2 digits)
+ @"02" // Build number (exactly 2 digits)
@"000"; // Fixed "000"
// Plist file name.
NSString *const kServiceInfoFileName = @"GoogleService-Info";
diff --git a/Firebase/Messaging/CHANGELOG.md b/Firebase/Messaging/CHANGELOG.md
index 22b5031..a11be06 100644
--- a/Firebase/Messaging/CHANGELOG.md
+++ b/Firebase/Messaging/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 2015-06-12 -- v3.0.2
+- Added a warning message when subscribing to topics with incorrect name formats.
+- Silenced a deprecation warning in FIRMessaging.
+
# 2018-05-29 -- v3.0.1
- Clean up a few deprecation warnings.
diff --git a/FirebaseCore.podspec b/FirebaseCore.podspec
index 03047be..ddcb981 100644
--- a/FirebaseCore.podspec
+++ b/FirebaseCore.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseCore'
- s.version = '5.0.1'
+ s.version = '5.0.2'
s.summary = 'Firebase Core for iOS (plus community support for macOS and tvOS)'
s.description = <<-DESC
@@ -33,7 +33,8 @@ Firebase Core includes FIRApp and FIROptions which provide central configuration
]
s.dependency 'GoogleToolboxForMac/NSData+zlib', '~> 2.1'
s.pod_target_xcconfig = {
- 'OTHER_CFLAGS' => '-fno-autolink ' +
- '-DFIRCore_VERSION=' + s.version.to_s + ' -DFirebase_VERSION=5.0.0'
+ 'OTHER_CFLAGS' => '-fno-autolink',
+ 'GCC_PREPROCESSOR_DEFINITIONS' =>
+ 'FIRCore_VERSION=' + s.version.to_s + ' Firebase_VERSION=5.1.0'
}
end
diff --git a/FirebaseDatabase.podspec b/FirebaseDatabase.podspec
index ae97d5a..4fdf954 100644
--- a/FirebaseDatabase.podspec
+++ b/FirebaseDatabase.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseDatabase'
- s.version = '5.0.0'
+ s.version = '5.0.1'
s.summary = 'Firebase Open Source Libraries for iOS (plus community support for macOS and tvOS)'
s.description = <<-DESC
diff --git a/FirebaseFirestore.podspec b/FirebaseFirestore.podspec
index 7f4f340..339f87f 100644
--- a/FirebaseFirestore.podspec
+++ b/FirebaseFirestore.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseFirestore'
- s.version = '0.12.1'
+ s.version = '0.12.2'
s.summary = 'Google Cloud Firestore for iOS'
s.description = <<-DESC
@@ -55,17 +55,18 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.frameworks = 'MobileCoreServices'
s.library = 'c++'
s.pod_target_xcconfig = {
- 'GCC_PREPROCESSOR_DEFINITIONS' => 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ',
+ 'GCC_PREPROCESSOR_DEFINITIONS' => 'GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 ' +
+ 'FIRFirestore_VERSION=' + s.version.to_s + ' PB_FIELD_16BIT',
'HEADER_SEARCH_PATHS' =>
'"${PODS_TARGET_SRCROOT}" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/third_party/abseil-cpp" ' +
'"${PODS_ROOT}/nanopb" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"',
- 'OTHER_CFLAGS' => '-DFIRFirestore_VERSION=' + s.version.to_s + ' ' +
- # The nanopb pod (which is pulled in indirectly) sets these defs, so we must too.
- # (We *do* require 16bit (or larger) fields, so we'd have to set at least
- # PB_FIELD_16BIT anyways.)
- '-DPB_FIELD_32BIT -DPB_NO_PACKED_STRUCTS=1'
+
+ # The nanopb pod (which is pulled in indirectly) sets these defs, so we
+ # must too. (We *do* require 16bit (or larger) fields, so we'd have to set
+ # at least PB_FIELD_16BIT anyways.)
+ 'OTHER_CFLAGS' => '-DPB_FIELD_32BIT -DPB_NO_PACKED_STRUCTS=1'
}
s.prepare_command = <<-CMD
diff --git a/FirebaseMessaging.podspec b/FirebaseMessaging.podspec
index 8e6d7de..bd0921b 100644
--- a/FirebaseMessaging.podspec
+++ b/FirebaseMessaging.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FirebaseMessaging'
- s.version = '3.0.0'
+ s.version = '3.0.1'
s.summary = 'Firebase Messaging for iOS'
s.description = <<-DESC
diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md
index 70bab4e..eac5c13 100644
--- a/Firestore/CHANGELOG.md
+++ b/Firestore/CHANGELOG.md
@@ -1,4 +1,6 @@
# Unreleased
+
+# v0.12.2
- [fixed] Fixed an issue where `FirestoreSettings` would accept a concurrent
dispatch queue, but this configuration would trigger an assertion failure.
Passing a concurrent dispatch queue should now work correctly (#988).
diff --git a/Firestore/Example/Firestore.xcodeproj/project.pbxproj b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
index c13e22c..eadf4e2 100644
--- a/Firestore/Example/Firestore.xcodeproj/project.pbxproj
+++ b/Firestore/Example/Firestore.xcodeproj/project.pbxproj
@@ -24,6 +24,7 @@
/* End PBXAggregateTarget section */
/* Begin PBXBuildFile section */
+ 0535C1B65DADAE1CE47FA3CA /* string_format_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */; };
132E3E53179DE287D875F3F2 /* FSTLevelDBTransactionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 132E36BB104830BD806351AC /* FSTLevelDBTransactionTests.mm */; };
3B843E4C1F3A182900548890 /* remote_store_spec_test.json in Resources */ = {isa = PBXBuildFile; fileRef = 3B843E4A1F3930A400548890 /* remote_store_spec_test.json */; };
54131E9720ADE679001DF3FF /* string_format_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 54131E9620ADE678001DF3FF /* string_format_test.cc */; };
@@ -157,6 +158,10 @@
618BBEB020B89AAC00B5BCE7 /* http.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9720B89AAC00B5BCE7 /* http.pb.cc */; };
618BBEB120B89AAC00B5BCE7 /* status.pb.cc in Sources */ = {isa = PBXBuildFile; fileRef = 618BBE9920B89AAC00B5BCE7 /* status.pb.cc */; };
61F72C5620BC48FD001A68CB /* serializer_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 61F72C5520BC48FD001A68CB /* serializer_test.cc */; };
+ 6EDD3B4620BF247500C33877 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
+ 6EDD3B4820BF247500C33877 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
+ 6EDD3B4920BF247500C33877 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
+ 6EDD3B6020BF25AE00C33877 /* FSTFuzzTestsPrincipal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6EDD3B5E20BF24D000C33877 /* FSTFuzzTestsPrincipal.mm */; };
71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; };
7346E61D20325C6900FD6CEF /* FSTDispatchQueueTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7346E61C20325C6900FD6CEF /* FSTDispatchQueueTests.mm */; };
73866AA12082B0A5009BB4FF /* FIRArrayTransformTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 73866A9F2082B069009BB4FF /* FIRArrayTransformTests.mm */; };
@@ -193,6 +198,8 @@
B6FB4690208F9BB300554BA2 /* executor_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = B6FB4688208F9B9100554BA2 /* executor_test.cc */; };
BF219E98F1C5A1DAEB5EEC86 /* Pods_Firestore_Example_iOS_SwiftBuildTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 379B34A1536045869826D82A /* Pods_Firestore_Example_iOS_SwiftBuildTest.framework */; };
C1AA536F90A0A576CA2816EB /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB92EB03E3F92485023F64ED /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework */; };
+ C482E724F4B10968417C3F78 /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */; };
+ C80B10E79CDD7EF7843C321E /* type_traits_apple_test.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2A0CF41BA5AED6049B0BEB2C /* type_traits_apple_test.mm */; };
C8D3CE2343E53223E6487F2C /* Pods_Firestore_Example_iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5918805E993304321A05E82B /* Pods_Firestore_Example_iOS.framework */; };
DE03B2D41F2149D600A30B9C /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; };
DE03B2D51F2149D600A30B9C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -228,6 +235,13 @@
remoteGlobalIDString = 6003F589195388D20070C39A;
remoteInfo = Firestore;
};
+ 6EDD3AD320BF247500C33877 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 6003F582195388D10070C39A /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 6003F589195388D20070C39A;
+ remoteInfo = Firestore;
+ };
DE03B2961F2149D600A30B9C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6003F582195388D10070C39A /* Project object */;
@@ -264,13 +278,14 @@
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 = "<group>"; };
12F4357299652983A615F886 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
132E36BB104830BD806351AC /* FSTLevelDBTransactionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTLevelDBTransactionTests.mm; sourceTree = "<group>"; };
- 1A1EED57B21433C01BBE4C51 /* any.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = any.pb.cc; sourceTree = "<group>"; };
+ 1A1EED57B21433C01BBE4C51 /* any.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = any.pb.cc; sourceTree = "<group>"; };
+ 2A0CF41BA5AED6049B0BEB2C /* type_traits_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = type_traits_apple_test.mm; sourceTree = "<group>"; };
2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Tests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
379B34A1536045869826D82A /* Pods_Firestore_Example_iOS_SwiftBuildTest.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_iOS_SwiftBuildTest.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B843E4A1F3930A400548890 /* remote_store_spec_test.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = remote_store_spec_test.json; sourceTree = "<group>"; };
3C81DE3772628FE297055662 /* Pods-Firestore_Example_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.debug.xcconfig"; sourceTree = "<group>"; };
3F0992A4B83C60841C52E960 /* Pods-Firestore_Example_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS/Pods-Firestore_Example_iOS.release.xcconfig"; sourceTree = "<group>"; };
- 4280A9CD97BB27955F81042C /* struct.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = struct.pb.cc; sourceTree = "<group>"; };
+ 4280A9CD97BB27955F81042C /* struct.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = struct.pb.cc; sourceTree = "<group>"; };
444B7AB3F5A2929070CB1363 /* hard_assert_test.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = hard_assert_test.cc; sourceTree = "<group>"; };
54131E9620ADE678001DF3FF /* string_format_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_format_test.cc; sourceTree = "<group>"; };
54511E8D209805F8005BD28F /* hashing_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hashing_test.cc; sourceTree = "<group>"; };
@@ -438,14 +453,20 @@
618BBEA420B89AAC00B5BCE7 /* any.pb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = any.pb.h; sourceTree = "<group>"; };
61F72C5520BC48FD001A68CB /* serializer_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = serializer_test.cc; sourceTree = "<group>"; };
69E6C311558EC77729A16CF1 /* Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS/Pods-Firestore_Example_iOS-Firestore_SwiftTests_iOS.debug.xcconfig"; sourceTree = "<group>"; };
+ 6EDD3B5B20BF247500C33877 /* Firestore_FuzzTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_FuzzTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 6EDD3B5C20BF247500C33877 /* Firestore_FuzzTests_iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Firestore_FuzzTests_iOS-Info.plist"; sourceTree = "<group>"; };
+ 6EDD3B5E20BF24D000C33877 /* FSTFuzzTestsPrincipal.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTFuzzTestsPrincipal.mm; sourceTree = "<group>"; };
71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
7346E61C20325C6900FD6CEF /* FSTDispatchQueueTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FSTDispatchQueueTests.mm; sourceTree = "<group>"; };
73866A9F2082B069009BB4FF /* FIRArrayTransformTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = FIRArrayTransformTests.mm; sourceTree = "<group>"; };
74ACEC3603BE58B57A7E8D4C /* Pods-Firestore_Example_iOS-SwiftBuildTest.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_Example_iOS-SwiftBuildTest.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_Example_iOS-SwiftBuildTest/Pods-Firestore_Example_iOS-SwiftBuildTest.release.xcconfig"; sourceTree = "<group>"; };
- 83B20B7B75D6CF3DACBAACC2 /* timestamp.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = timestamp.pb.cc; sourceTree = "<group>"; };
+ 83B20B7B75D6CF3DACBAACC2 /* timestamp.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = timestamp.pb.cc; sourceTree = "<group>"; };
+ 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.debug.xcconfig"; sourceTree = "<group>"; };
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
8E002F4AD5D9B6197C940847 /* Firestore.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Firestore.podspec; path = ../Firestore.podspec; sourceTree = "<group>"; };
- 9E766CA33AFD5A6D8C433FB5 /* empty.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = empty.pb.cc; sourceTree = "<group>"; };
+ 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Firestore_FuzzTests_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS.release.xcconfig"; sourceTree = "<group>"; };
+ 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.objcpp; path = string_format_apple_test.mm; sourceTree = "<group>"; };
+ 9E766CA33AFD5A6D8C433FB5 /* empty.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = empty.pb.cc; sourceTree = "<group>"; };
AB356EF6200EA5EB0089B766 /* field_value_test.cc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = field_value_test.cc; sourceTree = "<group>"; };
AB380CF82019382300D97691 /* target_id_generator_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = target_id_generator_test.cc; sourceTree = "<group>"; };
AB380CFC201A2EE200D97691 /* string_util_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = string_util_test.cc; sourceTree = "<group>"; };
@@ -478,8 +499,9 @@
B6FB4688208F9B9100554BA2 /* executor_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = executor_test.cc; sourceTree = "<group>"; };
B6FB4689208F9B9100554BA2 /* executor_libdispatch_test.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = executor_libdispatch_test.mm; sourceTree = "<group>"; };
B6FB468A208F9B9100554BA2 /* executor_test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = executor_test.h; sourceTree = "<group>"; };
+ B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_FuzzTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
BB92EB03E3F92485023F64ED /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
- CFAD55F01C7A1EB8420D2DFC /* wrappers.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; path = wrappers.pb.cc; sourceTree = "<group>"; };
+ CFAD55F01C7A1EB8420D2DFC /* wrappers.pb.cc */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.cpp.cpp; path = wrappers.pb.cc; sourceTree = "<group>"; };
D3CC3DC5338DCAF43A211155 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
DE03B2E91F2149D600A30B9C /* Firestore_IntegrationTests_iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Firestore_IntegrationTests_iOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DE03B3621F215E1600A30B9C /* CAcert.pem */ = {isa = PBXFileReference; lastKnownFileType = text; path = CAcert.pem; sourceTree = "<group>"; };
@@ -533,6 +555,17 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 6EDD3B4520BF247500C33877 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EDD3B4620BF247500C33877 /* Foundation.framework in Frameworks */,
+ C482E724F4B10968417C3F78 /* Pods_Firestore_FuzzTests_iOS.framework in Frameworks */,
+ 6EDD3B4820BF247500C33877 /* UIKit.framework in Frameworks */,
+ 6EDD3B4920BF247500C33877 /* XCTest.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
DE03B2D31F2149D600A30B9C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -607,8 +640,10 @@
54A0352C20A3B3D7003E0143 /* status_test.cc */,
54A0352B20A3B3D7003E0143 /* status_test_util.h */,
54A0352D20A3B3D7003E0143 /* statusor_test.cc */,
+ 9CFD366B783AE27B9E79EE7A /* string_format_apple_test.mm */,
54131E9620ADE678001DF3FF /* string_format_test.cc */,
AB380CFC201A2EE200D97691 /* string_util_test.cc */,
+ 2A0CF41BA5AED6049B0BEB2C /* type_traits_apple_test.mm */,
);
path = util;
sourceTree = "<group>";
@@ -674,6 +709,7 @@
isa = PBXGroup;
children = (
618BBE7A20B89AAC00B5BCE7 /* CoreTestsProtos */,
+ 6EDD3B5D20BF24A700C33877 /* FuzzTests */,
543B4F0520A91E4B001F506D /* App */,
60FF7A9C1954A5C5007DD14C /* Podspec Metadata */,
6003F5B5195388D20070C39A /* Tests */,
@@ -690,6 +726,7 @@
isa = PBXGroup;
children = (
6003F58A195388D20070C39A /* Firestore_Example_iOS.app */,
+ 6EDD3B5B20BF247500C33877 /* Firestore_FuzzTests_iOS.xctest */,
DE03B2E91F2149D600A30B9C /* Firestore_IntegrationTests_iOS.xctest */,
54C9EDF12040E16300A969CD /* Firestore_SwiftTests_iOS.xctest */,
6003F5AE195388D20070C39A /* Firestore_Tests_iOS.xctest */,
@@ -706,6 +743,7 @@
5918805E993304321A05E82B /* Pods_Firestore_Example_iOS.framework */,
BB92EB03E3F92485023F64ED /* Pods_Firestore_Example_iOS_Firestore_SwiftTests_iOS.framework */,
379B34A1536045869826D82A /* Pods_Firestore_Example_iOS_SwiftBuildTest.framework */,
+ B79CA87A1A01FC5329031C9B /* Pods_Firestore_FuzzTests_iOS.framework */,
ECEBABC7E7B693BE808A1052 /* Pods_Firestore_IntegrationTests_iOS.framework */,
2B50B3A0DF77100EEE887891 /* Pods_Firestore_Tests_iOS.framework */,
6003F591195388D20070C39A /* UIKit.framework */,
@@ -889,6 +927,15 @@
path = protobuf;
sourceTree = "<group>";
};
+ 6EDD3B5D20BF24A700C33877 /* FuzzTests */ = {
+ isa = PBXGroup;
+ children = (
+ 6EDD3B5E20BF24D000C33877 /* FSTFuzzTestsPrincipal.mm */,
+ 6EDD3B5C20BF247500C33877 /* Firestore_FuzzTests_iOS-Info.plist */,
+ );
+ path = FuzzTests;
+ sourceTree = "<group>";
+ };
AAEA2A72CFD1FA5AD34462F7 /* Pods */ = {
isa = PBXGroup;
children = (
@@ -898,6 +945,8 @@
74ACEC3603BE58B57A7E8D4C /* Pods-Firestore_Example_iOS-SwiftBuildTest.release.xcconfig */,
3C81DE3772628FE297055662 /* Pods-Firestore_Example_iOS.debug.xcconfig */,
3F0992A4B83C60841C52E960 /* Pods-Firestore_Example_iOS.release.xcconfig */,
+ 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */,
+ 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */,
1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */,
F354C0FE92645B56A6C6FD44 /* Pods-Firestore_IntegrationTests_iOS.release.xcconfig */,
E592181BFD7C53C305123739 /* Pods-Firestore_Tests_iOS.debug.xcconfig */,
@@ -1206,6 +1255,27 @@
productReference = 6003F5AE195388D20070C39A /* Firestore_Tests_iOS.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
+ 6EDD3AD120BF247500C33877 /* Firestore_FuzzTests_iOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 6EDD3B5820BF247500C33877 /* Build configuration list for PBXNativeTarget "Firestore_FuzzTests_iOS" */;
+ buildPhases = (
+ 6EDD3AD420BF247500C33877 /* [CP] Check Pods Manifest.lock */,
+ 6EDD3AD520BF247500C33877 /* Sources */,
+ 6EDD3B4520BF247500C33877 /* Frameworks */,
+ 6EDD3B4A20BF247500C33877 /* Resources */,
+ 6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */,
+ E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 6EDD3AD220BF247500C33877 /* PBXTargetDependency */,
+ );
+ name = Firestore_FuzzTests_iOS;
+ productName = FirestoreTests;
+ productReference = 6EDD3B5B20BF247500C33877 /* Firestore_FuzzTests_iOS.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
DE03B2941F2149D600A30B9C /* Firestore_IntegrationTests_iOS */ = {
isa = PBXNativeTarget;
buildConfigurationList = DE03B2E61F2149D600A30B9C /* Build configuration list for PBXNativeTarget "Firestore_IntegrationTests_iOS" */;
@@ -1267,6 +1337,9 @@
DevelopmentTeam = EQHXZ8M8AV;
TestTargetID = 6003F589195388D20070C39A;
};
+ 6EDD3AD120BF247500C33877 = {
+ DevelopmentTeam = EQHXZ8M8AV;
+ };
DE03B2941F2149D600A30B9C = {
DevelopmentTeam = EQHXZ8M8AV;
};
@@ -1300,6 +1373,7 @@
DE03B2941F2149D600A30B9C /* Firestore_IntegrationTests_iOS */,
DE29E7F51F2174B000909613 /* AllTests_iOS */,
DE0761E31F2FE611003233AF /* SwiftBuildTest */,
+ 6EDD3AD120BF247500C33877 /* Firestore_FuzzTests_iOS */,
);
};
/* End PBXProject section */
@@ -1342,6 +1416,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 6EDD3B4A20BF247500C33877 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
DE03B2D81F2149D600A30B9C /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1490,6 +1571,42 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ 6EDD3AD420BF247500C33877 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Firestore_FuzzTests_iOS-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 6EDD3B5720BF247500C33877 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh",
+ "${BUILT_PRODUCTS_DIR}/LibFuzzer/LibFuzzer.framework",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputPaths = (
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LibFuzzer.framework",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
761F9C177D75EA79C6C89187 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1625,6 +1742,21 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
+ E3B8CDD068DA992B3A113704 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "[CP] Copy Pods Resources";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Firestore_FuzzTests_iOS/Pods-Firestore_FuzzTests_iOS-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
E7A967D34B382BF27EF0E619 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1814,6 +1946,7 @@
618BBEB120B89AAC00B5BCE7 /* status.pb.cc in Sources */,
54A0352F20A3B3D8003E0143 /* status_test.cc in Sources */,
54A0353020A3B3D8003E0143 /* statusor_test.cc in Sources */,
+ 0535C1B65DADAE1CE47FA3CA /* string_format_apple_test.mm in Sources */,
54131E9720ADE679001DF3FF /* string_format_test.cc in Sources */,
AB380CFE201A2F4500D97691 /* string_util_test.cc in Sources */,
618BBEA620B89AAC00B5BCE7 /* target.pb.cc in Sources */,
@@ -1823,11 +1956,20 @@
ABC1D7E12023A40C00BA84F0 /* token_test.cc in Sources */,
54A0352720A3AED0003E0143 /* transform_operations_test.mm in Sources */,
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 */,
);
runOnlyForDeploymentPostprocessing = 0;
};
+ 6EDD3AD520BF247500C33877 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 6EDD3B6020BF25AE00C33877 /* FSTFuzzTestsPrincipal.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
DE03B2981F2149D600A30B9C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -1880,6 +2022,11 @@
target = 6003F589195388D20070C39A /* Firestore_Example_iOS */;
targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */;
};
+ 6EDD3AD220BF247500C33877 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 6003F589195388D20070C39A /* Firestore_Example_iOS */;
+ targetProxy = 6EDD3AD320BF247500C33877 /* PBXContainerItemProxy */;
+ };
DE03B2951F2149D600A30B9C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6003F589195388D20070C39A /* Firestore_Example_iOS */;
@@ -2044,6 +2191,7 @@
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
ONLY_ACTIVE_ARCH = YES;
+ OTHER_CFLAGS = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
@@ -2077,6 +2225,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ OTHER_CFLAGS = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
@@ -2160,6 +2309,54 @@
"\"${PODS_ROOT}/ProtobufCpp/src\"",
);
INFOPLIST_FILE = "Tests/Tests-Info.plist";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleTest/GoogleTest.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/ProtobufCpp/ProtobufCpp.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
+ "$(inherited)",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL/openssl.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseAuth/FirebaseAuth.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/FirebaseFirestore.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/Firebase\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"",
+ "-DPB_FIELD_32BIT",
+ "-DPB_NO_PACKED_STRUCTS=1",
+ );
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SYSTEM_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/nanopb\"";
@@ -2197,6 +2394,54 @@
"\"${PODS_ROOT}/ProtobufCpp/src\"",
);
INFOPLIST_FILE = "Tests/Tests-Info.plist";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleTest/GoogleTest.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/ProtobufCpp/ProtobufCpp.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
+ "$(inherited)",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL/openssl.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseAuth/FirebaseAuth.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseCore/FirebaseCore.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/FirebaseFirestore/FirebaseFirestore.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/Protobuf/Protobuf.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-Core/grpc.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-ProtoRPC/ProtoRPC.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC-RxLibrary/RxLibrary.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/gRPC/GRPCClient.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/leveldb-library/leveldb.framework/Headers\"",
+ "-iquote",
+ "\"${PODS_CONFIGURATION_BUILD_DIR}/nanopb/nanopb.framework/Headers\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/Firebase\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseAnalytics\"",
+ "-isystem",
+ "\"${PODS_ROOT}/Headers/Public/FirebaseInstanceID\"",
+ "-DPB_FIELD_32BIT",
+ "-DPB_NO_PACKED_STRUCTS=1",
+ );
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
SYSTEM_HEADER_SEARCH_PATHS = "\"${PODS_ROOT}/nanopb\"";
@@ -2205,6 +2450,66 @@
};
name = Release;
};
+ 6EDD3B5920BF247500C33877 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 84434E57CA72951015FC71BC /* Pods-Firestore_FuzzTests_iOS.debug.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "COCOAPODS=1",
+ "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1",
+ );
+ INFOPLIST_FILE = "FuzzTests/Firestore_FuzzTests_iOS-Info.plist";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-fsanitize-coverage=trace-pc-guard",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Debug;
+ };
+ 6EDD3B5A20BF247500C33877 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 97C492D2524E92927C11F425 /* Pods-Firestore_FuzzTests_iOS.release.xcconfig */;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ DEVELOPMENT_TEAM = EQHXZ8M8AV;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ "$(DEVELOPER_FRAMEWORKS_DIR)",
+ );
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "";
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "COCOAPODS=1",
+ "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1",
+ );
+ INFOPLIST_FILE = "FuzzTests/Firestore_FuzzTests_iOS-Info.plist";
+ OTHER_CFLAGS = (
+ "$(inherited)",
+ "-fsanitize-coverage=trace-pc-guard",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Firestore_Example_iOS.app/Firestore_Example_iOS";
+ WRAPPER_EXTENSION = xctest;
+ };
+ name = Release;
+ };
DE03B2E71F2149D600A30B9C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 1277F98C20D2DF0867496976 /* Pods-Firestore_IntegrationTests_iOS.debug.xcconfig */;
@@ -2388,6 +2693,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ 6EDD3B5820BF247500C33877 /* Build configuration list for PBXNativeTarget "Firestore_FuzzTests_iOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 6EDD3B5920BF247500C33877 /* Debug */,
+ 6EDD3B5A20BF247500C33877 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
DE03B2E61F2149D600A30B9C /* Build configuration list for PBXNativeTarget "Firestore_IntegrationTests_iOS" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_FuzzTests_iOS.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_FuzzTests_iOS.xcscheme
new file mode 100644
index 0000000..039273b
--- /dev/null
+++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_FuzzTests_iOS.xcscheme
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0930"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ enableAddressSanitizer = "YES"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ <TestableReference
+ skipped = "NO">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "6EDD3AD120BF247500C33877"
+ BuildableName = "Firestore_FuzzTests_iOS.xctest"
+ BlueprintName = "Firestore_FuzzTests_iOS"
+ ReferencedContainer = "container:Firestore.xcodeproj">
+ </BuildableReference>
+ </TestableReference>
+ </Testables>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </TestAction>
+ <LaunchAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ debugServiceExtension = "internal"
+ allowLocationSimulation = "YES">
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm
new file mode 100644
index 0000000..63f6db0
--- /dev/null
+++ b/Firestore/Example/FuzzTests/FSTFuzzTestsPrincipal.mm
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+#import <Foundation/NSObject.h>
+
+#include "LibFuzzer/FuzzerDefs.h"
+
+namespace {
+
+// Contains the code to be fuzzed. Called by the fuzzing library with
+// different argument values for `data` and `size`.
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ // Code to be fuzz-tested here.
+ return 0;
+}
+
+// Simulates calling the main() function of libFuzzer (FuzzerMain.cpp).
+int RunFuzzTestingMain() {
+ // Arguments to libFuzzer main() function should be added to this array,
+ // e.g., dictionaries, corpus, number of runs, jobs, etc.
+ char *program_args[] = {
+ const_cast<char *>("RunFuzzTestingMain") // First argument is program name.
+ };
+ char **argv = program_args;
+ int argc = sizeof(program_args) / sizeof(program_args[0]);
+
+ // Start fuzzing using libFuzzer's driver.
+ return fuzzer::FuzzerDriver(&argc, &argv, LLVMFuzzerTestOneInput);
+}
+
+} // namespace
+
+/**
+ * This class is registered as the NSPrincipalClass in the
+ * Firestore_FuzzTests_iOS bundle's Info.plist. XCTest instantiates this class
+ * to perform one-time setup for the test bundle, as documented here:
+ *
+ * https://developer.apple.com/documentation/xctest/xctestobservationcenter
+ */
+@interface FSTFuzzTestsPrincipal : NSObject
+@end
+
+@implementation FSTFuzzTestsPrincipal
+
+- (instancetype)init {
+ self = [super init];
+ RunFuzzTestingMain();
+ return self;
+}
+
+@end
diff --git a/Firestore/Example/FuzzTests/Firestore_FuzzTests_iOS-Info.plist b/Firestore/Example/FuzzTests/Firestore_FuzzTests_iOS-Info.plist
new file mode 100644
index 0000000..0d53e5f
--- /dev/null
+++ b/Firestore/Example/FuzzTests/Firestore_FuzzTests_iOS-Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>NSPrincipalClass</key>
+ <string>FSTFuzzTestsPrincipal</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+</dict>
+</plist>
diff --git a/Firestore/Example/LibFuzzer.podspec b/Firestore/Example/LibFuzzer.podspec
new file mode 100644
index 0000000..0f677f5
--- /dev/null
+++ b/Firestore/Example/LibFuzzer.podspec
@@ -0,0 +1,45 @@
+# 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.
+
+# A podspec for libFuzzer. Excludes the 'FuzzerMain.cpp' because the pod
+# installation would require the 'LLVMFuzzerTestOneInput' function to be
+# linked when the pod is being created, but it will be available in
+# the fuzzing application. Hence, users of this Pod are required to
+# provide their main function similar to 'FuzzerMain.cpp'.
+# See the build script of libFuzzer for more details:
+# https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer/build.sh
+
+Pod::Spec.new do |s|
+ s.name = 'LibFuzzer'
+ s.version = '1.0'
+ s.summary = 'libFuzzer for fuzz testing'
+ s.homepage = 'https://llvm.org/docs/LibFuzzer.html'
+ s.license = { :type => 'BSD-Like' }
+ s.authors = 'LLVM Team'
+
+ # Check out only libFuzzer folder.
+ s.source = {
+ :svn => 'https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer'
+ }
+
+ # Add all source files, except for the FuzzerMain.cpp.
+ s.source_files = '*.{h,cpp,def}'
+ s.exclude_files = 'FuzzerMain.cpp'
+
+ s.library = 'c++'
+
+ s.pod_target_xcconfig = {
+ 'CLANG_CXX_LANGUAGE_STANDARD' => 'c++11'
+ }
+end
diff --git a/Firestore/Example/Podfile b/Firestore/Example/Podfile
index a98ae20..2241582 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/Core', '5.0.1'
+ pod 'Firebase/Core', '5.1.0'
pod 'FirebaseAuth', :path => '../../'
pod 'FirebaseCore', :path => '../../'
@@ -38,4 +38,10 @@ target 'Firestore_Example_iOS' do
target 'SwiftBuildTest' do
platform :ios, '8.0'
end
+
+ target 'Firestore_FuzzTests_iOS' do
+ inherit! :search_paths
+
+ pod 'LibFuzzer', :podspec => 'LibFuzzer.podspec'
+ end
end
diff --git a/Firestore/Protos/CMakeLists.txt b/Firestore/Protos/CMakeLists.txt
index c589a0f..5c0fda0 100644
--- a/Firestore/Protos/CMakeLists.txt
+++ b/Firestore/Protos/CMakeLists.txt
@@ -2,39 +2,39 @@ cc_library(
firebase_firestore_protos_nanopb
SOURCES
nanopb/firestore/local/maybe_document.pb.c
- nanopb/firestore/local/maybe_document.pb.h
+ nanopb/firestore/local/maybe_document.nanopb.h
nanopb/firestore/local/mutation.pb.c
- nanopb/firestore/local/mutation.pb.h
+ nanopb/firestore/local/mutation.nanopb.h
nanopb/firestore/local/target.pb.c
- nanopb/firestore/local/target.pb.h
+ nanopb/firestore/local/target.nanopb.h
nanopb/google/api/annotations.pb.c
- nanopb/google/api/annotations.pb.h
+ nanopb/google/api/annotations.nanopb.h
nanopb/google/api/http.pb.c
- nanopb/google/api/http.pb.h
+ nanopb/google/api/http.nanopb.h
nanopb/google/firestore/v1beta1/common.pb.c
- nanopb/google/firestore/v1beta1/common.pb.h
+ nanopb/google/firestore/v1beta1/common.nanopb.h
nanopb/google/firestore/v1beta1/document.pb.c
- nanopb/google/firestore/v1beta1/document.pb.h
+ nanopb/google/firestore/v1beta1/document.nanopb.h
nanopb/google/firestore/v1beta1/firestore.pb.c
- nanopb/google/firestore/v1beta1/firestore.pb.h
+ nanopb/google/firestore/v1beta1/firestore.nanopb.h
nanopb/google/firestore/v1beta1/query.pb.c
- nanopb/google/firestore/v1beta1/query.pb.h
+ nanopb/google/firestore/v1beta1/query.nanopb.h
nanopb/google/firestore/v1beta1/write.pb.c
- nanopb/google/firestore/v1beta1/write.pb.h
+ nanopb/google/firestore/v1beta1/write.nanopb.h
nanopb/google/protobuf/any.pb.c
- nanopb/google/protobuf/any.pb.h
+ nanopb/google/protobuf/any.nanopb.h
nanopb/google/protobuf/empty.pb.c
- nanopb/google/protobuf/empty.pb.h
+ nanopb/google/protobuf/empty.nanopb.h
nanopb/google/protobuf/struct.pb.c
- nanopb/google/protobuf/struct.pb.h
+ nanopb/google/protobuf/struct.nanopb.h
nanopb/google/protobuf/timestamp.pb.c
- nanopb/google/protobuf/timestamp.pb.h
+ nanopb/google/protobuf/timestamp.nanopb.h
nanopb/google/protobuf/wrappers.pb.c
- nanopb/google/protobuf/wrappers.pb.h
+ nanopb/google/protobuf/wrappers.nanopb.h
nanopb/google/rpc/status.pb.c
- nanopb/google/rpc/status.pb.h
+ nanopb/google/rpc/status.nanopb.h
nanopb/google/type/latlng.pb.c
- nanopb/google/type/latlng.pb.h
+ nanopb/google/type/latlng.nanopb.h
DEPENDS
nanopb
)
@@ -77,16 +77,6 @@ cc_library(
cpp/google/firestore/v1beta1/query.pb.h
cpp/google/firestore/v1beta1/write.pb.cc
cpp/google/firestore/v1beta1/write.pb.h
- cpp/google/protobuf/any.pb.cc
- cpp/google/protobuf/any.pb.h
- cpp/google/protobuf/empty.pb.cc
- cpp/google/protobuf/empty.pb.h
- cpp/google/protobuf/struct.pb.cc
- cpp/google/protobuf/struct.pb.h
- cpp/google/protobuf/timestamp.pb.cc
- cpp/google/protobuf/timestamp.pb.h
- cpp/google/protobuf/wrappers.pb.cc
- cpp/google/protobuf/wrappers.pb.h
cpp/google/rpc/status.pb.cc
cpp/google/rpc/status.pb.h
cpp/google/type/latlng.pb.cc
diff --git a/Firestore/Protos/build-protos.sh b/Firestore/Protos/build-protos.sh
index d55ed55..2745a41 100755
--- a/Firestore/Protos/build-protos.sh
+++ b/Firestore/Protos/build-protos.sh
@@ -27,24 +27,36 @@ pod update
--nanopb_out="--options-file=protos/%s.options:nanopb" \
`find protos -name *.proto -print | xargs`
-# Remove "well-known" protos from objc. (We get these for free. We only need
-# them for nanopb.)
+# Remove "well-known" protos from objc and cpp. (We get these for free. We only
+# need them for nanopb.)
rm -rf objc/google/protobuf/
+rm -rf cpp/google/protobuf
# If a proto uses a field named 'delete', nanopb happily uses that in the
# message definition. Works fine for C; not so much for C++. Rename uses of this
# to delete_ (which is how protoc does it for c++ files.)
perl -i -pe 's/\bdelete\b/delete_/g' `find nanopb -type f`
+# Rename nanopb's headers from foo.pb.h to foo.nanopb.h. This avoids collisions
+# with libprotobuf.
+for f in $(find nanopb -name \*.pb.h); do
+ mv "$f" "${f%.pb.h}.nanopb.h"
+done
+
+# Adjust include paths to match
+for f in $(find nanopb -name \*.h -or -name \*.c); do
+ perl -i -pe 's/(#include .*)\.pb\.h/\1.nanopb.h/' $f
+done
+
# CocoaPods does not like paths in library imports, flatten them.
-for i in `find objc -name "*.[mh]"` ; do
+for i in $(find objc -name "*.[mh]"); do
perl -i -pe 's#import ".*/#import "#' $i;
done
# Remove the unnecessary extensionRegistry functions.
-for i in `find objc -name "*.[m]" ` ; do
+for i in $(find objc -name "*.[m]"); do
./strip-registry.py $i
done
diff --git a/Firestore/Protos/cpp/google/protobuf/any.pb.cc b/Firestore/Protos/cpp/google/protobuf/any.pb.cc
deleted file mode 100644
index 6f7c576..0000000
--- a/Firestore/Protos/cpp/google/protobuf/any.pb.cc
+++ /dev/null
@@ -1,456 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/any.proto
-
-#include <google/protobuf/any.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
-// @@protoc_insertion_point(includes)
-namespace google {
-namespace protobuf {
-class AnyDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Any>
- _instance;
-} _Any_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace protobuf_google_2fprotobuf_2fany_2eproto {
-void InitDefaultsAnyImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Any_default_instance_;
- new (ptr) ::google::protobuf::Any();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Any::InitAsDefaultInstance();
-}
-
-void InitDefaultsAny() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsAnyImpl);
-}
-
-::google::protobuf::Metadata file_level_metadata[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::protobuf::Any, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Any, type_url_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Any, value_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::Any)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Any_default_instance_),
-};
-
-void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/any.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
-}
-
-void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\031google/protobuf/any.proto\022\017google.prot"
- "obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
- " \001(\014Bo\n\023com.google.protobufB\010AnyProtoP\001Z"
- "%github.com/golang/protobuf/ptypes/any\242\002"
- "\003GPB\252\002\036Google.Protobuf.WellKnownTypesb\006p"
- "roto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 205);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/any.proto", &protobuf_RegisterTypes);
-}
-
-void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
-}
-// Force AddDescriptors() to be called at dynamic initialization time.
-struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
-} static_descriptor_initializer;
-} // namespace protobuf_google_2fprotobuf_2fany_2eproto
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-void Any::InitAsDefaultInstance() {
-}
-void Any::PackFrom(const ::google::protobuf::Message& message) {
- _any_metadata_.PackFrom(message);
-}
-
-void Any::PackFrom(const ::google::protobuf::Message& message,
- const ::std::string& type_url_prefix) {
- _any_metadata_.PackFrom(message, type_url_prefix);
-}
-
-bool Any::UnpackTo(::google::protobuf::Message* message) const {
- return _any_metadata_.UnpackTo(message);
-}
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Any::kTypeUrlFieldNumber;
-const int Any::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Any::Any()
- : ::google::protobuf::Message(), _internal_metadata_(NULL), _any_metadata_(&type_url_, &value_) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaultsAny();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Any)
-}
-Any::Any(const Any& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0),
- _any_metadata_(&type_url_, &value_) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.type_url().size() > 0) {
- type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
- }
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Any)
-}
-
-void Any::SharedCtor() {
- type_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
-}
-
-Any::~Any() {
- // @@protoc_insertion_point(destructor:google.protobuf.Any)
- SharedDtor();
-}
-
-void Any::SharedDtor() {
- type_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void Any::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Any::descriptor() {
- ::protobuf_google_2fprotobuf_2fany_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fany_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Any& Any::default_instance() {
- ::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaultsAny();
- return *internal_default_instance();
-}
-
-Any* Any::New(::google::protobuf::Arena* arena) const {
- Any* n = new Any;
- if (arena != NULL) {
- arena->Own(n);
- }
- return n;
-}
-
-void Any::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Any)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _internal_metadata_.Clear();
-}
-
-bool Any::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.protobuf.Any)
- 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)) {
- // string type_url = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_type_url()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->type_url().data(), static_cast<int>(this->type_url().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.Any.type_url"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // bytes value = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Any)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Any)
- return false;
-#undef DO_
-}
-
-void Any::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Any)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string type_url = 1;
- if (this->type_url().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->type_url().data(), static_cast<int>(this->type_url().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Any.type_url");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->type_url(), output);
- }
-
- // bytes value = 2;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 2, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Any)
-}
-
-::google::protobuf::uint8* Any::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Any)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string type_url = 1;
- if (this->type_url().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->type_url().data(), static_cast<int>(this->type_url().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Any.type_url");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->type_url(), target);
- }
-
- // bytes value = 2;
- if (this->value().size() > 0) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 2, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Any)
- return target;
-}
-
-size_t Any::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Any)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string type_url = 1;
- if (this->type_url().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->type_url());
- }
-
- // bytes value = 2;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Any::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Any)
- GOOGLE_DCHECK_NE(&from, this);
- const Any* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Any>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Any)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Any)
- MergeFrom(*source);
- }
-}
-
-void Any::MergeFrom(const Any& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Any)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.type_url().size() > 0) {
-
- type_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_url_);
- }
- if (from.value().size() > 0) {
-
- value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
- }
-}
-
-void Any::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Any)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Any::CopyFrom(const Any& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Any)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Any::IsInitialized() const {
- return true;
-}
-
-void Any::Swap(Any* other) {
- if (other == this) return;
- InternalSwap(other);
-}
-void Any::InternalSwap(Any* other) {
- using std::swap;
- type_url_.Swap(&other->type_url_);
- value_.Swap(&other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Any::GetMetadata() const {
- protobuf_google_2fprotobuf_2fany_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fany_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/google/protobuf/any.pb.h b/Firestore/Protos/cpp/google/protobuf/any.pb.h
deleted file mode 100644
index 98a8f3e..0000000
--- a/Firestore/Protos/cpp/google/protobuf/any.pb.h
+++ /dev/null
@@ -1,339 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/any.proto
-
-#ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3005000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_table_driven.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h> // IWYU pragma: export
-#include <google/protobuf/extension_set.h> // IWYU pragma: export
-#include <google/protobuf/unknown_field_set.h>
-#include <google/protobuf/any.h>
-// @@protoc_insertion_point(includes)
-
-namespace protobuf_google_2fprotobuf_2fany_2eproto {
-// Internal implementation detail -- do not use these members.
-struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[1];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors();
-void InitDefaultsAnyImpl();
-void InitDefaultsAny();
-inline void InitDefaults() {
- InitDefaultsAny();
-}
-} // namespace protobuf_google_2fprotobuf_2fany_2eproto
-namespace google {
-namespace protobuf {
-class Any;
-class AnyDefaultTypeInternal;
-extern AnyDefaultTypeInternal _Any_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-class Any : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
- public:
- Any();
- virtual ~Any();
-
- Any(const Any& from);
-
- inline Any& operator=(const Any& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Any(Any&& from) noexcept
- : Any() {
- *this = ::std::move(from);
- }
-
- inline Any& operator=(Any&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- static const ::google::protobuf::Descriptor* descriptor();
- static const Any& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Any* internal_default_instance() {
- return reinterpret_cast<const Any*>(
- &_Any_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 0;
-
- // implements Any -----------------------------------------------
-
- void PackFrom(const ::google::protobuf::Message& message);
- void PackFrom(const ::google::protobuf::Message& message,
- const ::std::string& type_url_prefix);
- bool UnpackTo(::google::protobuf::Message* message) const;
- template<typename T> bool Is() const {
- return _any_metadata_.Is<T>();
- }
-
- void Swap(Any* other);
- friend void swap(Any& a, Any& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Any* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Any& from);
- void MergeFrom(const Any& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Any* other);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return NULL;
- }
- inline void* MaybeArenaPtr() const {
- return NULL;
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // string type_url = 1;
- void clear_type_url();
- static const int kTypeUrlFieldNumber = 1;
- const ::std::string& type_url() const;
- void set_type_url(const ::std::string& value);
- #if LANG_CXX11
- void set_type_url(::std::string&& value);
- #endif
- void set_type_url(const char* value);
- void set_type_url(const char* value, size_t size);
- ::std::string* mutable_type_url();
- ::std::string* release_type_url();
- void set_allocated_type_url(::std::string* type_url);
-
- // bytes value = 2;
- void clear_value();
- static const int kValueFieldNumber = 2;
- const ::std::string& value() const;
- void set_value(const ::std::string& value);
- #if LANG_CXX11
- void set_value(::std::string&& value);
- #endif
- void set_value(const char* value);
- void set_value(const void* value, size_t size);
- ::std::string* mutable_value();
- ::std::string* release_value();
- void set_allocated_value(::std::string* value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Any)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- ::google::protobuf::internal::ArenaStringPtr type_url_;
- ::google::protobuf::internal::ArenaStringPtr value_;
- mutable int _cached_size_;
- ::google::protobuf::internal::AnyMetadata _any_metadata_;
- friend struct ::protobuf_google_2fprotobuf_2fany_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaultsAnyImpl();
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// Any
-
-// string type_url = 1;
-inline void Any::clear_type_url() {
- type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& Any::type_url() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
- return type_url_.GetNoArena();
-}
-inline void Any::set_type_url(const ::std::string& value) {
-
- type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
-}
-#if LANG_CXX11
-inline void Any::set_type_url(::std::string&& value) {
-
- type_url_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
-}
-#endif
-inline void Any::set_type_url(const char* value) {
- GOOGLE_DCHECK(value != NULL);
-
- type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
-}
-inline void Any::set_type_url(const char* value, size_t size) {
-
- type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
-}
-inline ::std::string* Any::mutable_type_url() {
-
- // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
- return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* Any::release_type_url() {
- // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
-
- return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void Any::set_allocated_type_url(::std::string* type_url) {
- if (type_url != NULL) {
-
- } else {
-
- }
- type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
-}
-
-// bytes value = 2;
-inline void Any::clear_value() {
- value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline const ::std::string& Any::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
- return value_.GetNoArena();
-}
-inline void Any::set_value(const ::std::string& value) {
-
- value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
-}
-#if LANG_CXX11
-inline void Any::set_value(::std::string&& value) {
-
- value_.SetNoArena(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
-}
-#endif
-inline void Any::set_value(const char* value) {
- GOOGLE_DCHECK(value != NULL);
-
- value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
- // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
-}
-inline void Any::set_value(const void* value, size_t size) {
-
- value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(reinterpret_cast<const char*>(value), size));
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
-}
-inline ::std::string* Any::mutable_value() {
-
- // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
- return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline ::std::string* Any::release_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
-
- return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-inline void Any::set_allocated_value(::std::string* value) {
- if (value != NULL) {
-
- } else {
-
- }
- value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
-}
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/google/protobuf/empty.pb.cc b/Firestore/Protos/cpp/google/protobuf/empty.pb.cc
deleted file mode 100644
index dfed277..0000000
--- a/Firestore/Protos/cpp/google/protobuf/empty.pb.cc
+++ /dev/null
@@ -1,358 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/empty.proto
-
-#include <google/protobuf/empty.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
-// @@protoc_insertion_point(includes)
-namespace google {
-namespace protobuf {
-class EmptyDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Empty>
- _instance;
-} _Empty_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace protobuf_google_2fprotobuf_2fempty_2eproto {
-void InitDefaultsEmptyImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Empty_default_instance_;
- new (ptr) ::google::protobuf::Empty();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Empty::InitAsDefaultInstance();
-}
-
-void InitDefaultsEmpty() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsEmptyImpl);
-}
-
-::google::protobuf::Metadata file_level_metadata[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::protobuf::Empty, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::Empty)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Empty_default_instance_),
-};
-
-void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/empty.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
-}
-
-void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\033google/protobuf/empty.proto\022\017google.pr"
- "otobuf\"\007\n\005EmptyBv\n\023com.google.protobufB\n"
- "EmptyProtoP\001Z\'github.com/golang/protobuf"
- "/ptypes/empty\370\001\001\242\002\003GPB\252\002\036Google.Protobuf"
- ".WellKnownTypesb\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 183);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/empty.proto", &protobuf_RegisterTypes);
-}
-
-void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
-}
-// Force AddDescriptors() to be called at dynamic initialization time.
-struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
-} static_descriptor_initializer;
-} // namespace protobuf_google_2fprotobuf_2fempty_2eproto
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-void Empty::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Empty::Empty()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Empty)
-}
-Empty::Empty(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Empty)
-}
-Empty::Empty(const Empty& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Empty)
-}
-
-void Empty::SharedCtor() {
- _cached_size_ = 0;
-}
-
-Empty::~Empty() {
- // @@protoc_insertion_point(destructor:google.protobuf.Empty)
- SharedDtor();
-}
-
-void Empty::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void Empty::ArenaDtor(void* object) {
- Empty* _this = reinterpret_cast< Empty* >(object);
- (void)_this;
-}
-void Empty::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Empty::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Empty::descriptor() {
- ::protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Empty& Empty::default_instance() {
- ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmpty();
- return *internal_default_instance();
-}
-
-Empty* Empty::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Empty>(arena);
-}
-
-void Empty::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Empty)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- _internal_metadata_.Clear();
-}
-
-bool Empty::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.protobuf.Empty)
- for (;;) {
- ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
- tag = p.first;
- if (!p.second) goto handle_unusual;
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Empty)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Empty)
- return false;
-#undef DO_
-}
-
-void Empty::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Empty)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Empty)
-}
-
-::google::protobuf::uint8* Empty::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Empty)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Empty)
- return target;
-}
-
-size_t Empty::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Empty)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Empty::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Empty)
- GOOGLE_DCHECK_NE(&from, this);
- const Empty* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Empty>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Empty)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Empty)
- MergeFrom(*source);
- }
-}
-
-void Empty::MergeFrom(const Empty& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Empty)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
-}
-
-void Empty::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Empty)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Empty::CopyFrom(const Empty& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Empty)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Empty::IsInitialized() const {
- return true;
-}
-
-void Empty::Swap(Empty* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Empty* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Empty::UnsafeArenaSwap(Empty* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Empty::InternalSwap(Empty* other) {
- using std::swap;
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Empty::GetMetadata() const {
- protobuf_google_2fprotobuf_2fempty_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fempty_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/google/protobuf/empty.pb.h b/Firestore/Protos/cpp/google/protobuf/empty.pb.h
deleted file mode 100644
index a5276b6..0000000
--- a/Firestore/Protos/cpp/google/protobuf/empty.pb.h
+++ /dev/null
@@ -1,206 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/empty.proto
-
-#ifndef PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3005000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_table_driven.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h> // IWYU pragma: export
-#include <google/protobuf/extension_set.h> // IWYU pragma: export
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace protobuf_google_2fprotobuf_2fempty_2eproto {
-// Internal implementation detail -- do not use these members.
-struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[1];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors();
-void InitDefaultsEmptyImpl();
-void InitDefaultsEmpty();
-inline void InitDefaults() {
- InitDefaultsEmpty();
-}
-} // namespace protobuf_google_2fprotobuf_2fempty_2eproto
-namespace google {
-namespace protobuf {
-class Empty;
-class EmptyDefaultTypeInternal;
-extern EmptyDefaultTypeInternal _Empty_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-class Empty : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Empty) */ {
- public:
- Empty();
- virtual ~Empty();
-
- Empty(const Empty& from);
-
- inline Empty& operator=(const Empty& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Empty(Empty&& from) noexcept
- : Empty() {
- *this = ::std::move(from);
- }
-
- inline Empty& operator=(Empty&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Empty& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Empty* internal_default_instance() {
- return reinterpret_cast<const Empty*>(
- &_Empty_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 0;
-
- void UnsafeArenaSwap(Empty* other);
- void Swap(Empty* other);
- friend void swap(Empty& a, Empty& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Empty* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Empty* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Empty& from);
- void MergeFrom(const Empty& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Empty* other);
- protected:
- explicit Empty(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Empty)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fempty_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fempty_2eproto::InitDefaultsEmptyImpl();
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// Empty
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_google_2fprotobuf_2fempty_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/google/protobuf/struct.pb.cc b/Firestore/Protos/cpp/google/protobuf/struct.pb.cc
deleted file mode 100644
index 360a89b..0000000
--- a/Firestore/Protos/cpp/google/protobuf/struct.pb.cc
+++ /dev/null
@@ -1,1491 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/struct.proto
-
-#include <google/protobuf/struct.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
-// @@protoc_insertion_point(includes)
-namespace google {
-namespace protobuf {
-class Struct_FieldsEntry_DoNotUseDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Struct_FieldsEntry_DoNotUse>
- _instance;
-} _Struct_FieldsEntry_DoNotUse_default_instance_;
-class StructDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Struct>
- _instance;
-} _Struct_default_instance_;
-class ValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Value>
- _instance;
- int null_value_;
- double number_value_;
- ::google::protobuf::internal::ArenaStringPtr string_value_;
- bool bool_value_;
- const ::google::protobuf::Struct* struct_value_;
- const ::google::protobuf::ListValue* list_value_;
-} _Value_default_instance_;
-class ListValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<ListValue>
- _instance;
-} _ListValue_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
-void InitDefaultsListValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_;
- new (ptr) ::google::protobuf::Struct_FieldsEntry_DoNotUse();
- }
- {
- void* ptr = &::google::protobuf::_Struct_default_instance_;
- new (ptr) ::google::protobuf::Struct();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- {
- void* ptr = &::google::protobuf::_Value_default_instance_;
- new (ptr) ::google::protobuf::Value();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- {
- void* ptr = &::google::protobuf::_ListValue_default_instance_;
- new (ptr) ::google::protobuf::ListValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Struct_FieldsEntry_DoNotUse::InitAsDefaultInstance();
- ::google::protobuf::Struct::InitAsDefaultInstance();
- ::google::protobuf::Value::InitAsDefaultInstance();
- ::google::protobuf::ListValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsListValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsListValueImpl);
-}
-
-::google::protobuf::Metadata file_level_metadata[4];
-const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors[1];
-
-const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _has_bits_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, key_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct_FieldsEntry_DoNotUse, value_),
- 0,
- 1,
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Struct, fields_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, _internal_metadata_),
- ~0u, // no _extensions_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, _oneof_case_[0]),
- ~0u, // no _weak_field_map_
- offsetof(::google::protobuf::ValueDefaultTypeInternal, null_value_),
- offsetof(::google::protobuf::ValueDefaultTypeInternal, number_value_),
- offsetof(::google::protobuf::ValueDefaultTypeInternal, string_value_),
- offsetof(::google::protobuf::ValueDefaultTypeInternal, bool_value_),
- offsetof(::google::protobuf::ValueDefaultTypeInternal, struct_value_),
- offsetof(::google::protobuf::ValueDefaultTypeInternal, list_value_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Value, kind_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::ListValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::ListValue, values_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, 7, sizeof(::google::protobuf::Struct_FieldsEntry_DoNotUse)},
- { 9, -1, sizeof(::google::protobuf::Struct)},
- { 15, -1, sizeof(::google::protobuf::Value)},
- { 27, -1, sizeof(::google::protobuf::ListValue)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Struct_FieldsEntry_DoNotUse_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Struct_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_ListValue_default_instance_),
-};
-
-void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/struct.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, file_level_enum_descriptors, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 4);
-}
-
-void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\034google/protobuf/struct.proto\022\017google.p"
- "rotobuf\"\204\001\n\006Struct\0223\n\006fields\030\001 \003(\0132#.goo"
- "gle.protobuf.Struct.FieldsEntry\032E\n\013Field"
- "sEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goo"
- "gle.protobuf.Value:\0028\001\"\352\001\n\005Value\0220\n\nnull"
- "_value\030\001 \001(\0162\032.google.protobuf.NullValue"
- "H\000\022\026\n\014number_value\030\002 \001(\001H\000\022\026\n\014string_val"
- "ue\030\003 \001(\tH\000\022\024\n\nbool_value\030\004 \001(\010H\000\022/\n\014stru"
- "ct_value\030\005 \001(\0132\027.google.protobuf.StructH"
- "\000\0220\n\nlist_value\030\006 \001(\0132\032.google.protobuf."
- "ListValueH\000B\006\n\004kind\"3\n\tListValue\022&\n\006valu"
- "es\030\001 \003(\0132\026.google.protobuf.Value*\033\n\tNull"
- "Value\022\016\n\nNULL_VALUE\020\000B\201\001\n\023com.google.pro"
- "tobufB\013StructProtoP\001Z1github.com/golang/"
- "protobuf/ptypes/struct;structpb\370\001\001\242\002\003GPB"
- "\252\002\036Google.Protobuf.WellKnownTypesb\006proto"
- "3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 641);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/struct.proto", &protobuf_RegisterTypes);
-}
-
-void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
-}
-// Force AddDescriptors() to be called at dynamic initialization time.
-struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
-} static_descriptor_initializer;
-} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
-namespace google {
-namespace protobuf {
-const ::google::protobuf::EnumDescriptor* NullValue_descriptor() {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_enum_descriptors[0];
-}
-bool NullValue_IsValid(int value) {
- switch (value) {
- case 0:
- return true;
- default:
- return false;
- }
-}
-
-
-// ===================================================================
-
-Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse() {}
-Struct_FieldsEntry_DoNotUse::Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {}
-void Struct_FieldsEntry_DoNotUse::MergeFrom(const Struct_FieldsEntry_DoNotUse& other) {
- MergeFromInternal(other);
-}
-::google::protobuf::Metadata Struct_FieldsEntry_DoNotUse::GetMetadata() const {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[0];
-}
-void Struct_FieldsEntry_DoNotUse::MergeFrom(
- const ::google::protobuf::Message& other) {
- ::google::protobuf::Message::MergeFrom(other);
-}
-
-
-// ===================================================================
-
-void Struct::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Struct::kFieldsFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Struct::Struct()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Struct)
-}
-Struct::Struct(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena),
- fields_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
-}
-Struct::Struct(const Struct& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- fields_.MergeFrom(from.fields_);
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
-}
-
-void Struct::SharedCtor() {
- _cached_size_ = 0;
-}
-
-Struct::~Struct() {
- // @@protoc_insertion_point(destructor:google.protobuf.Struct)
- SharedDtor();
-}
-
-void Struct::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void Struct::ArenaDtor(void* object) {
- Struct* _this = reinterpret_cast< Struct* >(object);
- (void)_this;
-}
-void Struct::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Struct::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Struct::descriptor() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Struct& Struct::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- return *internal_default_instance();
-}
-
-Struct* Struct::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Struct>(arena);
-}
-
-void Struct::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- fields_.Clear();
- _internal_metadata_.Clear();
-}
-
-bool Struct::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.protobuf.Struct)
- 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<string, .google.protobuf.Value> fields = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- Struct_FieldsEntry_DoNotUse::Parser< ::google::protobuf::internal::MapField<
- Struct_FieldsEntry_DoNotUse,
- ::std::string, ::google::protobuf::Value,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0 >,
- ::google::protobuf::Map< ::std::string, ::google::protobuf::Value > > parser(&fields_);
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
- input, &parser));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- parser.key().data(), static_cast<int>(parser.key().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.Struct.FieldsEntry.key"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Struct)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Struct)
- return false;
-#undef DO_
-}
-
-void Struct::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Struct)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // map<string, .google.protobuf.Value> fields = 1;
- if (!this->fields().empty()) {
- typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
- ConstPtr;
- typedef ConstPtr SortItem;
- typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
- struct Utf8Check {
- static void Check(ConstPtr p) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Struct.FieldsEntry.key");
- }
- };
-
- if (output->IsSerializationDeterministic() &&
- this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
- new SortItem[this->fields().size()]);
- typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
- it = this->fields().begin();
- it != this->fields().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(fields_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, *entry, output);
- if (entry->GetArena() != NULL) {
- entry.release();
- }
- Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
- }
- } else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
- it = this->fields().begin();
- it != this->fields().end(); ++it) {
- entry.reset(fields_.NewEntryWrapper(
- it->first, it->second));
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, *entry, output);
- if (entry->GetArena() != NULL) {
- entry.release();
- }
- Utf8Check::Check(&*it);
- }
- }
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Struct)
-}
-
-::google::protobuf::uint8* Struct::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // map<string, .google.protobuf.Value> fields = 1;
- if (!this->fields().empty()) {
- typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_pointer
- ConstPtr;
- typedef ConstPtr SortItem;
- typedef ::google::protobuf::internal::CompareByDerefFirst<SortItem> Less;
- struct Utf8Check {
- static void Check(ConstPtr p) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- p->first.data(), static_cast<int>(p->first.length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Struct.FieldsEntry.key");
- }
- };
-
- if (deterministic &&
- this->fields().size() > 1) {
- ::google::protobuf::scoped_array<SortItem> items(
- new SortItem[this->fields().size()]);
- typedef ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::size_type size_type;
- size_type n = 0;
- for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
- it = this->fields().begin();
- it != this->fields().end(); ++it, ++n) {
- items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
- }
- ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
- for (size_type i = 0; i < n; i++) {
- entry.reset(fields_.NewEntryWrapper(
- items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 1, *entry, deterministic, target);
-;
- if (entry->GetArena() != NULL) {
- entry.release();
- }
- Utf8Check::Check(items[static_cast<ptrdiff_t>(i)]);
- }
- } else {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
- it = this->fields().begin();
- it != this->fields().end(); ++it) {
- entry.reset(fields_.NewEntryWrapper(
- it->first, it->second));
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageNoVirtualToArray(
- 1, *entry, deterministic, target);
-;
- if (entry->GetArena() != NULL) {
- entry.release();
- }
- Utf8Check::Check(&*it);
- }
- }
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Struct)
- return target;
-}
-
-size_t Struct::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // map<string, .google.protobuf.Value> fields = 1;
- total_size += 1 *
- ::google::protobuf::internal::FromIntSize(this->fields_size());
- {
- ::google::protobuf::scoped_ptr<Struct_FieldsEntry_DoNotUse> entry;
- for (::google::protobuf::Map< ::std::string, ::google::protobuf::Value >::const_iterator
- it = this->fields().begin();
- it != this->fields().end(); ++it) {
- if (entry.get() != NULL && entry->GetArena() != NULL) {
- entry.release();
- }
- entry.reset(fields_.NewEntryWrapper(it->first, it->second));
- total_size += ::google::protobuf::internal::WireFormatLite::
- MessageSizeNoVirtual(*entry);
- }
- if (entry.get() != NULL && entry->GetArena() != NULL) {
- entry.release();
- }
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Struct::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Struct)
- GOOGLE_DCHECK_NE(&from, this);
- const Struct* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Struct>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Struct)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Struct)
- MergeFrom(*source);
- }
-}
-
-void Struct::MergeFrom(const Struct& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- fields_.MergeFrom(from.fields_);
-}
-
-void Struct::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Struct)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Struct::CopyFrom(const Struct& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Struct::IsInitialized() const {
- return true;
-}
-
-void Struct::Swap(Struct* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Struct* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Struct::UnsafeArenaSwap(Struct* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Struct::InternalSwap(Struct* other) {
- using std::swap;
- fields_.Swap(&other->fields_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Struct::GetMetadata() const {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void Value::InitAsDefaultInstance() {
- ::google::protobuf::_Value_default_instance_.null_value_ = 0;
- ::google::protobuf::_Value_default_instance_.number_value_ = 0;
- ::google::protobuf::_Value_default_instance_.string_value_.UnsafeSetDefault(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited());
- ::google::protobuf::_Value_default_instance_.bool_value_ = false;
- ::google::protobuf::_Value_default_instance_.struct_value_ = const_cast< ::google::protobuf::Struct*>(
- ::google::protobuf::Struct::internal_default_instance());
- ::google::protobuf::_Value_default_instance_.list_value_ = const_cast< ::google::protobuf::ListValue*>(
- ::google::protobuf::ListValue::internal_default_instance());
-}
-void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_kind();
- if (struct_value) {
- ::google::protobuf::Arena* submessage_arena =
- ::google::protobuf::Arena::GetArena(struct_value);
- if (message_arena != submessage_arena) {
- struct_value = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, struct_value, submessage_arena);
- }
- set_has_struct_value();
- kind_.struct_value_ = struct_value;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
-}
-void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
- ::google::protobuf::Arena* message_arena = GetArenaNoVirtual();
- clear_kind();
- if (list_value) {
- ::google::protobuf::Arena* submessage_arena =
- ::google::protobuf::Arena::GetArena(list_value);
- if (message_arena != submessage_arena) {
- list_value = ::google::protobuf::internal::GetOwnedMessage(
- message_arena, list_value, submessage_arena);
- }
- set_has_list_value();
- kind_.list_value_ = list_value;
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Value::kNullValueFieldNumber;
-const int Value::kNumberValueFieldNumber;
-const int Value::kStringValueFieldNumber;
-const int Value::kBoolValueFieldNumber;
-const int Value::kStructValueFieldNumber;
-const int Value::kListValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Value::Value()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Value)
-}
-Value::Value(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
-}
-Value::Value(const Value& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- clear_has_kind();
- switch (from.kind_case()) {
- case kNullValue: {
- set_null_value(from.null_value());
- break;
- }
- case kNumberValue: {
- set_number_value(from.number_value());
- break;
- }
- case kStringValue: {
- set_string_value(from.string_value());
- break;
- }
- case kBoolValue: {
- set_bool_value(from.bool_value());
- break;
- }
- case kStructValue: {
- mutable_struct_value()->::google::protobuf::Struct::MergeFrom(from.struct_value());
- break;
- }
- case kListValue: {
- mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_value());
- break;
- }
- case KIND_NOT_SET: {
- break;
- }
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
-}
-
-void Value::SharedCtor() {
- clear_has_kind();
- _cached_size_ = 0;
-}
-
-Value::~Value() {
- // @@protoc_insertion_point(destructor:google.protobuf.Value)
- SharedDtor();
-}
-
-void Value::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- if (has_kind()) {
- clear_kind();
- }
-}
-
-void Value::ArenaDtor(void* object) {
- Value* _this = reinterpret_cast< Value* >(object);
- (void)_this;
-}
-void Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Value::descriptor() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Value& Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- return *internal_default_instance();
-}
-
-Value* Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Value>(arena);
-}
-
-void Value::clear_kind() {
-// @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
- switch (kind_case()) {
- case kNullValue: {
- // No need to clear
- break;
- }
- case kNumberValue: {
- // No need to clear
- break;
- }
- case kStringValue: {
- kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- break;
- }
- case kBoolValue: {
- // No need to clear
- break;
- }
- case kStructValue: {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.struct_value_;
- }
- break;
- }
- case kListValue: {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.list_value_;
- }
- break;
- }
- case KIND_NOT_SET: {
- break;
- }
- }
- _oneof_case_[0] = KIND_NOT_SET;
-}
-
-
-void Value::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- clear_kind();
- _internal_metadata_.Clear();
-}
-
-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.protobuf.Value)
- 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.protobuf.NullValue null_value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- set_null_value(static_cast< ::google::protobuf::NullValue >(value));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // double number_value = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(17u /* 17 & 0xFF */)) {
- clear_kind();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &kind_.number_value_)));
- set_has_number_value();
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // string string_value = 3;
- case 3: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_string_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), static_cast<int>(this->string_value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.Value.string_value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // bool bool_value = 4;
- case 4: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(32u /* 32 & 0xFF */)) {
- clear_kind();
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &kind_.bool_value_)));
- set_has_bool_value();
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .google.protobuf.Struct struct_value = 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_struct_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // .google.protobuf.ListValue list_value = 6;
- case 6: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(50u /* 50 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
- input, mutable_list_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Value)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Value)
- return false;
-#undef DO_
-}
-
-void Value::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .google.protobuf.NullValue null_value = 1;
- if (has_null_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 1, this->null_value(), output);
- }
-
- // double number_value = 2;
- if (has_number_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->number_value(), output);
- }
-
- // string string_value = 3;
- if (has_string_value()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), static_cast<int>(this->string_value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Value.string_value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 3, this->string_value(), output);
- }
-
- // bool bool_value = 4;
- if (has_bool_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->bool_value(), output);
- }
-
- // .google.protobuf.Struct struct_value = 5;
- if (has_struct_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 5, *kind_.struct_value_, output);
- }
-
- // .google.protobuf.ListValue list_value = 6;
- if (has_list_value()) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 6, *kind_.list_value_, output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Value)
-}
-
-::google::protobuf::uint8* Value::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // .google.protobuf.NullValue null_value = 1;
- if (has_null_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray(
- 1, this->null_value(), target);
- }
-
- // double number_value = 2;
- if (has_number_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(2, this->number_value(), target);
- }
-
- // string string_value = 3;
- if (has_string_value()) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->string_value().data(), static_cast<int>(this->string_value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.Value.string_value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 3, this->string_value(), target);
- }
-
- // bool bool_value = 4;
- if (has_bool_value()) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(4, this->bool_value(), target);
- }
-
- // .google.protobuf.Struct struct_value = 5;
- if (has_struct_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 5, *kind_.struct_value_, deterministic, target);
- }
-
- // .google.protobuf.ListValue list_value = 6;
- if (has_list_value()) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 6, *kind_.list_value_, deterministic, target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Value)
- return target;
-}
-
-size_t Value::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- switch (kind_case()) {
- // .google.protobuf.NullValue null_value = 1;
- case kNullValue: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->null_value());
- break;
- }
- // double number_value = 2;
- case kNumberValue: {
- total_size += 1 + 8;
- break;
- }
- // string string_value = 3;
- case kStringValue: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->string_value());
- break;
- }
- // bool bool_value = 4;
- case kBoolValue: {
- total_size += 1 + 1;
- break;
- }
- // .google.protobuf.Struct struct_value = 5;
- case kStructValue: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *kind_.struct_value_);
- break;
- }
- // .google.protobuf.ListValue list_value = 6;
- case kListValue: {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- *kind_.list_value_);
- break;
- }
- case KIND_NOT_SET: {
- break;
- }
- }
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Value::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Value)
- GOOGLE_DCHECK_NE(&from, this);
- const Value* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Value>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Value)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Value)
- MergeFrom(*source);
- }
-}
-
-void Value::MergeFrom(const Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- switch (from.kind_case()) {
- case kNullValue: {
- set_null_value(from.null_value());
- break;
- }
- case kNumberValue: {
- set_number_value(from.number_value());
- break;
- }
- case kStringValue: {
- set_string_value(from.string_value());
- break;
- }
- case kBoolValue: {
- set_bool_value(from.bool_value());
- break;
- }
- case kStructValue: {
- mutable_struct_value()->::google::protobuf::Struct::MergeFrom(from.struct_value());
- break;
- }
- case kListValue: {
- mutable_list_value()->::google::protobuf::ListValue::MergeFrom(from.list_value());
- break;
- }
- case KIND_NOT_SET: {
- break;
- }
- }
-}
-
-void Value::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Value::CopyFrom(const Value& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Value::IsInitialized() const {
- return true;
-}
-
-void Value::Swap(Value* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Value* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Value::UnsafeArenaSwap(Value* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Value::InternalSwap(Value* other) {
- using std::swap;
- swap(kind_, other->kind_);
- swap(_oneof_case_[0], other->_oneof_case_[0]);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Value::GetMetadata() const {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void ListValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int ListValue::kValuesFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-ListValue::ListValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.ListValue)
-}
-ListValue::ListValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena),
- values_(arena) {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
-}
-ListValue::ListValue(const ListValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- values_(from.values_),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- // @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
-}
-
-void ListValue::SharedCtor() {
- _cached_size_ = 0;
-}
-
-ListValue::~ListValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.ListValue)
- SharedDtor();
-}
-
-void ListValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void ListValue::ArenaDtor(void* object) {
- ListValue* _this = reinterpret_cast< ListValue* >(object);
- (void)_this;
-}
-void ListValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void ListValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* ListValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const ListValue& ListValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValue();
- return *internal_default_instance();
-}
-
-ListValue* ListValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<ListValue>(arena);
-}
-
-void ListValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- values_.Clear();
- _internal_metadata_.Clear();
-}
-
-bool ListValue::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.protobuf.ListValue)
- 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.protobuf.Value values = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(input, add_values()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.ListValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.ListValue)
- return false;
-#undef DO_
-}
-
-void ListValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.ListValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
- ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
- 1, this->values(static_cast<int>(i)), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.ListValue)
-}
-
-::google::protobuf::uint8* ListValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // repeated .google.protobuf.Value values = 1;
- for (unsigned int i = 0,
- n = static_cast<unsigned int>(this->values_size()); i < n; i++) {
- target = ::google::protobuf::internal::WireFormatLite::
- InternalWriteMessageToArray(
- 1, this->values(static_cast<int>(i)), deterministic, target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.ListValue)
- return target;
-}
-
-size_t ListValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // repeated .google.protobuf.Value values = 1;
- {
- unsigned int count = static_cast<unsigned int>(this->values_size());
- total_size += 1UL * count;
- for (unsigned int i = 0; i < count; i++) {
- total_size +=
- ::google::protobuf::internal::WireFormatLite::MessageSize(
- this->values(static_cast<int>(i)));
- }
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void ListValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.ListValue)
- GOOGLE_DCHECK_NE(&from, this);
- const ListValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const ListValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.ListValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.ListValue)
- MergeFrom(*source);
- }
-}
-
-void ListValue::MergeFrom(const ListValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- values_.MergeFrom(from.values_);
-}
-
-void ListValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.ListValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void ListValue::CopyFrom(const ListValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool ListValue::IsInitialized() const {
- return true;
-}
-
-void ListValue::Swap(ListValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- ListValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void ListValue::UnsafeArenaSwap(ListValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void ListValue::InternalSwap(ListValue* other) {
- using std::swap;
- values_.InternalSwap(&other->values_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata ListValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fstruct_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fstruct_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/google/protobuf/struct.pb.h b/Firestore/Protos/cpp/google/protobuf/struct.pb.h
deleted file mode 100644
index 8a6f0d2..0000000
--- a/Firestore/Protos/cpp/google/protobuf/struct.pb.h
+++ /dev/null
@@ -1,1046 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/struct.proto
-
-#ifndef PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3005000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_table_driven.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h> // IWYU pragma: export
-#include <google/protobuf/extension_set.h> // IWYU pragma: export
-#include <google/protobuf/map.h> // IWYU pragma: export
-#include <google/protobuf/map_entry.h>
-#include <google/protobuf/map_field_inl.h>
-#include <google/protobuf/generated_enum_reflection.h>
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace protobuf_google_2fprotobuf_2fstruct_2eproto {
-// Internal implementation detail -- do not use these members.
-struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[4];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors();
-void InitDefaultsListValueImpl();
-void InitDefaultsListValue();
-inline void InitDefaults() {
- InitDefaultsListValue();
-}
-} // namespace protobuf_google_2fprotobuf_2fstruct_2eproto
-namespace google {
-namespace protobuf {
-class ListValue;
-class ListValueDefaultTypeInternal;
-extern ListValueDefaultTypeInternal _ListValue_default_instance_;
-class Struct;
-class StructDefaultTypeInternal;
-extern StructDefaultTypeInternal _Struct_default_instance_;
-class Struct_FieldsEntry_DoNotUse;
-class Struct_FieldsEntry_DoNotUseDefaultTypeInternal;
-extern Struct_FieldsEntry_DoNotUseDefaultTypeInternal _Struct_FieldsEntry_DoNotUse_default_instance_;
-class Value;
-class ValueDefaultTypeInternal;
-extern ValueDefaultTypeInternal _Value_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace google {
-namespace protobuf {
-
-enum NullValue {
- NULL_VALUE = 0,
- NullValue_INT_MIN_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32min,
- NullValue_INT_MAX_SENTINEL_DO_NOT_USE_ = ::google::protobuf::kint32max
-};
-bool NullValue_IsValid(int value);
-const NullValue NullValue_MIN = NULL_VALUE;
-const NullValue NullValue_MAX = NULL_VALUE;
-const int NullValue_ARRAYSIZE = NullValue_MAX + 1;
-
-const ::google::protobuf::EnumDescriptor* NullValue_descriptor();
-inline const ::std::string& NullValue_Name(NullValue value) {
- return ::google::protobuf::internal::NameOfEnum(
- NullValue_descriptor(), value);
-}
-inline bool NullValue_Parse(
- const ::std::string& name, NullValue* value) {
- return ::google::protobuf::internal::ParseNamedEnum<NullValue>(
- NullValue_descriptor(), name, value);
-}
-// ===================================================================
-
-class Struct_FieldsEntry_DoNotUse : public ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
- ::std::string, ::google::protobuf::Value,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0 > {
-public:
- typedef ::google::protobuf::internal::MapEntry<Struct_FieldsEntry_DoNotUse,
- ::std::string, ::google::protobuf::Value,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0 > SuperType;
- Struct_FieldsEntry_DoNotUse();
- Struct_FieldsEntry_DoNotUse(::google::protobuf::Arena* arena);
- void MergeFrom(const Struct_FieldsEntry_DoNotUse& other);
- static const Struct_FieldsEntry_DoNotUse* internal_default_instance() { return reinterpret_cast<const Struct_FieldsEntry_DoNotUse*>(&_Struct_FieldsEntry_DoNotUse_default_instance_); }
- void MergeFrom(const ::google::protobuf::Message& other) PROTOBUF_FINAL;
- ::google::protobuf::Metadata GetMetadata() const;
-};
-
-// -------------------------------------------------------------------
-
-class Struct : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Struct) */ {
- public:
- Struct();
- virtual ~Struct();
-
- Struct(const Struct& from);
-
- inline Struct& operator=(const Struct& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Struct(Struct&& from) noexcept
- : Struct() {
- *this = ::std::move(from);
- }
-
- inline Struct& operator=(Struct&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Struct& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Struct* internal_default_instance() {
- return reinterpret_cast<const Struct*>(
- &_Struct_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 1;
-
- void UnsafeArenaSwap(Struct* other);
- void Swap(Struct* other);
- friend void swap(Struct& a, Struct& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Struct* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Struct* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Struct& from);
- void MergeFrom(const Struct& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Struct* other);
- protected:
- explicit Struct(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
-
- // accessors -------------------------------------------------------
-
- // map<string, .google.protobuf.Value> fields = 1;
- int fields_size() const;
- void clear_fields();
- static const int kFieldsFieldNumber = 1;
- const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
- fields() const;
- ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
- mutable_fields();
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Struct)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::internal::MapField<
- Struct_FieldsEntry_DoNotUse,
- ::std::string, ::google::protobuf::Value,
- ::google::protobuf::internal::WireFormatLite::TYPE_STRING,
- ::google::protobuf::internal::WireFormatLite::TYPE_MESSAGE,
- 0 > fields_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValueImpl();
-};
-// -------------------------------------------------------------------
-
-class Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Value) */ {
- public:
- Value();
- virtual ~Value();
-
- Value(const Value& from);
-
- inline Value& operator=(const Value& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Value(Value&& from) noexcept
- : Value() {
- *this = ::std::move(from);
- }
-
- inline Value& operator=(Value&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Value& default_instance();
-
- enum KindCase {
- kNullValue = 1,
- kNumberValue = 2,
- kStringValue = 3,
- kBoolValue = 4,
- kStructValue = 5,
- kListValue = 6,
- KIND_NOT_SET = 0,
- };
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Value* internal_default_instance() {
- return reinterpret_cast<const Value*>(
- &_Value_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 2;
-
- void UnsafeArenaSwap(Value* other);
- void Swap(Value* other);
- friend void swap(Value& a, Value& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Value* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Value* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Value& from);
- void MergeFrom(const Value& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Value* other);
- protected:
- explicit Value(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // .google.protobuf.NullValue null_value = 1;
- private:
- bool has_null_value() const;
- public:
- void clear_null_value();
- static const int kNullValueFieldNumber = 1;
- ::google::protobuf::NullValue null_value() const;
- void set_null_value(::google::protobuf::NullValue value);
-
- // double number_value = 2;
- private:
- bool has_number_value() const;
- public:
- void clear_number_value();
- static const int kNumberValueFieldNumber = 2;
- double number_value() const;
- void set_number_value(double value);
-
- // string string_value = 3;
- private:
- bool has_string_value() const;
- public:
- void clear_string_value();
- static const int kStringValueFieldNumber = 3;
- const ::std::string& string_value() const;
- void set_string_value(const ::std::string& value);
- #if LANG_CXX11
- void set_string_value(::std::string&& value);
- #endif
- void set_string_value(const char* value);
- void set_string_value(const char* value, size_t size);
- ::std::string* mutable_string_value();
- ::std::string* release_string_value();
- void set_allocated_string_value(::std::string* string_value);
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- ::std::string* unsafe_arena_release_string_value();
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- void unsafe_arena_set_allocated_string_value(
- ::std::string* string_value);
-
- // bool bool_value = 4;
- private:
- bool has_bool_value() const;
- public:
- void clear_bool_value();
- static const int kBoolValueFieldNumber = 4;
- bool bool_value() const;
- void set_bool_value(bool value);
-
- // .google.protobuf.Struct struct_value = 5;
- bool has_struct_value() const;
- void clear_struct_value();
- static const int kStructValueFieldNumber = 5;
- private:
- void _slow_mutable_struct_value();
- public:
- const ::google::protobuf::Struct& struct_value() const;
- ::google::protobuf::Struct* release_struct_value();
- ::google::protobuf::Struct* mutable_struct_value();
- void set_allocated_struct_value(::google::protobuf::Struct* struct_value);
- void unsafe_arena_set_allocated_struct_value(
- ::google::protobuf::Struct* struct_value);
- ::google::protobuf::Struct* unsafe_arena_release_struct_value();
-
- // .google.protobuf.ListValue list_value = 6;
- bool has_list_value() const;
- void clear_list_value();
- static const int kListValueFieldNumber = 6;
- private:
- void _slow_mutable_list_value();
- public:
- const ::google::protobuf::ListValue& list_value() const;
- ::google::protobuf::ListValue* release_list_value();
- ::google::protobuf::ListValue* mutable_list_value();
- void set_allocated_list_value(::google::protobuf::ListValue* list_value);
- void unsafe_arena_set_allocated_list_value(
- ::google::protobuf::ListValue* list_value);
- ::google::protobuf::ListValue* unsafe_arena_release_list_value();
-
- KindCase kind_case() const;
- // @@protoc_insertion_point(class_scope:google.protobuf.Value)
- private:
- void set_has_null_value();
- void set_has_number_value();
- void set_has_string_value();
- void set_has_bool_value();
- void set_has_struct_value();
- void set_has_list_value();
-
- inline bool has_kind() const;
- void clear_kind();
- inline void clear_has_kind();
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- union KindUnion {
- KindUnion() {}
- int null_value_;
- double number_value_;
- ::google::protobuf::internal::ArenaStringPtr string_value_;
- bool bool_value_;
- ::google::protobuf::Struct* struct_value_;
- ::google::protobuf::ListValue* list_value_;
- } kind_;
- mutable int _cached_size_;
- ::google::protobuf::uint32 _oneof_case_[1];
-
- friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValueImpl();
-};
-// -------------------------------------------------------------------
-
-class ListValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.ListValue) */ {
- public:
- ListValue();
- virtual ~ListValue();
-
- ListValue(const ListValue& from);
-
- inline ListValue& operator=(const ListValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- ListValue(ListValue&& from) noexcept
- : ListValue() {
- *this = ::std::move(from);
- }
-
- inline ListValue& operator=(ListValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const ListValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const ListValue* internal_default_instance() {
- return reinterpret_cast<const ListValue*>(
- &_ListValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 3;
-
- void UnsafeArenaSwap(ListValue* other);
- void Swap(ListValue* other);
- friend void swap(ListValue& a, ListValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline ListValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- ListValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const ListValue& from);
- void MergeFrom(const ListValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(ListValue* other);
- protected:
- explicit ListValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // repeated .google.protobuf.Value values = 1;
- int values_size() const;
- void clear_values();
- static const int kValuesFieldNumber = 1;
- const ::google::protobuf::Value& values(int index) const;
- ::google::protobuf::Value* mutable_values(int index);
- ::google::protobuf::Value* add_values();
- ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
- mutable_values();
- const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
- values() const;
-
- // @@protoc_insertion_point(class_scope:google.protobuf.ListValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value > values_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fstruct_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fstruct_2eproto::InitDefaultsListValueImpl();
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// -------------------------------------------------------------------
-
-// Struct
-
-// map<string, .google.protobuf.Value> fields = 1;
-inline int Struct::fields_size() const {
- return fields_.size();
-}
-inline void Struct::clear_fields() {
- fields_.Clear();
-}
-inline const ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >&
-Struct::fields() const {
- // @@protoc_insertion_point(field_map:google.protobuf.Struct.fields)
- return fields_.GetMap();
-}
-inline ::google::protobuf::Map< ::std::string, ::google::protobuf::Value >*
-Struct::mutable_fields() {
- // @@protoc_insertion_point(field_mutable_map:google.protobuf.Struct.fields)
- return fields_.MutableMap();
-}
-
-// -------------------------------------------------------------------
-
-// Value
-
-// .google.protobuf.NullValue null_value = 1;
-inline bool Value::has_null_value() const {
- return kind_case() == kNullValue;
-}
-inline void Value::set_has_null_value() {
- _oneof_case_[0] = kNullValue;
-}
-inline void Value::clear_null_value() {
- if (has_null_value()) {
- kind_.null_value_ = 0;
- clear_has_kind();
- }
-}
-inline ::google::protobuf::NullValue Value::null_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.null_value)
- if (has_null_value()) {
- return static_cast< ::google::protobuf::NullValue >(kind_.null_value_);
- }
- return static_cast< ::google::protobuf::NullValue >(0);
-}
-inline void Value::set_null_value(::google::protobuf::NullValue value) {
- if (!has_null_value()) {
- clear_kind();
- set_has_null_value();
- }
- kind_.null_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.null_value)
-}
-
-// double number_value = 2;
-inline bool Value::has_number_value() const {
- return kind_case() == kNumberValue;
-}
-inline void Value::set_has_number_value() {
- _oneof_case_[0] = kNumberValue;
-}
-inline void Value::clear_number_value() {
- if (has_number_value()) {
- kind_.number_value_ = 0;
- clear_has_kind();
- }
-}
-inline double Value::number_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.number_value)
- if (has_number_value()) {
- return kind_.number_value_;
- }
- return 0;
-}
-inline void Value::set_number_value(double value) {
- if (!has_number_value()) {
- clear_kind();
- set_has_number_value();
- }
- kind_.number_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.number_value)
-}
-
-// string string_value = 3;
-inline bool Value::has_string_value() const {
- return kind_case() == kStringValue;
-}
-inline void Value::set_has_string_value() {
- _oneof_case_[0] = kStringValue;
-}
-inline void Value::clear_string_value() {
- if (has_string_value()) {
- kind_.string_value_.Destroy(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- clear_has_kind();
- }
-}
-inline const ::std::string& Value::string_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.string_value)
- if (has_string_value()) {
- return kind_.string_value_.Get();
- }
- return *&::google::protobuf::internal::GetEmptyStringAlreadyInited();
-}
-inline void Value::set_string_value(const ::std::string& value) {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
-}
-#if LANG_CXX11
-inline void Value::set_string_value(::std::string&& value) {
- // @@protoc_insertion_point(field_set:google.protobuf.Value.string_value)
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Value.string_value)
-}
-#endif
-inline void Value::set_string_value(const char* value) {
- GOOGLE_DCHECK(value != NULL);
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- ::std::string(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_char:google.protobuf.Value.string_value)
-}
-inline void Value::set_string_value(const char* value,
- size_t size) {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- kind_.string_value_.Set(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.Value.string_value)
-}
-inline ::std::string* Value::mutable_string_value() {
- if (!has_string_value()) {
- clear_kind();
- set_has_string_value();
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- return kind_.string_value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.string_value)
-}
-inline ::std::string* Value::release_string_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.string_value)
- if (has_string_value()) {
- clear_has_kind();
- return kind_.string_value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
- } else {
- return NULL;
- }
-}
-inline void Value::set_allocated_string_value(::std::string* string_value) {
- if (!has_string_value()) {
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_kind();
- if (string_value != NULL) {
- set_has_string_value();
- kind_.string_value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value,
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.string_value)
-}
-inline ::std::string* Value::unsafe_arena_release_string_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.string_value)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (has_string_value()) {
- clear_has_kind();
- return kind_.string_value_.UnsafeArenaRelease(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- } else {
- return NULL;
- }
-}
-inline void Value::unsafe_arena_set_allocated_string_value(::std::string* string_value) {
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (!has_string_value()) {
- kind_.string_value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- }
- clear_kind();
- if (string_value) {
- set_has_string_value();
- kind_.string_value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), string_value, GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.string_value)
-}
-
-// bool bool_value = 4;
-inline bool Value::has_bool_value() const {
- return kind_case() == kBoolValue;
-}
-inline void Value::set_has_bool_value() {
- _oneof_case_[0] = kBoolValue;
-}
-inline void Value::clear_bool_value() {
- if (has_bool_value()) {
- kind_.bool_value_ = false;
- clear_has_kind();
- }
-}
-inline bool Value::bool_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.bool_value)
- if (has_bool_value()) {
- return kind_.bool_value_;
- }
- return false;
-}
-inline void Value::set_bool_value(bool value) {
- if (!has_bool_value()) {
- clear_kind();
- set_has_bool_value();
- }
- kind_.bool_value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Value.bool_value)
-}
-
-// .google.protobuf.Struct struct_value = 5;
-inline bool Value::has_struct_value() const {
- return kind_case() == kStructValue;
-}
-inline void Value::set_has_struct_value() {
- _oneof_case_[0] = kStructValue;
-}
-inline void Value::clear_struct_value() {
- if (has_struct_value()) {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.struct_value_;
- }
- clear_has_kind();
- }
-}
-inline ::google::protobuf::Struct* Value::release_struct_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.struct_value)
- if (has_struct_value()) {
- clear_has_kind();
- ::google::protobuf::Struct* temp = kind_.struct_value_;
- if (GetArenaNoVirtual() != NULL) {
- temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL);
- }
- kind_.struct_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline const ::google::protobuf::Struct& Value::struct_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.struct_value)
- return has_struct_value()
- ? *kind_.struct_value_
- : *reinterpret_cast< ::google::protobuf::Struct*>(&::google::protobuf::_Struct_default_instance_);
-}
-inline ::google::protobuf::Struct* Value::unsafe_arena_release_struct_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.struct_value)
- if (has_struct_value()) {
- clear_has_kind();
- ::google::protobuf::Struct* temp = kind_.struct_value_;
- kind_.struct_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void Value::unsafe_arena_set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
- clear_kind();
- if (struct_value) {
- set_has_struct_value();
- kind_.struct_value_ = struct_value;
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.struct_value)
-}
-inline ::google::protobuf::Struct* Value::mutable_struct_value() {
- if (!has_struct_value()) {
- clear_kind();
- set_has_struct_value();
- kind_.struct_value_ =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::Struct >(
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.struct_value)
- return kind_.struct_value_;
-}
-
-// .google.protobuf.ListValue list_value = 6;
-inline bool Value::has_list_value() const {
- return kind_case() == kListValue;
-}
-inline void Value::set_has_list_value() {
- _oneof_case_[0] = kListValue;
-}
-inline void Value::clear_list_value() {
- if (has_list_value()) {
- if (GetArenaNoVirtual() == NULL) {
- delete kind_.list_value_;
- }
- clear_has_kind();
- }
-}
-inline ::google::protobuf::ListValue* Value::release_list_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.Value.list_value)
- if (has_list_value()) {
- clear_has_kind();
- ::google::protobuf::ListValue* temp = kind_.list_value_;
- if (GetArenaNoVirtual() != NULL) {
- temp = ::google::protobuf::internal::DuplicateIfNonNull(temp, NULL);
- }
- kind_.list_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline const ::google::protobuf::ListValue& Value::list_value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Value.list_value)
- return has_list_value()
- ? *kind_.list_value_
- : *reinterpret_cast< ::google::protobuf::ListValue*>(&::google::protobuf::_ListValue_default_instance_);
-}
-inline ::google::protobuf::ListValue* Value::unsafe_arena_release_list_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Value.list_value)
- if (has_list_value()) {
- clear_has_kind();
- ::google::protobuf::ListValue* temp = kind_.list_value_;
- kind_.list_value_ = NULL;
- return temp;
- } else {
- return NULL;
- }
-}
-inline void Value::unsafe_arena_set_allocated_list_value(::google::protobuf::ListValue* list_value) {
- clear_kind();
- if (list_value) {
- set_has_list_value();
- kind_.list_value_ = list_value;
- }
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Value.list_value)
-}
-inline ::google::protobuf::ListValue* Value::mutable_list_value() {
- if (!has_list_value()) {
- clear_kind();
- set_has_list_value();
- kind_.list_value_ =
- ::google::protobuf::Arena::CreateMessage< ::google::protobuf::ListValue >(
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(field_mutable:google.protobuf.Value.list_value)
- return kind_.list_value_;
-}
-
-inline bool Value::has_kind() const {
- return kind_case() != KIND_NOT_SET;
-}
-inline void Value::clear_has_kind() {
- _oneof_case_[0] = KIND_NOT_SET;
-}
-inline Value::KindCase Value::kind_case() const {
- return Value::KindCase(_oneof_case_[0]);
-}
-// -------------------------------------------------------------------
-
-// ListValue
-
-// repeated .google.protobuf.Value values = 1;
-inline int ListValue::values_size() const {
- return values_.size();
-}
-inline void ListValue::clear_values() {
- values_.Clear();
-}
-inline const ::google::protobuf::Value& ListValue::values(int index) const {
- // @@protoc_insertion_point(field_get:google.protobuf.ListValue.values)
- return values_.Get(index);
-}
-inline ::google::protobuf::Value* ListValue::mutable_values(int index) {
- // @@protoc_insertion_point(field_mutable:google.protobuf.ListValue.values)
- return values_.Mutable(index);
-}
-inline ::google::protobuf::Value* ListValue::add_values() {
- // @@protoc_insertion_point(field_add:google.protobuf.ListValue.values)
- return values_.Add();
-}
-inline ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >*
-ListValue::mutable_values() {
- // @@protoc_insertion_point(field_mutable_list:google.protobuf.ListValue.values)
- return &values_;
-}
-inline const ::google::protobuf::RepeatedPtrField< ::google::protobuf::Value >&
-ListValue::values() const {
- // @@protoc_insertion_point(field_list:google.protobuf.ListValue.values)
- return values_;
-}
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace protobuf
-} // namespace google
-
-namespace google {
-namespace protobuf {
-
-template <> struct is_proto_enum< ::google::protobuf::NullValue> : ::google::protobuf::internal::true_type {};
-template <>
-inline const EnumDescriptor* GetEnumDescriptor< ::google::protobuf::NullValue>() {
- return ::google::protobuf::NullValue_descriptor();
-}
-
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_google_2fprotobuf_2fstruct_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/google/protobuf/timestamp.pb.cc b/Firestore/Protos/cpp/google/protobuf/timestamp.pb.cc
deleted file mode 100644
index 7f0ea38..0000000
--- a/Firestore/Protos/cpp/google/protobuf/timestamp.pb.cc
+++ /dev/null
@@ -1,447 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/timestamp.proto
-
-#include <google/protobuf/timestamp.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
-// @@protoc_insertion_point(includes)
-namespace google {
-namespace protobuf {
-class TimestampDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Timestamp>
- _instance;
-} _Timestamp_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
-void InitDefaultsTimestampImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Timestamp_default_instance_;
- new (ptr) ::google::protobuf::Timestamp();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Timestamp::InitAsDefaultInstance();
-}
-
-void InitDefaultsTimestamp() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsTimestampImpl);
-}
-
-::google::protobuf::Metadata file_level_metadata[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::protobuf::Timestamp, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Timestamp, seconds_),
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Timestamp, nanos_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::Timestamp)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Timestamp_default_instance_),
-};
-
-void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/timestamp.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 1);
-}
-
-void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\037google/protobuf/timestamp.proto\022\017googl"
- "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
- "\022\r\n\005nanos\030\002 \001(\005B~\n\023com.google.protobufB\016"
- "TimestampProtoP\001Z+github.com/golang/prot"
- "obuf/ptypes/timestamp\370\001\001\242\002\003GPB\252\002\036Google."
- "Protobuf.WellKnownTypesb\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 231);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/timestamp.proto", &protobuf_RegisterTypes);
-}
-
-void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
-}
-// Force AddDescriptors() to be called at dynamic initialization time.
-struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
-} static_descriptor_initializer;
-} // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-void Timestamp::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Timestamp::kSecondsFieldNumber;
-const int Timestamp::kNanosFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Timestamp::Timestamp()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Timestamp)
-}
-Timestamp::Timestamp(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp)
-}
-Timestamp::Timestamp(const Timestamp& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::memcpy(&seconds_, &from.seconds_,
- static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp)
-}
-
-void Timestamp::SharedCtor() {
- ::memset(&seconds_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
- _cached_size_ = 0;
-}
-
-Timestamp::~Timestamp() {
- // @@protoc_insertion_point(destructor:google.protobuf.Timestamp)
- SharedDtor();
-}
-
-void Timestamp::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void Timestamp::ArenaDtor(void* object) {
- Timestamp* _this = reinterpret_cast< Timestamp* >(object);
- (void)_this;
-}
-void Timestamp::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Timestamp::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Timestamp::descriptor() {
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Timestamp& Timestamp::default_instance() {
- ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestamp();
- return *internal_default_instance();
-}
-
-Timestamp* Timestamp::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Timestamp>(arena);
-}
-
-void Timestamp::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- ::memset(&seconds_, 0, static_cast<size_t>(
- reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
- _internal_metadata_.Clear();
-}
-
-bool Timestamp::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.protobuf.Timestamp)
- 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)) {
- // int64 seconds = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &seconds_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- // int32 nanos = 2;
- case 2: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(16u /* 16 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &nanos_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Timestamp)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Timestamp)
- return false;
-#undef DO_
-}
-
-void Timestamp::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Timestamp)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 seconds = 1;
- if (this->seconds() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->seconds(), output);
- }
-
- // int32 nanos = 2;
- if (this->nanos() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->nanos(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Timestamp)
-}
-
-::google::protobuf::uint8* Timestamp::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 seconds = 1;
- if (this->seconds() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->seconds(), target);
- }
-
- // int32 nanos = 2;
- if (this->nanos() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->nanos(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Timestamp)
- return target;
-}
-
-size_t Timestamp::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // int64 seconds = 1;
- if (this->seconds() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->seconds());
- }
-
- // int32 nanos = 2;
- if (this->nanos() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->nanos());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Timestamp::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Timestamp)
- GOOGLE_DCHECK_NE(&from, this);
- const Timestamp* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Timestamp>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Timestamp)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Timestamp)
- MergeFrom(*source);
- }
-}
-
-void Timestamp::MergeFrom(const Timestamp& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.seconds() != 0) {
- set_seconds(from.seconds());
- }
- if (from.nanos() != 0) {
- set_nanos(from.nanos());
- }
-}
-
-void Timestamp::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Timestamp)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Timestamp::CopyFrom(const Timestamp& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Timestamp)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Timestamp::IsInitialized() const {
- return true;
-}
-
-void Timestamp::Swap(Timestamp* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Timestamp* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Timestamp::UnsafeArenaSwap(Timestamp* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Timestamp::InternalSwap(Timestamp* other) {
- using std::swap;
- swap(seconds_, other->seconds_);
- swap(nanos_, other->nanos_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Timestamp::GetMetadata() const {
- protobuf_google_2fprotobuf_2ftimestamp_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/google/protobuf/timestamp.pb.h b/Firestore/Protos/cpp/google/protobuf/timestamp.pb.h
deleted file mode 100644
index 0047b39..0000000
--- a/Firestore/Protos/cpp/google/protobuf/timestamp.pb.h
+++ /dev/null
@@ -1,248 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/timestamp.proto
-
-#ifndef PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3005000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_table_driven.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h> // IWYU pragma: export
-#include <google/protobuf/extension_set.h> // IWYU pragma: export
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto {
-// Internal implementation detail -- do not use these members.
-struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[1];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors();
-void InitDefaultsTimestampImpl();
-void InitDefaultsTimestamp();
-inline void InitDefaults() {
- InitDefaultsTimestamp();
-}
-} // namespace protobuf_google_2fprotobuf_2ftimestamp_2eproto
-namespace google {
-namespace protobuf {
-class Timestamp;
-class TimestampDefaultTypeInternal;
-extern TimestampDefaultTypeInternal _Timestamp_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-class Timestamp : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ {
- public:
- Timestamp();
- virtual ~Timestamp();
-
- Timestamp(const Timestamp& from);
-
- inline Timestamp& operator=(const Timestamp& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Timestamp(Timestamp&& from) noexcept
- : Timestamp() {
- *this = ::std::move(from);
- }
-
- inline Timestamp& operator=(Timestamp&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Timestamp& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Timestamp* internal_default_instance() {
- return reinterpret_cast<const Timestamp*>(
- &_Timestamp_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 0;
-
- void UnsafeArenaSwap(Timestamp* other);
- void Swap(Timestamp* other);
- friend void swap(Timestamp& a, Timestamp& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Timestamp* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Timestamp* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Timestamp& from);
- void MergeFrom(const Timestamp& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Timestamp* other);
- protected:
- explicit Timestamp(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // int64 seconds = 1;
- void clear_seconds();
- static const int kSecondsFieldNumber = 1;
- ::google::protobuf::int64 seconds() const;
- void set_seconds(::google::protobuf::int64 value);
-
- // int32 nanos = 2;
- void clear_nanos();
- static const int kNanosFieldNumber = 2;
- ::google::protobuf::int32 nanos() const;
- void set_nanos(::google::protobuf::int32 value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::int64 seconds_;
- ::google::protobuf::int32 nanos_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2ftimestamp_2eproto::InitDefaultsTimestampImpl();
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// Timestamp
-
-// int64 seconds = 1;
-inline void Timestamp::clear_seconds() {
- seconds_ = GOOGLE_LONGLONG(0);
-}
-inline ::google::protobuf::int64 Timestamp::seconds() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds)
- return seconds_;
-}
-inline void Timestamp::set_seconds(::google::protobuf::int64 value) {
-
- seconds_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds)
-}
-
-// int32 nanos = 2;
-inline void Timestamp::clear_nanos() {
- nanos_ = 0;
-}
-inline ::google::protobuf::int32 Timestamp::nanos() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos)
- return nanos_;
-}
-inline void Timestamp::set_nanos(::google::protobuf::int32 value) {
-
- nanos_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
-}
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_google_2fprotobuf_2ftimestamp_2eproto__INCLUDED
diff --git a/Firestore/Protos/cpp/google/protobuf/wrappers.pb.cc b/Firestore/Protos/cpp/google/protobuf/wrappers.pb.cc
deleted file mode 100644
index b44c5c2..0000000
--- a/Firestore/Protos/cpp/google/protobuf/wrappers.pb.cc
+++ /dev/null
@@ -1,2812 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/wrappers.proto
-
-#include <google/protobuf/wrappers.pb.h>
-
-#include <algorithm>
-
-#include <google/protobuf/stubs/common.h>
-#include <google/protobuf/stubs/port.h>
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-#include <google/protobuf/descriptor.h>
-#include <google/protobuf/generated_message_reflection.h>
-#include <google/protobuf/reflection_ops.h>
-#include <google/protobuf/wire_format.h>
-// This is a temporary google only hack
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
-#include "third_party/protobuf/version.h"
-#endif
-// @@protoc_insertion_point(includes)
-namespace google {
-namespace protobuf {
-class DoubleValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<DoubleValue>
- _instance;
-} _DoubleValue_default_instance_;
-class FloatValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<FloatValue>
- _instance;
-} _FloatValue_default_instance_;
-class Int64ValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Int64Value>
- _instance;
-} _Int64Value_default_instance_;
-class UInt64ValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<UInt64Value>
- _instance;
-} _UInt64Value_default_instance_;
-class Int32ValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<Int32Value>
- _instance;
-} _Int32Value_default_instance_;
-class UInt32ValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<UInt32Value>
- _instance;
-} _UInt32Value_default_instance_;
-class BoolValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<BoolValue>
- _instance;
-} _BoolValue_default_instance_;
-class StringValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<StringValue>
- _instance;
-} _StringValue_default_instance_;
-class BytesValueDefaultTypeInternal {
- public:
- ::google::protobuf::internal::ExplicitlyConstructed<BytesValue>
- _instance;
-} _BytesValue_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
-void InitDefaultsDoubleValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_DoubleValue_default_instance_;
- new (ptr) ::google::protobuf::DoubleValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::DoubleValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsDoubleValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsDoubleValueImpl);
-}
-
-void InitDefaultsFloatValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_FloatValue_default_instance_;
- new (ptr) ::google::protobuf::FloatValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::FloatValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsFloatValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsFloatValueImpl);
-}
-
-void InitDefaultsInt64ValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Int64Value_default_instance_;
- new (ptr) ::google::protobuf::Int64Value();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Int64Value::InitAsDefaultInstance();
-}
-
-void InitDefaultsInt64Value() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsInt64ValueImpl);
-}
-
-void InitDefaultsUInt64ValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_UInt64Value_default_instance_;
- new (ptr) ::google::protobuf::UInt64Value();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::UInt64Value::InitAsDefaultInstance();
-}
-
-void InitDefaultsUInt64Value() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUInt64ValueImpl);
-}
-
-void InitDefaultsInt32ValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_Int32Value_default_instance_;
- new (ptr) ::google::protobuf::Int32Value();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::Int32Value::InitAsDefaultInstance();
-}
-
-void InitDefaultsInt32Value() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsInt32ValueImpl);
-}
-
-void InitDefaultsUInt32ValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_UInt32Value_default_instance_;
- new (ptr) ::google::protobuf::UInt32Value();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::UInt32Value::InitAsDefaultInstance();
-}
-
-void InitDefaultsUInt32Value() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsUInt32ValueImpl);
-}
-
-void InitDefaultsBoolValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_BoolValue_default_instance_;
- new (ptr) ::google::protobuf::BoolValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::BoolValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsBoolValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBoolValueImpl);
-}
-
-void InitDefaultsStringValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_StringValue_default_instance_;
- new (ptr) ::google::protobuf::StringValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::StringValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsStringValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsStringValueImpl);
-}
-
-void InitDefaultsBytesValueImpl() {
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- ::google::protobuf::internal::InitProtobufDefaultsForceUnique();
-#else
- ::google::protobuf::internal::InitProtobufDefaults();
-#endif // GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
- {
- void* ptr = &::google::protobuf::_BytesValue_default_instance_;
- new (ptr) ::google::protobuf::BytesValue();
- ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
- }
- ::google::protobuf::BytesValue::InitAsDefaultInstance();
-}
-
-void InitDefaultsBytesValue() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &InitDefaultsBytesValueImpl);
-}
-
-::google::protobuf::Metadata file_level_metadata[9];
-
-const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::DoubleValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::DoubleValue, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::FloatValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::FloatValue, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Int64Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Int64Value, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::UInt64Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::UInt64Value, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Int32Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::Int32Value, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::UInt32Value, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::UInt32Value, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::BoolValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::BoolValue, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::StringValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::StringValue, value_),
- ~0u, // no _has_bits_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::BytesValue, _internal_metadata_),
- ~0u, // no _extensions_
- ~0u, // no _oneof_case_
- ~0u, // no _weak_field_map_
- GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::google::protobuf::BytesValue, value_),
-};
-static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- { 0, -1, sizeof(::google::protobuf::DoubleValue)},
- { 6, -1, sizeof(::google::protobuf::FloatValue)},
- { 12, -1, sizeof(::google::protobuf::Int64Value)},
- { 18, -1, sizeof(::google::protobuf::UInt64Value)},
- { 24, -1, sizeof(::google::protobuf::Int32Value)},
- { 30, -1, sizeof(::google::protobuf::UInt32Value)},
- { 36, -1, sizeof(::google::protobuf::BoolValue)},
- { 42, -1, sizeof(::google::protobuf::StringValue)},
- { 48, -1, sizeof(::google::protobuf::BytesValue)},
-};
-
-static ::google::protobuf::Message const * const file_default_instances[] = {
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_DoubleValue_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_FloatValue_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Int64Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_UInt64Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_Int32Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_UInt32Value_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_BoolValue_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_StringValue_default_instance_),
- reinterpret_cast<const ::google::protobuf::Message*>(&::google::protobuf::_BytesValue_default_instance_),
-};
-
-void protobuf_AssignDescriptors() {
- AddDescriptors();
- ::google::protobuf::MessageFactory* factory = NULL;
- AssignDescriptors(
- "google/protobuf/wrappers.proto", schemas, file_default_instances, TableStruct::offsets, factory,
- file_level_metadata, NULL, NULL);
-}
-
-void protobuf_AssignDescriptorsOnce() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &protobuf_AssignDescriptors);
-}
-
-void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
-void protobuf_RegisterTypes(const ::std::string&) {
- protobuf_AssignDescriptorsOnce();
- ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 9);
-}
-
-void AddDescriptorsImpl() {
- InitDefaults();
- static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
- "\n\036google/protobuf/wrappers.proto\022\017google"
- ".protobuf\"\034\n\013DoubleValue\022\r\n\005value\030\001 \001(\001\""
- "\033\n\nFloatValue\022\r\n\005value\030\001 \001(\002\"\033\n\nInt64Val"
- "ue\022\r\n\005value\030\001 \001(\003\"\034\n\013UInt64Value\022\r\n\005valu"
- "e\030\001 \001(\004\"\033\n\nInt32Value\022\r\n\005value\030\001 \001(\005\"\034\n\013"
- "UInt32Value\022\r\n\005value\030\001 \001(\r\"\032\n\tBoolValue\022"
- "\r\n\005value\030\001 \001(\010\"\034\n\013StringValue\022\r\n\005value\030\001"
- " \001(\t\"\033\n\nBytesValue\022\r\n\005value\030\001 \001(\014B|\n\023com"
- ".google.protobufB\rWrappersProtoP\001Z*githu"
- "b.com/golang/protobuf/ptypes/wrappers\370\001\001"
- "\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTypesb"
- "\006proto3"
- };
- ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
- descriptor, 447);
- ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
- "google/protobuf/wrappers.proto", &protobuf_RegisterTypes);
-}
-
-void AddDescriptors() {
- static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
- ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
-}
-// Force AddDescriptors() to be called at dynamic initialization time.
-struct StaticDescriptorInitializer {
- StaticDescriptorInitializer() {
- AddDescriptors();
- }
-} static_descriptor_initializer;
-} // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-void DoubleValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int DoubleValue::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-DoubleValue::DoubleValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsDoubleValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.DoubleValue)
-}
-DoubleValue::DoubleValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsDoubleValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.DoubleValue)
-}
-DoubleValue::DoubleValue(const DoubleValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.DoubleValue)
-}
-
-void DoubleValue::SharedCtor() {
- value_ = 0;
- _cached_size_ = 0;
-}
-
-DoubleValue::~DoubleValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.DoubleValue)
- SharedDtor();
-}
-
-void DoubleValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void DoubleValue::ArenaDtor(void* object) {
- DoubleValue* _this = reinterpret_cast< DoubleValue* >(object);
- (void)_this;
-}
-void DoubleValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void DoubleValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* DoubleValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const DoubleValue& DoubleValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsDoubleValue();
- return *internal_default_instance();
-}
-
-DoubleValue* DoubleValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<DoubleValue>(arena);
-}
-
-void DoubleValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.DoubleValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = 0;
- _internal_metadata_.Clear();
-}
-
-bool DoubleValue::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.protobuf.DoubleValue)
- 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)) {
- // double value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(9u /* 9 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.DoubleValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.DoubleValue)
- return false;
-#undef DO_
-}
-
-void DoubleValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.DoubleValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // double value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteDouble(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.DoubleValue)
-}
-
-::google::protobuf::uint8* DoubleValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.DoubleValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // double value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.DoubleValue)
- return target;
-}
-
-size_t DoubleValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.DoubleValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // double value = 1;
- if (this->value() != 0) {
- total_size += 1 + 8;
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void DoubleValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.DoubleValue)
- GOOGLE_DCHECK_NE(&from, this);
- const DoubleValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const DoubleValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.DoubleValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.DoubleValue)
- MergeFrom(*source);
- }
-}
-
-void DoubleValue::MergeFrom(const DoubleValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.DoubleValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void DoubleValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.DoubleValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void DoubleValue::CopyFrom(const DoubleValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.DoubleValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool DoubleValue::IsInitialized() const {
- return true;
-}
-
-void DoubleValue::Swap(DoubleValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- DoubleValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void DoubleValue::UnsafeArenaSwap(DoubleValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void DoubleValue::InternalSwap(DoubleValue* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata DoubleValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void FloatValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int FloatValue::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-FloatValue::FloatValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsFloatValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.FloatValue)
-}
-FloatValue::FloatValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsFloatValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.FloatValue)
-}
-FloatValue::FloatValue(const FloatValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.FloatValue)
-}
-
-void FloatValue::SharedCtor() {
- value_ = 0;
- _cached_size_ = 0;
-}
-
-FloatValue::~FloatValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.FloatValue)
- SharedDtor();
-}
-
-void FloatValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void FloatValue::ArenaDtor(void* object) {
- FloatValue* _this = reinterpret_cast< FloatValue* >(object);
- (void)_this;
-}
-void FloatValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void FloatValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* FloatValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const FloatValue& FloatValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsFloatValue();
- return *internal_default_instance();
-}
-
-FloatValue* FloatValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<FloatValue>(arena);
-}
-
-void FloatValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.FloatValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = 0;
- _internal_metadata_.Clear();
-}
-
-bool FloatValue::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.protobuf.FloatValue)
- 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)) {
- // float value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.FloatValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.FloatValue)
- return false;
-#undef DO_
-}
-
-void FloatValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.FloatValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // float value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.FloatValue)
-}
-
-::google::protobuf::uint8* FloatValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FloatValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // float value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.FloatValue)
- return target;
-}
-
-size_t FloatValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.FloatValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // float value = 1;
- if (this->value() != 0) {
- total_size += 1 + 4;
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void FloatValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FloatValue)
- GOOGLE_DCHECK_NE(&from, this);
- const FloatValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const FloatValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FloatValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FloatValue)
- MergeFrom(*source);
- }
-}
-
-void FloatValue::MergeFrom(const FloatValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FloatValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void FloatValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FloatValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void FloatValue::CopyFrom(const FloatValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FloatValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool FloatValue::IsInitialized() const {
- return true;
-}
-
-void FloatValue::Swap(FloatValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- FloatValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void FloatValue::UnsafeArenaSwap(FloatValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void FloatValue::InternalSwap(FloatValue* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata FloatValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void Int64Value::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Int64Value::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Int64Value::Int64Value()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt64Value();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Int64Value)
-}
-Int64Value::Int64Value(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt64Value();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Int64Value)
-}
-Int64Value::Int64Value(const Int64Value& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Int64Value)
-}
-
-void Int64Value::SharedCtor() {
- value_ = GOOGLE_LONGLONG(0);
- _cached_size_ = 0;
-}
-
-Int64Value::~Int64Value() {
- // @@protoc_insertion_point(destructor:google.protobuf.Int64Value)
- SharedDtor();
-}
-
-void Int64Value::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void Int64Value::ArenaDtor(void* object) {
- Int64Value* _this = reinterpret_cast< Int64Value* >(object);
- (void)_this;
-}
-void Int64Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Int64Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Int64Value::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Int64Value& Int64Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt64Value();
- return *internal_default_instance();
-}
-
-Int64Value* Int64Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Int64Value>(arena);
-}
-
-void Int64Value::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Int64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = GOOGLE_LONGLONG(0);
- _internal_metadata_.Clear();
-}
-
-bool Int64Value::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.protobuf.Int64Value)
- 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)) {
- // int64 value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Int64Value)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Int64Value)
- return false;
-#undef DO_
-}
-
-void Int64Value::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Int64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Int64Value)
-}
-
-::google::protobuf::uint8* Int64Value::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int64 value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Int64Value)
- return target;
-}
-
-size_t Int64Value::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int64Value)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // int64 value = 1;
- if (this->value() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int64Size(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Int64Value::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Int64Value)
- GOOGLE_DCHECK_NE(&from, this);
- const Int64Value* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Int64Value>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Int64Value)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Int64Value)
- MergeFrom(*source);
- }
-}
-
-void Int64Value::MergeFrom(const Int64Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int64Value)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void Int64Value::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Int64Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Int64Value::CopyFrom(const Int64Value& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Int64Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Int64Value::IsInitialized() const {
- return true;
-}
-
-void Int64Value::Swap(Int64Value* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Int64Value* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Int64Value::UnsafeArenaSwap(Int64Value* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Int64Value::InternalSwap(Int64Value* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Int64Value::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void UInt64Value::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int UInt64Value::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-UInt64Value::UInt64Value()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt64Value();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.UInt64Value)
-}
-UInt64Value::UInt64Value(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt64Value();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt64Value)
-}
-UInt64Value::UInt64Value(const UInt64Value& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt64Value)
-}
-
-void UInt64Value::SharedCtor() {
- value_ = GOOGLE_ULONGLONG(0);
- _cached_size_ = 0;
-}
-
-UInt64Value::~UInt64Value() {
- // @@protoc_insertion_point(destructor:google.protobuf.UInt64Value)
- SharedDtor();
-}
-
-void UInt64Value::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void UInt64Value::ArenaDtor(void* object) {
- UInt64Value* _this = reinterpret_cast< UInt64Value* >(object);
- (void)_this;
-}
-void UInt64Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void UInt64Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* UInt64Value::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const UInt64Value& UInt64Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt64Value();
- return *internal_default_instance();
-}
-
-UInt64Value* UInt64Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<UInt64Value>(arena);
-}
-
-void UInt64Value::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = GOOGLE_ULONGLONG(0);
- _internal_metadata_.Clear();
-}
-
-bool UInt64Value::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.protobuf.UInt64Value)
- 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)) {
- // uint64 value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.UInt64Value)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.UInt64Value)
- return false;
-#undef DO_
-}
-
-void UInt64Value::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.UInt64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint64 value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt64(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.UInt64Value)
-}
-
-::google::protobuf::uint8* UInt64Value::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt64Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint64 value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt64ToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.UInt64Value)
- return target;
-}
-
-size_t UInt64Value::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt64Value)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // uint64 value = 1;
- if (this->value() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt64Size(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void UInt64Value::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.UInt64Value)
- GOOGLE_DCHECK_NE(&from, this);
- const UInt64Value* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const UInt64Value>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UInt64Value)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.UInt64Value)
- MergeFrom(*source);
- }
-}
-
-void UInt64Value::MergeFrom(const UInt64Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt64Value)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void UInt64Value::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.UInt64Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void UInt64Value::CopyFrom(const UInt64Value& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UInt64Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool UInt64Value::IsInitialized() const {
- return true;
-}
-
-void UInt64Value::Swap(UInt64Value* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- UInt64Value* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void UInt64Value::UnsafeArenaSwap(UInt64Value* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void UInt64Value::InternalSwap(UInt64Value* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata UInt64Value::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void Int32Value::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int Int32Value::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-Int32Value::Int32Value()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32Value();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.Int32Value)
-}
-Int32Value::Int32Value(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32Value();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.Int32Value)
-}
-Int32Value::Int32Value(const Int32Value& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.Int32Value)
-}
-
-void Int32Value::SharedCtor() {
- value_ = 0;
- _cached_size_ = 0;
-}
-
-Int32Value::~Int32Value() {
- // @@protoc_insertion_point(destructor:google.protobuf.Int32Value)
- SharedDtor();
-}
-
-void Int32Value::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void Int32Value::ArenaDtor(void* object) {
- Int32Value* _this = reinterpret_cast< Int32Value* >(object);
- (void)_this;
-}
-void Int32Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void Int32Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* Int32Value::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const Int32Value& Int32Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32Value();
- return *internal_default_instance();
-}
-
-Int32Value* Int32Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<Int32Value>(arena);
-}
-
-void Int32Value::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.Int32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = 0;
- _internal_metadata_.Clear();
-}
-
-bool Int32Value::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.protobuf.Int32Value)
- 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)) {
- // int32 value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.Int32Value)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.Int32Value)
- return false;
-#undef DO_
-}
-
-void Int32Value::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.Int32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int32 value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.Int32Value)
-}
-
-::google::protobuf::uint8* Int32Value::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Int32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // int32 value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.Int32Value)
- return target;
-}
-
-size_t Int32Value::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Int32Value)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // int32 value = 1;
- if (this->value() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Int32Value::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.Int32Value)
- GOOGLE_DCHECK_NE(&from, this);
- const Int32Value* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const Int32Value>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.Int32Value)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.Int32Value)
- MergeFrom(*source);
- }
-}
-
-void Int32Value::MergeFrom(const Int32Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Int32Value)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void Int32Value::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.Int32Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void Int32Value::CopyFrom(const Int32Value& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Int32Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Int32Value::IsInitialized() const {
- return true;
-}
-
-void Int32Value::Swap(Int32Value* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- Int32Value* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void Int32Value::UnsafeArenaSwap(Int32Value* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void Int32Value::InternalSwap(Int32Value* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata Int32Value::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void UInt32Value::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int UInt32Value::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-UInt32Value::UInt32Value()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt32Value();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.UInt32Value)
-}
-UInt32Value::UInt32Value(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt32Value();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.UInt32Value)
-}
-UInt32Value::UInt32Value(const UInt32Value& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.UInt32Value)
-}
-
-void UInt32Value::SharedCtor() {
- value_ = 0u;
- _cached_size_ = 0;
-}
-
-UInt32Value::~UInt32Value() {
- // @@protoc_insertion_point(destructor:google.protobuf.UInt32Value)
- SharedDtor();
-}
-
-void UInt32Value::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void UInt32Value::ArenaDtor(void* object) {
- UInt32Value* _this = reinterpret_cast< UInt32Value* >(object);
- (void)_this;
-}
-void UInt32Value::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void UInt32Value::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* UInt32Value::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const UInt32Value& UInt32Value::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt32Value();
- return *internal_default_instance();
-}
-
-UInt32Value* UInt32Value::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<UInt32Value>(arena);
-}
-
-void UInt32Value::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.UInt32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = 0u;
- _internal_metadata_.Clear();
-}
-
-bool UInt32Value::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.protobuf.UInt32Value)
- 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)) {
- // uint32 value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::uint32, ::google::protobuf::internal::WireFormatLite::TYPE_UINT32>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.UInt32Value)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.UInt32Value)
- return false;
-#undef DO_
-}
-
-void UInt32Value::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.UInt32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint32 value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteUInt32(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.UInt32Value)
-}
-
-::google::protobuf::uint8* UInt32Value::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UInt32Value)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // uint32 value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteUInt32ToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.UInt32Value)
- return target;
-}
-
-size_t UInt32Value::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.UInt32Value)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // uint32 value = 1;
- if (this->value() != 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::UInt32Size(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void UInt32Value::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.UInt32Value)
- GOOGLE_DCHECK_NE(&from, this);
- const UInt32Value* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const UInt32Value>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.UInt32Value)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.UInt32Value)
- MergeFrom(*source);
- }
-}
-
-void UInt32Value::MergeFrom(const UInt32Value& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.UInt32Value)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void UInt32Value::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.UInt32Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void UInt32Value::CopyFrom(const UInt32Value& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.UInt32Value)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool UInt32Value::IsInitialized() const {
- return true;
-}
-
-void UInt32Value::Swap(UInt32Value* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- UInt32Value* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void UInt32Value::UnsafeArenaSwap(UInt32Value* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void UInt32Value::InternalSwap(UInt32Value* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata UInt32Value::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void BoolValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int BoolValue::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-BoolValue::BoolValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBoolValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.BoolValue)
-}
-BoolValue::BoolValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBoolValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.BoolValue)
-}
-BoolValue::BoolValue(const BoolValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_ = from.value_;
- // @@protoc_insertion_point(copy_constructor:google.protobuf.BoolValue)
-}
-
-void BoolValue::SharedCtor() {
- value_ = false;
- _cached_size_ = 0;
-}
-
-BoolValue::~BoolValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.BoolValue)
- SharedDtor();
-}
-
-void BoolValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
-}
-
-void BoolValue::ArenaDtor(void* object) {
- BoolValue* _this = reinterpret_cast< BoolValue* >(object);
- (void)_this;
-}
-void BoolValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void BoolValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* BoolValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const BoolValue& BoolValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBoolValue();
- return *internal_default_instance();
-}
-
-BoolValue* BoolValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<BoolValue>(arena);
-}
-
-void BoolValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.BoolValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_ = false;
- _internal_metadata_.Clear();
-}
-
-bool BoolValue::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.protobuf.BoolValue)
- 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)) {
- // bool value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
-
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &value_)));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.BoolValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.BoolValue)
- return false;
-#undef DO_
-}
-
-void BoolValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.BoolValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bool value = 1;
- if (this->value() != 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.BoolValue)
-}
-
-::google::protobuf::uint8* BoolValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BoolValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bool value = 1;
- if (this->value() != 0) {
- target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.BoolValue)
- return target;
-}
-
-size_t BoolValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BoolValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // bool value = 1;
- if (this->value() != 0) {
- total_size += 1 + 1;
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void BoolValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.BoolValue)
- GOOGLE_DCHECK_NE(&from, this);
- const BoolValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const BoolValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.BoolValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.BoolValue)
- MergeFrom(*source);
- }
-}
-
-void BoolValue::MergeFrom(const BoolValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BoolValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value() != 0) {
- set_value(from.value());
- }
-}
-
-void BoolValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.BoolValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void BoolValue::CopyFrom(const BoolValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.BoolValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool BoolValue::IsInitialized() const {
- return true;
-}
-
-void BoolValue::Swap(BoolValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- BoolValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void BoolValue::UnsafeArenaSwap(BoolValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void BoolValue::InternalSwap(BoolValue* other) {
- using std::swap;
- swap(value_, other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata BoolValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void StringValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int StringValue::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-StringValue::StringValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsStringValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.StringValue)
-}
-StringValue::StringValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsStringValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.StringValue)
-}
-StringValue::StringValue(const StringValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value(),
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.StringValue)
-}
-
-void StringValue::SharedCtor() {
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
-}
-
-StringValue::~StringValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.StringValue)
- SharedDtor();
-}
-
-void StringValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void StringValue::ArenaDtor(void* object) {
- StringValue* _this = reinterpret_cast< StringValue* >(object);
- (void)_this;
-}
-void StringValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void StringValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* StringValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const StringValue& StringValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsStringValue();
- return *internal_default_instance();
-}
-
-StringValue* StringValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<StringValue>(arena);
-}
-
-void StringValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.StringValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- _internal_metadata_.Clear();
-}
-
-bool StringValue::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.protobuf.StringValue)
- 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)) {
- // string value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadString(
- input, this->mutable_value()));
- DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::PARSE,
- "google.protobuf.StringValue.value"));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.StringValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.StringValue)
- return false;
-#undef DO_
-}
-
-void StringValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.StringValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.StringValue.value");
- ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
- 1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.StringValue)
-}
-
-::google::protobuf::uint8* StringValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.StringValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // string value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
- this->value().data(), static_cast<int>(this->value().length()),
- ::google::protobuf::internal::WireFormatLite::SERIALIZE,
- "google.protobuf.StringValue.value");
- target =
- ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
- 1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.StringValue)
- return target;
-}
-
-size_t StringValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.StringValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // string value = 1;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::StringSize(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void StringValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.StringValue)
- GOOGLE_DCHECK_NE(&from, this);
- const StringValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const StringValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.StringValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.StringValue)
- MergeFrom(*source);
- }
-}
-
-void StringValue::MergeFrom(const StringValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.StringValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value().size() > 0) {
- set_value(from.value());
- }
-}
-
-void StringValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.StringValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void StringValue::CopyFrom(const StringValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.StringValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool StringValue::IsInitialized() const {
- return true;
-}
-
-void StringValue::Swap(StringValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- StringValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void StringValue::UnsafeArenaSwap(StringValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void StringValue::InternalSwap(StringValue* other) {
- using std::swap;
- value_.Swap(&other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata StringValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// ===================================================================
-
-void BytesValue::InitAsDefaultInstance() {
-}
-#if !defined(_MSC_VER) || _MSC_VER >= 1900
-const int BytesValue::kValueFieldNumber;
-#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
-
-BytesValue::BytesValue()
- : ::google::protobuf::Message(), _internal_metadata_(NULL) {
- if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBytesValue();
- }
- SharedCtor();
- // @@protoc_insertion_point(constructor:google.protobuf.BytesValue)
-}
-BytesValue::BytesValue(::google::protobuf::Arena* arena)
- : ::google::protobuf::Message(),
- _internal_metadata_(arena) {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBytesValue();
- SharedCtor();
- RegisterArenaDtor(arena);
- // @@protoc_insertion_point(arena_constructor:google.protobuf.BytesValue)
-}
-BytesValue::BytesValue(const BytesValue& from)
- : ::google::protobuf::Message(),
- _internal_metadata_(NULL),
- _cached_size_(0) {
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- if (from.value().size() > 0) {
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value(),
- GetArenaNoVirtual());
- }
- // @@protoc_insertion_point(copy_constructor:google.protobuf.BytesValue)
-}
-
-void BytesValue::SharedCtor() {
- value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
- _cached_size_ = 0;
-}
-
-BytesValue::~BytesValue() {
- // @@protoc_insertion_point(destructor:google.protobuf.BytesValue)
- SharedDtor();
-}
-
-void BytesValue::SharedDtor() {
- GOOGLE_DCHECK(GetArenaNoVirtual() == NULL);
- value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
-}
-
-void BytesValue::ArenaDtor(void* object) {
- BytesValue* _this = reinterpret_cast< BytesValue* >(object);
- (void)_this;
-}
-void BytesValue::RegisterArenaDtor(::google::protobuf::Arena* arena) {
-}
-void BytesValue::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const ::google::protobuf::Descriptor* BytesValue::descriptor() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
-}
-
-const BytesValue& BytesValue::default_instance() {
- ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBytesValue();
- return *internal_default_instance();
-}
-
-BytesValue* BytesValue::New(::google::protobuf::Arena* arena) const {
- return ::google::protobuf::Arena::CreateMessage<BytesValue>(arena);
-}
-
-void BytesValue::Clear() {
-// @@protoc_insertion_point(message_clear_start:google.protobuf.BytesValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- // Prevent compiler warnings about cached_has_bits being unused
- (void) cached_has_bits;
-
- value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
- _internal_metadata_.Clear();
-}
-
-bool BytesValue::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.protobuf.BytesValue)
- 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)) {
- // bytes value = 1;
- case 1: {
- if (static_cast< ::google::protobuf::uint8>(tag) ==
- static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_value()));
- } else {
- goto handle_unusual;
- }
- break;
- }
-
- default: {
- handle_unusual:
- if (tag == 0) {
- goto success;
- }
- DO_(::google::protobuf::internal::WireFormat::SkipField(
- input, tag, _internal_metadata_.mutable_unknown_fields()));
- break;
- }
- }
- }
-success:
- // @@protoc_insertion_point(parse_success:google.protobuf.BytesValue)
- return true;
-failure:
- // @@protoc_insertion_point(parse_failure:google.protobuf.BytesValue)
- return false;
-#undef DO_
-}
-
-void BytesValue::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // @@protoc_insertion_point(serialize_start:google.protobuf.BytesValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bytes value = 1;
- if (this->value().size() > 0) {
- ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
- 1, this->value(), output);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()), output);
- }
- // @@protoc_insertion_point(serialize_end:google.protobuf.BytesValue)
-}
-
-::google::protobuf::uint8* BytesValue::InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const {
- (void)deterministic; // Unused
- // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.BytesValue)
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- // bytes value = 1;
- if (this->value().size() > 0) {
- target =
- ::google::protobuf::internal::WireFormatLite::WriteBytesToArray(
- 1, this->value(), target);
- }
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- 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.protobuf.BytesValue)
- return target;
-}
-
-size_t BytesValue::ByteSizeLong() const {
-// @@protoc_insertion_point(message_byte_size_start:google.protobuf.BytesValue)
- size_t total_size = 0;
-
- if ((_internal_metadata_.have_unknown_fields() && ::google::protobuf::internal::GetProto3PreserveUnknownsDefault())) {
- total_size +=
- ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
- (::google::protobuf::internal::GetProto3PreserveUnknownsDefault() ? _internal_metadata_.unknown_fields() : _internal_metadata_.default_instance()));
- }
- // bytes value = 1;
- if (this->value().size() > 0) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->value());
- }
-
- int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = cached_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void BytesValue::MergeFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.BytesValue)
- GOOGLE_DCHECK_NE(&from, this);
- const BytesValue* source =
- ::google::protobuf::internal::DynamicCastToGenerated<const BytesValue>(
- &from);
- if (source == NULL) {
- // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.BytesValue)
- ::google::protobuf::internal::ReflectionOps::Merge(from, this);
- } else {
- // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.BytesValue)
- MergeFrom(*source);
- }
-}
-
-void BytesValue::MergeFrom(const BytesValue& from) {
-// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.BytesValue)
- GOOGLE_DCHECK_NE(&from, this);
- _internal_metadata_.MergeFrom(from._internal_metadata_);
- ::google::protobuf::uint32 cached_has_bits = 0;
- (void) cached_has_bits;
-
- if (from.value().size() > 0) {
- set_value(from.value());
- }
-}
-
-void BytesValue::CopyFrom(const ::google::protobuf::Message& from) {
-// @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.BytesValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-void BytesValue::CopyFrom(const BytesValue& from) {
-// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.BytesValue)
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool BytesValue::IsInitialized() const {
- return true;
-}
-
-void BytesValue::Swap(BytesValue* other) {
- if (other == this) return;
- if (GetArenaNoVirtual() == other->GetArenaNoVirtual()) {
- InternalSwap(other);
- } else {
- BytesValue* temp = New(GetArenaNoVirtual());
- temp->MergeFrom(*other);
- other->CopyFrom(*this);
- InternalSwap(temp);
- if (GetArenaNoVirtual() == NULL) {
- delete temp;
- }
- }
-}
-void BytesValue::UnsafeArenaSwap(BytesValue* other) {
- if (other == this) return;
- GOOGLE_DCHECK(GetArenaNoVirtual() == other->GetArenaNoVirtual());
- InternalSwap(other);
-}
-void BytesValue::InternalSwap(BytesValue* other) {
- using std::swap;
- value_.Swap(&other->value_);
- _internal_metadata_.Swap(&other->_internal_metadata_);
- swap(_cached_size_, other->_cached_size_);
-}
-
-::google::protobuf::Metadata BytesValue::GetMetadata() const {
- protobuf_google_2fprotobuf_2fwrappers_2eproto::protobuf_AssignDescriptorsOnce();
- return ::protobuf_google_2fprotobuf_2fwrappers_2eproto::file_level_metadata[kIndexInFileMessages];
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/cpp/google/protobuf/wrappers.pb.h b/Firestore/Protos/cpp/google/protobuf/wrappers.pb.h
deleted file mode 100644
index a43c27b..0000000
--- a/Firestore/Protos/cpp/google/protobuf/wrappers.pb.h
+++ /dev/null
@@ -1,1503 +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.
- */
-
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/wrappers.proto
-
-#ifndef PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
-#define PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 3005000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 3005000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/arena.h>
-#include <google/protobuf/arenastring.h>
-#include <google/protobuf/generated_message_table_driven.h>
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/metadata.h>
-#include <google/protobuf/message.h>
-#include <google/protobuf/repeated_field.h> // IWYU pragma: export
-#include <google/protobuf/extension_set.h> // IWYU pragma: export
-#include <google/protobuf/unknown_field_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace protobuf_google_2fprotobuf_2fwrappers_2eproto {
-// Internal implementation detail -- do not use these members.
-struct TableStruct {
- static const ::google::protobuf::internal::ParseTableField entries[];
- static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
- static const ::google::protobuf::internal::ParseTable schema[9];
- static const ::google::protobuf::internal::FieldMetadata field_metadata[];
- static const ::google::protobuf::internal::SerializationTable serialization_table[];
- static const ::google::protobuf::uint32 offsets[];
-};
-void AddDescriptors();
-void InitDefaultsDoubleValueImpl();
-void InitDefaultsDoubleValue();
-void InitDefaultsFloatValueImpl();
-void InitDefaultsFloatValue();
-void InitDefaultsInt64ValueImpl();
-void InitDefaultsInt64Value();
-void InitDefaultsUInt64ValueImpl();
-void InitDefaultsUInt64Value();
-void InitDefaultsInt32ValueImpl();
-void InitDefaultsInt32Value();
-void InitDefaultsUInt32ValueImpl();
-void InitDefaultsUInt32Value();
-void InitDefaultsBoolValueImpl();
-void InitDefaultsBoolValue();
-void InitDefaultsStringValueImpl();
-void InitDefaultsStringValue();
-void InitDefaultsBytesValueImpl();
-void InitDefaultsBytesValue();
-inline void InitDefaults() {
- InitDefaultsDoubleValue();
- InitDefaultsFloatValue();
- InitDefaultsInt64Value();
- InitDefaultsUInt64Value();
- InitDefaultsInt32Value();
- InitDefaultsUInt32Value();
- InitDefaultsBoolValue();
- InitDefaultsStringValue();
- InitDefaultsBytesValue();
-}
-} // namespace protobuf_google_2fprotobuf_2fwrappers_2eproto
-namespace google {
-namespace protobuf {
-class BoolValue;
-class BoolValueDefaultTypeInternal;
-extern BoolValueDefaultTypeInternal _BoolValue_default_instance_;
-class BytesValue;
-class BytesValueDefaultTypeInternal;
-extern BytesValueDefaultTypeInternal _BytesValue_default_instance_;
-class DoubleValue;
-class DoubleValueDefaultTypeInternal;
-extern DoubleValueDefaultTypeInternal _DoubleValue_default_instance_;
-class FloatValue;
-class FloatValueDefaultTypeInternal;
-extern FloatValueDefaultTypeInternal _FloatValue_default_instance_;
-class Int32Value;
-class Int32ValueDefaultTypeInternal;
-extern Int32ValueDefaultTypeInternal _Int32Value_default_instance_;
-class Int64Value;
-class Int64ValueDefaultTypeInternal;
-extern Int64ValueDefaultTypeInternal _Int64Value_default_instance_;
-class StringValue;
-class StringValueDefaultTypeInternal;
-extern StringValueDefaultTypeInternal _StringValue_default_instance_;
-class UInt32Value;
-class UInt32ValueDefaultTypeInternal;
-extern UInt32ValueDefaultTypeInternal _UInt32Value_default_instance_;
-class UInt64Value;
-class UInt64ValueDefaultTypeInternal;
-extern UInt64ValueDefaultTypeInternal _UInt64Value_default_instance_;
-} // namespace protobuf
-} // namespace google
-namespace google {
-namespace protobuf {
-
-// ===================================================================
-
-class DoubleValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.DoubleValue) */ {
- public:
- DoubleValue();
- virtual ~DoubleValue();
-
- DoubleValue(const DoubleValue& from);
-
- inline DoubleValue& operator=(const DoubleValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- DoubleValue(DoubleValue&& from) noexcept
- : DoubleValue() {
- *this = ::std::move(from);
- }
-
- inline DoubleValue& operator=(DoubleValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const DoubleValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const DoubleValue* internal_default_instance() {
- return reinterpret_cast<const DoubleValue*>(
- &_DoubleValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 0;
-
- void UnsafeArenaSwap(DoubleValue* other);
- void Swap(DoubleValue* other);
- friend void swap(DoubleValue& a, DoubleValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline DoubleValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- DoubleValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const DoubleValue& from);
- void MergeFrom(const DoubleValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(DoubleValue* other);
- protected:
- explicit DoubleValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // double value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- double value() const;
- void set_value(double value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.DoubleValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- double value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsDoubleValueImpl();
-};
-// -------------------------------------------------------------------
-
-class FloatValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.FloatValue) */ {
- public:
- FloatValue();
- virtual ~FloatValue();
-
- FloatValue(const FloatValue& from);
-
- inline FloatValue& operator=(const FloatValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- FloatValue(FloatValue&& from) noexcept
- : FloatValue() {
- *this = ::std::move(from);
- }
-
- inline FloatValue& operator=(FloatValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const FloatValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const FloatValue* internal_default_instance() {
- return reinterpret_cast<const FloatValue*>(
- &_FloatValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 1;
-
- void UnsafeArenaSwap(FloatValue* other);
- void Swap(FloatValue* other);
- friend void swap(FloatValue& a, FloatValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline FloatValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- FloatValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const FloatValue& from);
- void MergeFrom(const FloatValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(FloatValue* other);
- protected:
- explicit FloatValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // float value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- float value() const;
- void set_value(float value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.FloatValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- float value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsFloatValueImpl();
-};
-// -------------------------------------------------------------------
-
-class Int64Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int64Value) */ {
- public:
- Int64Value();
- virtual ~Int64Value();
-
- Int64Value(const Int64Value& from);
-
- inline Int64Value& operator=(const Int64Value& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Int64Value(Int64Value&& from) noexcept
- : Int64Value() {
- *this = ::std::move(from);
- }
-
- inline Int64Value& operator=(Int64Value&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Int64Value& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Int64Value* internal_default_instance() {
- return reinterpret_cast<const Int64Value*>(
- &_Int64Value_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 2;
-
- void UnsafeArenaSwap(Int64Value* other);
- void Swap(Int64Value* other);
- friend void swap(Int64Value& a, Int64Value& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Int64Value* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Int64Value* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Int64Value& from);
- void MergeFrom(const Int64Value& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Int64Value* other);
- protected:
- explicit Int64Value(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // int64 value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- ::google::protobuf::int64 value() const;
- void set_value(::google::protobuf::int64 value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Int64Value)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::int64 value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt64ValueImpl();
-};
-// -------------------------------------------------------------------
-
-class UInt64Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt64Value) */ {
- public:
- UInt64Value();
- virtual ~UInt64Value();
-
- UInt64Value(const UInt64Value& from);
-
- inline UInt64Value& operator=(const UInt64Value& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- UInt64Value(UInt64Value&& from) noexcept
- : UInt64Value() {
- *this = ::std::move(from);
- }
-
- inline UInt64Value& operator=(UInt64Value&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const UInt64Value& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const UInt64Value* internal_default_instance() {
- return reinterpret_cast<const UInt64Value*>(
- &_UInt64Value_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 3;
-
- void UnsafeArenaSwap(UInt64Value* other);
- void Swap(UInt64Value* other);
- friend void swap(UInt64Value& a, UInt64Value& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline UInt64Value* New() const PROTOBUF_FINAL { return New(NULL); }
-
- UInt64Value* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const UInt64Value& from);
- void MergeFrom(const UInt64Value& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(UInt64Value* other);
- protected:
- explicit UInt64Value(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // uint64 value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- ::google::protobuf::uint64 value() const;
- void set_value(::google::protobuf::uint64 value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.UInt64Value)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::uint64 value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt64ValueImpl();
-};
-// -------------------------------------------------------------------
-
-class Int32Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Int32Value) */ {
- public:
- Int32Value();
- virtual ~Int32Value();
-
- Int32Value(const Int32Value& from);
-
- inline Int32Value& operator=(const Int32Value& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- Int32Value(Int32Value&& from) noexcept
- : Int32Value() {
- *this = ::std::move(from);
- }
-
- inline Int32Value& operator=(Int32Value&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const Int32Value& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const Int32Value* internal_default_instance() {
- return reinterpret_cast<const Int32Value*>(
- &_Int32Value_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 4;
-
- void UnsafeArenaSwap(Int32Value* other);
- void Swap(Int32Value* other);
- friend void swap(Int32Value& a, Int32Value& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline Int32Value* New() const PROTOBUF_FINAL { return New(NULL); }
-
- Int32Value* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const Int32Value& from);
- void MergeFrom(const Int32Value& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(Int32Value* other);
- protected:
- explicit Int32Value(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // int32 value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- ::google::protobuf::int32 value() const;
- void set_value(::google::protobuf::int32 value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.Int32Value)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::int32 value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsInt32ValueImpl();
-};
-// -------------------------------------------------------------------
-
-class UInt32Value : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.UInt32Value) */ {
- public:
- UInt32Value();
- virtual ~UInt32Value();
-
- UInt32Value(const UInt32Value& from);
-
- inline UInt32Value& operator=(const UInt32Value& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- UInt32Value(UInt32Value&& from) noexcept
- : UInt32Value() {
- *this = ::std::move(from);
- }
-
- inline UInt32Value& operator=(UInt32Value&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const UInt32Value& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const UInt32Value* internal_default_instance() {
- return reinterpret_cast<const UInt32Value*>(
- &_UInt32Value_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 5;
-
- void UnsafeArenaSwap(UInt32Value* other);
- void Swap(UInt32Value* other);
- friend void swap(UInt32Value& a, UInt32Value& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline UInt32Value* New() const PROTOBUF_FINAL { return New(NULL); }
-
- UInt32Value* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const UInt32Value& from);
- void MergeFrom(const UInt32Value& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(UInt32Value* other);
- protected:
- explicit UInt32Value(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // uint32 value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- ::google::protobuf::uint32 value() const;
- void set_value(::google::protobuf::uint32 value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.UInt32Value)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::uint32 value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsUInt32ValueImpl();
-};
-// -------------------------------------------------------------------
-
-class BoolValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BoolValue) */ {
- public:
- BoolValue();
- virtual ~BoolValue();
-
- BoolValue(const BoolValue& from);
-
- inline BoolValue& operator=(const BoolValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- BoolValue(BoolValue&& from) noexcept
- : BoolValue() {
- *this = ::std::move(from);
- }
-
- inline BoolValue& operator=(BoolValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const BoolValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const BoolValue* internal_default_instance() {
- return reinterpret_cast<const BoolValue*>(
- &_BoolValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 6;
-
- void UnsafeArenaSwap(BoolValue* other);
- void Swap(BoolValue* other);
- friend void swap(BoolValue& a, BoolValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline BoolValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- BoolValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const BoolValue& from);
- void MergeFrom(const BoolValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(BoolValue* other);
- protected:
- explicit BoolValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // bool value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- bool value() const;
- void set_value(bool value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.BoolValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- bool value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBoolValueImpl();
-};
-// -------------------------------------------------------------------
-
-class StringValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.StringValue) */ {
- public:
- StringValue();
- virtual ~StringValue();
-
- StringValue(const StringValue& from);
-
- inline StringValue& operator=(const StringValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- StringValue(StringValue&& from) noexcept
- : StringValue() {
- *this = ::std::move(from);
- }
-
- inline StringValue& operator=(StringValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const StringValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const StringValue* internal_default_instance() {
- return reinterpret_cast<const StringValue*>(
- &_StringValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 7;
-
- void UnsafeArenaSwap(StringValue* other);
- void Swap(StringValue* other);
- friend void swap(StringValue& a, StringValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline StringValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- StringValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const StringValue& from);
- void MergeFrom(const StringValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(StringValue* other);
- protected:
- explicit StringValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // string value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- const ::std::string& value() const;
- void set_value(const ::std::string& value);
- #if LANG_CXX11
- void set_value(::std::string&& value);
- #endif
- void set_value(const char* value);
- void set_value(const char* value, size_t size);
- ::std::string* mutable_value();
- ::std::string* release_value();
- void set_allocated_value(::std::string* value);
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- ::std::string* unsafe_arena_release_value();
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- void unsafe_arena_set_allocated_value(
- ::std::string* value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.StringValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::internal::ArenaStringPtr value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsStringValueImpl();
-};
-// -------------------------------------------------------------------
-
-class BytesValue : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.BytesValue) */ {
- public:
- BytesValue();
- virtual ~BytesValue();
-
- BytesValue(const BytesValue& from);
-
- inline BytesValue& operator=(const BytesValue& from) {
- CopyFrom(from);
- return *this;
- }
- #if LANG_CXX11
- BytesValue(BytesValue&& from) noexcept
- : BytesValue() {
- *this = ::std::move(from);
- }
-
- inline BytesValue& operator=(BytesValue&& from) noexcept {
- if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
- if (this != &from) InternalSwap(&from);
- } else {
- CopyFrom(from);
- }
- return *this;
- }
- #endif
- inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL {
- return GetArenaNoVirtual();
- }
- inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL {
- return MaybeArenaPtr();
- }
- static const ::google::protobuf::Descriptor* descriptor();
- static const BytesValue& default_instance();
-
- static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
- static inline const BytesValue* internal_default_instance() {
- return reinterpret_cast<const BytesValue*>(
- &_BytesValue_default_instance_);
- }
- static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
- 8;
-
- void UnsafeArenaSwap(BytesValue* other);
- void Swap(BytesValue* other);
- friend void swap(BytesValue& a, BytesValue& b) {
- a.Swap(&b);
- }
-
- // implements Message ----------------------------------------------
-
- inline BytesValue* New() const PROTOBUF_FINAL { return New(NULL); }
-
- BytesValue* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
- void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
- void CopyFrom(const BytesValue& from);
- void MergeFrom(const BytesValue& from);
- void Clear() PROTOBUF_FINAL;
- bool IsInitialized() const PROTOBUF_FINAL;
-
- size_t ByteSizeLong() const PROTOBUF_FINAL;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
- ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
- bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
- int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const PROTOBUF_FINAL;
- void InternalSwap(BytesValue* other);
- protected:
- explicit BytesValue(::google::protobuf::Arena* arena);
- private:
- static void ArenaDtor(void* object);
- inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
- private:
- inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
- return _internal_metadata_.arena();
- }
- inline void* MaybeArenaPtr() const {
- return _internal_metadata_.raw_arena_ptr();
- }
- public:
-
- ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
-
- // nested types ----------------------------------------------------
-
- // accessors -------------------------------------------------------
-
- // bytes value = 1;
- void clear_value();
- static const int kValueFieldNumber = 1;
- const ::std::string& value() const;
- void set_value(const ::std::string& value);
- #if LANG_CXX11
- void set_value(::std::string&& value);
- #endif
- void set_value(const char* value);
- void set_value(const void* value, size_t size);
- ::std::string* mutable_value();
- ::std::string* release_value();
- void set_allocated_value(::std::string* value);
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- ::std::string* unsafe_arena_release_value();
- PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
- " string fields are deprecated and will be removed in a"
- " future release.")
- void unsafe_arena_set_allocated_value(
- ::std::string* value);
-
- // @@protoc_insertion_point(class_scope:google.protobuf.BytesValue)
- private:
-
- ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
- template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
- typedef void InternalArenaConstructable_;
- typedef void DestructorSkippable_;
- ::google::protobuf::internal::ArenaStringPtr value_;
- mutable int _cached_size_;
- friend struct ::protobuf_google_2fprotobuf_2fwrappers_2eproto::TableStruct;
- friend void ::protobuf_google_2fprotobuf_2fwrappers_2eproto::InitDefaultsBytesValueImpl();
-};
-// ===================================================================
-
-
-// ===================================================================
-
-#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Wstrict-aliasing"
-#endif // __GNUC__
-// DoubleValue
-
-// double value = 1;
-inline void DoubleValue::clear_value() {
- value_ = 0;
-}
-inline double DoubleValue::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.DoubleValue.value)
- return value_;
-}
-inline void DoubleValue::set_value(double value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.DoubleValue.value)
-}
-
-// -------------------------------------------------------------------
-
-// FloatValue
-
-// float value = 1;
-inline void FloatValue::clear_value() {
- value_ = 0;
-}
-inline float FloatValue::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.FloatValue.value)
- return value_;
-}
-inline void FloatValue::set_value(float value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.FloatValue.value)
-}
-
-// -------------------------------------------------------------------
-
-// Int64Value
-
-// int64 value = 1;
-inline void Int64Value::clear_value() {
- value_ = GOOGLE_LONGLONG(0);
-}
-inline ::google::protobuf::int64 Int64Value::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Int64Value.value)
- return value_;
-}
-inline void Int64Value::set_value(::google::protobuf::int64 value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Int64Value.value)
-}
-
-// -------------------------------------------------------------------
-
-// UInt64Value
-
-// uint64 value = 1;
-inline void UInt64Value::clear_value() {
- value_ = GOOGLE_ULONGLONG(0);
-}
-inline ::google::protobuf::uint64 UInt64Value::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UInt64Value.value)
- return value_;
-}
-inline void UInt64Value::set_value(::google::protobuf::uint64 value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UInt64Value.value)
-}
-
-// -------------------------------------------------------------------
-
-// Int32Value
-
-// int32 value = 1;
-inline void Int32Value::clear_value() {
- value_ = 0;
-}
-inline ::google::protobuf::int32 Int32Value::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.Int32Value.value)
- return value_;
-}
-inline void Int32Value::set_value(::google::protobuf::int32 value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.Int32Value.value)
-}
-
-// -------------------------------------------------------------------
-
-// UInt32Value
-
-// uint32 value = 1;
-inline void UInt32Value::clear_value() {
- value_ = 0u;
-}
-inline ::google::protobuf::uint32 UInt32Value::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.UInt32Value.value)
- return value_;
-}
-inline void UInt32Value::set_value(::google::protobuf::uint32 value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.UInt32Value.value)
-}
-
-// -------------------------------------------------------------------
-
-// BoolValue
-
-// bool value = 1;
-inline void BoolValue::clear_value() {
- value_ = false;
-}
-inline bool BoolValue::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.BoolValue.value)
- return value_;
-}
-inline void BoolValue::set_value(bool value) {
-
- value_ = value;
- // @@protoc_insertion_point(field_set:google.protobuf.BoolValue.value)
-}
-
-// -------------------------------------------------------------------
-
-// StringValue
-
-// string value = 1;
-inline void StringValue::clear_value() {
- value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline const ::std::string& StringValue::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.StringValue.value)
- return value_.Get();
-}
-inline void StringValue::set_value(const ::std::string& value) {
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set:google.protobuf.StringValue.value)
-}
-#if LANG_CXX11
-inline void StringValue::set_value(::std::string&& value) {
-
- value_.Set(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.StringValue.value)
-}
-#endif
-inline void StringValue::set_value(const char* value) {
- GOOGLE_DCHECK(value != NULL);
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_char:google.protobuf.StringValue.value)
-}
-inline void StringValue::set_value(const char* value,
- size_t size) {
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.StringValue.value)
-}
-inline ::std::string* StringValue::mutable_value() {
-
- // @@protoc_insertion_point(field_mutable:google.protobuf.StringValue.value)
- return value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline ::std::string* StringValue::release_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.StringValue.value)
-
- return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline void StringValue::set_allocated_value(::std::string* value) {
- if (value != NULL) {
-
- } else {
-
- }
- value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.StringValue.value)
-}
-inline ::std::string* StringValue::unsafe_arena_release_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.StringValue.value)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
-inline void StringValue::unsafe_arena_set_allocated_value(
- ::std::string* value) {
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (value != NULL) {
-
- } else {
-
- }
- value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- value, GetArenaNoVirtual());
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.StringValue.value)
-}
-
-// -------------------------------------------------------------------
-
-// BytesValue
-
-// bytes value = 1;
-inline void BytesValue::clear_value() {
- value_.ClearToEmpty(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline const ::std::string& BytesValue::value() const {
- // @@protoc_insertion_point(field_get:google.protobuf.BytesValue.value)
- return value_.Get();
-}
-inline void BytesValue::set_value(const ::std::string& value) {
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value, GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set:google.protobuf.BytesValue.value)
-}
-#if LANG_CXX11
-inline void BytesValue::set_value(::std::string&& value) {
-
- value_.Set(
- &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_rvalue:google.protobuf.BytesValue.value)
-}
-#endif
-inline void BytesValue::set_value(const char* value) {
- GOOGLE_DCHECK(value != NULL);
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_char:google.protobuf.BytesValue.value)
-}
-inline void BytesValue::set_value(const void* value,
- size_t size) {
-
- value_.Set(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(
- reinterpret_cast<const char*>(value), size), GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_pointer:google.protobuf.BytesValue.value)
-}
-inline ::std::string* BytesValue::mutable_value() {
-
- // @@protoc_insertion_point(field_mutable:google.protobuf.BytesValue.value)
- return value_.Mutable(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline ::std::string* BytesValue::release_value() {
- // @@protoc_insertion_point(field_release:google.protobuf.BytesValue.value)
-
- return value_.Release(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual());
-}
-inline void BytesValue::set_allocated_value(::std::string* value) {
- if (value != NULL) {
-
- } else {
-
- }
- value_.SetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value,
- GetArenaNoVirtual());
- // @@protoc_insertion_point(field_set_allocated:google.protobuf.BytesValue.value)
-}
-inline ::std::string* BytesValue::unsafe_arena_release_value() {
- // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.BytesValue.value)
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
-
- return value_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- GetArenaNoVirtual());
-}
-inline void BytesValue::unsafe_arena_set_allocated_value(
- ::std::string* value) {
- GOOGLE_DCHECK(GetArenaNoVirtual() != NULL);
- if (value != NULL) {
-
- } else {
-
- }
- value_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
- value, GetArenaNoVirtual());
- // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.BytesValue.value)
-}
-
-#ifdef __GNUC__
- #pragma GCC diagnostic pop
-#endif // __GNUC__
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-// -------------------------------------------------------------------
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace protobuf
-} // namespace google
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_google_2fprotobuf_2fwrappers_2eproto__INCLUDED
diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h
index b159cd1..0b9aa68 100644
--- a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h
+++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.nanopb.h
@@ -15,15 +15,15 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED
#include <pb.h>
-#include "google/firestore/v1beta1/document.pb.h"
+#include "google/firestore/v1beta1/document.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c
index 7cd4035..e528816 100644
--- a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c
+++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "maybe_document.pb.h"
+#include "maybe_document.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.h b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h
index 537d0cd..c3b2b96 100644
--- a/Firestore/Protos/nanopb/firestore/local/mutation.pb.h
+++ b/Firestore/Protos/nanopb/firestore/local/mutation.nanopb.h
@@ -15,15 +15,15 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED
#include <pb.h>
-#include "google/firestore/v1beta1/write.pb.h"
+#include "google/firestore/v1beta1/write.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.c b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c
index 7dedb14..12725ce 100644
--- a/Firestore/Protos/nanopb/firestore/local/mutation.pb.c
+++ b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "mutation.pb.h"
+#include "mutation.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.h b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h
index 37b64a2..af6cf9c 100644
--- a/Firestore/Protos/nanopb/firestore/local/target.pb.h
+++ b/Firestore/Protos/nanopb/firestore/local/target.nanopb.h
@@ -15,15 +15,15 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED
#define PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED
#include <pb.h>
-#include "google/firestore/v1beta1/firestore.pb.h"
+#include "google/firestore/v1beta1/firestore.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.c b/Firestore/Protos/nanopb/firestore/local/target.pb.c
index d00d4a6..7a68c4a 100644
--- a/Firestore/Protos/nanopb/firestore/local/target.pb.c
+++ b/Firestore/Protos/nanopb/firestore/local/target.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "target.pb.h"
+#include "target.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.h b/Firestore/Protos/nanopb/google/api/annotations.nanopb.h
index 33c9ba8..9a7854d 100644
--- a/Firestore/Protos/nanopb/google/api/annotations.pb.h
+++ b/Firestore/Protos/nanopb/google/api/annotations.nanopb.h
@@ -15,13 +15,13 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED
#define PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/http.pb.h"
+#include "google/api/http.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.c b/Firestore/Protos/nanopb/google/api/annotations.pb.c
index 6da5206..ff6f44b 100644
--- a/Firestore/Protos/nanopb/google/api/annotations.pb.c
+++ b/Firestore/Protos/nanopb/google/api/annotations.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "annotations.pb.h"
+#include "annotations.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/api/http.pb.h b/Firestore/Protos/nanopb/google/api/http.nanopb.h
index a7bbc46..4ff3efe 100644
--- a/Firestore/Protos/nanopb/google/api/http.pb.h
+++ b/Firestore/Protos/nanopb/google/api/http.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Thu Apr 12 07:27:15 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_API_HTTP_PB_H_INCLUDED
#define PB_GOOGLE_API_HTTP_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/api/http.pb.c b/Firestore/Protos/nanopb/google/api/http.pb.c
index 7a2cd21..c0d1114 100644
--- a/Firestore/Protos/nanopb/google/api/http.pb.c
+++ b/Firestore/Protos/nanopb/google/api/http.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Thu Apr 12 07:27:15 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "http.pb.h"
+#include "http.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h
index 277d9b8..d0095bc 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.nanopb.h
@@ -15,15 +15,15 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/annotations.pb.h"
+#include "google/api/annotations.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c
index de2cf65..e740870 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "common.pb.h"
+#include "common.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h
index 180c1af..f8fdd55 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h
@@ -15,19 +15,19 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/annotations.pb.h"
+#include "google/api/annotations.nanopb.h"
-#include "google/protobuf/struct.pb.h"
+#include "google/protobuf/struct.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
-#include "google/type/latlng.pb.h"
+#include "google/type/latlng.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c
index 862c884..23d62aa 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "document.pb.h"
+#include "document.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h
index 5bfbcf8..c8b2132 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.nanopb.h
@@ -15,27 +15,27 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/annotations.pb.h"
+#include "google/api/annotations.nanopb.h"
-#include "google/firestore/v1beta1/common.pb.h"
+#include "google/firestore/v1beta1/common.nanopb.h"
-#include "google/firestore/v1beta1/document.pb.h"
+#include "google/firestore/v1beta1/document.nanopb.h"
-#include "google/firestore/v1beta1/query.pb.h"
+#include "google/firestore/v1beta1/query.nanopb.h"
-#include "google/firestore/v1beta1/write.pb.h"
+#include "google/firestore/v1beta1/write.nanopb.h"
-#include "google/protobuf/empty.pb.h"
+#include "google/protobuf/empty.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
-#include "google/rpc/status.pb.h"
+#include "google/rpc/status.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c
index bc8eca9..56b114a 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "firestore.pb.h"
+#include "firestore.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h
index 75b8168..68ac2a5 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.nanopb.h
@@ -15,17 +15,17 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Thu Apr 12 07:27:15 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/annotations.pb.h"
+#include "google/api/annotations.nanopb.h"
-#include "google/firestore/v1beta1/document.pb.h"
+#include "google/firestore/v1beta1/document.nanopb.h"
-#include "google/protobuf/wrappers.pb.h"
+#include "google/protobuf/wrappers.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c
index 4e68490..a392327 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "query.pb.h"
+#include "query.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h
index 5a272b2..4c4e6ba 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.nanopb.h
@@ -15,19 +15,19 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Thu Apr 12 07:27:15 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED
#define PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED
#include <pb.h>
-#include "google/api/annotations.pb.h"
+#include "google/api/annotations.nanopb.h"
-#include "google/firestore/v1beta1/common.pb.h"
+#include "google/firestore/v1beta1/common.nanopb.h"
-#include "google/firestore/v1beta1/document.pb.h"
+#include "google/firestore/v1beta1/document.nanopb.h"
-#include "google/protobuf/timestamp.pb.h"
+#include "google/protobuf/timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c
index 26542e0..2527138 100644
--- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c
+++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Thu Apr 12 07:27:15 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "write.pb.h"
+#include "write.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/protobuf/any.pb.h b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h
index 10a722e..91a7001 100644
--- a/Firestore/Protos/nanopb/google/protobuf/any.pb.h
+++ b/Firestore/Protos/nanopb/google/protobuf/any.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_PROTOBUF_ANY_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_ANY_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/protobuf/any.pb.c b/Firestore/Protos/nanopb/google/protobuf/any.pb.c
index b28d0ba..34a415c 100644
--- a/Firestore/Protos/nanopb/google/protobuf/any.pb.c
+++ b/Firestore/Protos/nanopb/google/protobuf/any.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "any.pb.h"
+#include "any.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/protobuf/empty.pb.h b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h
index 466e1fd..3fb0eba 100644
--- a/Firestore/Protos/nanopb/google/protobuf/empty.pb.h
+++ b/Firestore/Protos/nanopb/google/protobuf/empty.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_PROTOBUF_EMPTY_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_EMPTY_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/protobuf/empty.pb.c b/Firestore/Protos/nanopb/google/protobuf/empty.pb.c
index 050af9c..2326702 100644
--- a/Firestore/Protos/nanopb/google/protobuf/empty.pb.c
+++ b/Firestore/Protos/nanopb/google/protobuf/empty.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "empty.pb.h"
+#include "empty.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.h b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h
index b325b60..fcccd9e 100644
--- a/Firestore/Protos/nanopb/google/protobuf/struct.pb.h
+++ b/Firestore/Protos/nanopb/google/protobuf/struct.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.c b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c
index 2826aab..dc6eca4 100644
--- a/Firestore/Protos/nanopb/google/protobuf/struct.pb.c
+++ b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "struct.pb.h"
+#include "struct.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h
index d7be977..30fe497 100644
--- a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h
+++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c
index 4f03c19..4d91990 100644
--- a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c
+++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "timestamp.pb.h"
+#include "timestamp.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.h b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h
index 0e98785..7e36429 100644
--- a/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.h
+++ b/Firestore/Protos/nanopb/google/protobuf/wrappers.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_PROTOBUF_WRAPPERS_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_WRAPPERS_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c b/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c
index 41ab3c6..f2c7bd9 100644
--- a/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c
+++ b/Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "wrappers.pb.h"
+#include "wrappers.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.h b/Firestore/Protos/nanopb/google/rpc/status.nanopb.h
index afcbab9..d26c31a 100644
--- a/Firestore/Protos/nanopb/google/rpc/status.pb.h
+++ b/Firestore/Protos/nanopb/google/rpc/status.nanopb.h
@@ -15,13 +15,13 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED
#define PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED
#include <pb.h>
-#include "google/protobuf/any.pb.h"
+#include "google/protobuf/any.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.c b/Firestore/Protos/nanopb/google/rpc/status.pb.c
index dbdccce..7a96204 100644
--- a/Firestore/Protos/nanopb/google/rpc/status.pb.c
+++ b/Firestore/Protos/nanopb/google/rpc/status.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "status.pb.h"
+#include "status.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.h b/Firestore/Protos/nanopb/google/type/latlng.nanopb.h
index fa5703b..a3b8365 100644
--- a/Firestore/Protos/nanopb/google/type/latlng.pb.h
+++ b/Firestore/Protos/nanopb/google/type/latlng.nanopb.h
@@ -15,7 +15,7 @@
*/
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
#ifndef PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED
#define PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED
diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.c b/Firestore/Protos/nanopb/google/type/latlng.pb.c
index b5f6424..a2a2de3 100644
--- a/Firestore/Protos/nanopb/google/type/latlng.pb.c
+++ b/Firestore/Protos/nanopb/google/type/latlng.pb.c
@@ -15,9 +15,9 @@
*/
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */
+/* Generated by nanopb-0.3.8 at Fri Jun 1 18:36:44 2018. */
-#include "latlng.pb.h"
+#include "latlng.nanopb.h"
/* @@protoc_insertion_point(includes) */
#if PB_PROTO_HEADER_VERSION != 30
diff --git a/Firestore/Source/API/FIRFirestore.mm b/Firestore/Source/API/FIRFirestore.mm
index 3671b51..fb4a1ec 100644
--- a/Firestore/Source/API/FIRFirestore.mm
+++ b/Firestore/Source/API/FIRFirestore.mm
@@ -128,11 +128,11 @@ extern "C" NSString *const FIRFirestoreErrorDomain = @"FIRFirestoreErrorDomain";
@"Failed to get FirebaseApp instance. Please call FirebaseApp.configure() "
@"before using Firestore");
}
- return [self firestoreForApp:app database:util::WrapNSStringNoCopy(DatabaseId::kDefault)];
+ return [self firestoreForApp:app database:util::WrapNSString(DatabaseId::kDefault)];
}
+ (instancetype)firestoreForApp:(FIRApp *)app {
- return [self firestoreForApp:app database:util::WrapNSStringNoCopy(DatabaseId::kDefault)];
+ return [self firestoreForApp:app database:util::WrapNSString(DatabaseId::kDefault)];
}
// TODO(b/62410906): make this public
diff --git a/Firestore/Source/API/FSTUserDataConverter.mm b/Firestore/Source/API/FSTUserDataConverter.mm
index 44e46da..d73a870 100644
--- a/Firestore/Source/API/FSTUserDataConverter.mm
+++ b/Firestore/Source/API/FSTUserDataConverter.mm
@@ -17,6 +17,7 @@
#import "Firestore/Source/API/FSTUserDataConverter.h"
#include <memory>
+#include <string>
#include <utility>
#include <vector>
@@ -41,6 +42,7 @@
#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"
namespace util = firebase::firestore::util;
using firebase::firestore::model::ArrayTransform;
@@ -55,7 +57,7 @@ using firebase::firestore::model::TransformOperation;
NS_ASSUME_NONNULL_BEGIN
-static NSString *const RESERVED_FIELD_DESIGNATOR = @"__";
+static const char *RESERVED_FIELD_DESIGNATOR = "__";
#pragma mark - FSTParsedSetData
@@ -277,7 +279,7 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
arrayElement:NO
fieldTransforms:_fieldTransforms
fieldMask:_fieldMask];
- [context validatePathSegment:fieldName];
+ [context validatePathSegment:util::MakeStringView(fieldName)];
return context;
}
@@ -334,15 +336,16 @@ typedef NS_ENUM(NSInteger, FSTUserDataSource) {
if (_path == nullptr) {
return;
}
- for (const auto &segment : *_path) {
- [self validatePathSegment:util::WrapNSStringNoCopy(segment)];
+ for (const std::string &segment : *_path) {
+ [self validatePathSegment:segment];
}
}
-- (void)validatePathSegment:(NSString *)segment {
- if ([self isWrite] && [segment hasPrefix:RESERVED_FIELD_DESIGNATOR] &&
- [segment hasSuffix:RESERVED_FIELD_DESIGNATOR]) {
- FSTThrowInvalidArgument(@"Document fields cannot begin and end with %@%@",
+- (void)validatePathSegment:(absl::string_view)segment {
+ absl::string_view designator{RESERVED_FIELD_DESIGNATOR};
+ if ([self isWrite] && absl::StartsWith(segment, designator) &&
+ absl::EndsWith(segment, designator)) {
+ FSTThrowInvalidArgument(@"Document fields cannot begin and end with %s%@",
RESERVED_FIELD_DESIGNATOR, [self fieldDescription]);
}
}
diff --git a/Firestore/Source/Core/FSTQuery.mm b/Firestore/Source/Core/FSTQuery.mm
index eb6d087..abec474 100644
--- a/Firestore/Source/Core/FSTQuery.mm
+++ b/Firestore/Source/Core/FSTQuery.mm
@@ -753,7 +753,8 @@ NSString *FSTStringFromQueryRelationOperator(FSTRelationFilterOperator filterOpe
return _canonicalID;
}
- NSMutableString *canonicalID = [util::WrapNSStringNoCopy(_path.CanonicalString()) mutableCopy];
+ NSMutableString *canonicalID = [NSMutableString string];
+ [canonicalID appendFormat:@"%s", _path.CanonicalString().c_str()];
// Add filters.
[canonicalID appendString:@"|f:"];
diff --git a/Firestore/Source/Local/FSTLevelDB.mm b/Firestore/Source/Local/FSTLevelDB.mm
index 321d47a..9f75a3e 100644
--- a/Firestore/Source/Local/FSTLevelDB.mm
+++ b/Firestore/Source/Local/FSTLevelDB.mm
@@ -114,10 +114,10 @@ using leveldb::WriteOptions;
// projectIDs are DNS-compatible names and cannot contain dots so there's
// no danger of collisions.
NSString *directory = documentsDirectory;
- directory = [directory
- stringByAppendingPathComponent:util::WrapNSStringNoCopy(databaseInfo.persistence_key())];
+ directory =
+ [directory stringByAppendingPathComponent:util::WrapNSString(databaseInfo.persistence_key())];
- NSString *segment = util::WrapNSStringNoCopy(databaseInfo.database_id().project_id());
+ NSString *segment = util::WrapNSString(databaseInfo.database_id().project_id());
if (!databaseInfo.database_id().IsDefaultDatabase()) {
segment = [NSString
stringWithFormat:@"%@.%s", segment, databaseInfo.database_id().database_id().c_str()];
diff --git a/Firestore/Source/Model/FSTFieldValue.mm b/Firestore/Source/Model/FSTFieldValue.mm
index 6a13511..4acae7d 100644
--- a/Firestore/Source/Model/FSTFieldValue.mm
+++ b/Firestore/Source/Model/FSTFieldValue.mm
@@ -690,13 +690,12 @@ static NSComparisonResult CompareBytes(NSData *left, NSData *right) {
- (NSComparisonResult)compare:(FSTFieldValue *)other {
if ([other isKindOfClass:[FSTReferenceValue class]]) {
FSTReferenceValue *ref = (FSTReferenceValue *)other;
- NSComparisonResult cmp = [util::WrapNSStringNoCopy(self.databaseID->project_id())
- compare:util::WrapNSStringNoCopy(ref.databaseID->project_id())];
+ NSComparisonResult cmp =
+ WrapCompare(self.databaseID->project_id(), ref.databaseID->project_id());
if (cmp != NSOrderedSame) {
return cmp;
}
- cmp = [util::WrapNSStringNoCopy(self.databaseID->database_id())
- compare:util::WrapNSStringNoCopy(ref.databaseID->database_id())];
+ cmp = WrapCompare(self.databaseID->database_id(), ref.databaseID->database_id());
return cmp != NSOrderedSame ? cmp : [self.key compare:ref.key];
} else {
return [self defaultCompare:other];
diff --git a/Firestore/Source/Remote/FSTSerializerBeta.mm b/Firestore/Source/Remote/FSTSerializerBeta.mm
index ab40dd6..263fe6d 100644
--- a/Firestore/Source/Remote/FSTSerializerBeta.mm
+++ b/Firestore/Source/Remote/FSTSerializerBeta.mm
@@ -921,7 +921,7 @@ NS_ASSUME_NONNULL_BEGIN
} else if ([filter isKindOfClass:[FSTNullFilter class]]) {
proto.unaryFilter.op = GCFSStructuredQuery_UnaryFilter_Operator_IsNull;
} else {
- HARD_FAIL("Unrecognized filter: %s", static_cast<id>(filter));
+ HARD_FAIL("Unrecognized filter: %s", filter);
}
return proto;
}
diff --git a/Firestore/core/include/firebase/firestore/CMakeLists.txt b/Firestore/core/include/firebase/firestore/CMakeLists.txt
index e4e7acd..0c7fd48 100644
--- a/Firestore/core/include/firebase/firestore/CMakeLists.txt
+++ b/Firestore/core/include/firebase/firestore/CMakeLists.txt
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Hack to make the headers show up in IDEs
+# Workaround to make the headers show up in IDEs
# (see https://stackoverflow.com/questions/27039019/ and open issue on CMake
# issue tracker: https://gitlab.kitware.com/cmake/cmake/issues/15234)
add_custom_target(firebase_firestore_types_ide SOURCES
diff --git a/Firestore/core/include/firebase/firestore/collection_reference.h b/Firestore/core/include/firebase/firestore/collection_reference.h
new file mode 100644
index 0000000..4d47248
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/collection_reference.h
@@ -0,0 +1,98 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_COLLECTION_REFERENCE_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_COLLECTION_REFERENCE_H_
+
+namespace firebase {
+namespace firestore {
+
+class CollectionReferenceInternal;
+class FirestoreInternal;
+
+/**
+ * A CollectionReference refers to a collection of documents location in a
+ * Firestore database and can be used for adding documents, getting document
+ * references, and querying for documents.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class CollectionReference {
+ public:
+ /**
+ * @brief Default constructor. This creates an invalid CollectionReference.
+ * Attempting to perform any operations on this reference will fail unless a
+ * valid CollectionReference has been assigned to it.
+ */
+ CollectionReference();
+
+ /**
+ * @brief Copy constructor. It's totally okay (and efficient) to copy
+ * CollectionReference instances, as they simply point to the same location in
+ * the database.
+ *
+ * @param[in] reference CollectionReference to copy from.
+ */
+ CollectionReference(const CollectionReference& reference);
+
+ /**
+ * @brief Move constructor. Moving is an efficient operation for
+ * CollectionReference instances.
+ *
+ * @param[in] reference CollectionReference to move data from.
+ */
+ CollectionReference(CollectionReference&& reference);
+
+ /** @brief Required virtual destructor. */
+ virtual ~CollectionReference();
+
+ /**
+ * @brief Copy assignment operator. It's totally okay (and efficient) to copy
+ * CollectionReference instances, as they simply point to the same location in
+ * the database.
+ *
+ * @param[in] reference CollectionReference to copy from.
+ *
+ * @returns Reference to the destination CollectionReference.
+ */
+ CollectionReference& operator=(const CollectionReference& reference);
+
+ /**
+ * @brief Move assignment operator. Moving is an efficient operation for
+ * CollectionReference instances.
+ *
+ * @param[in] reference CollectionReference to move data from.
+ *
+ * @returns Reference to the destination CollectionReference.
+ */
+ CollectionReference& operator=(CollectionReference&& reference);
+
+ protected:
+ explicit CollectionReference(CollectionReferenceInternal* internal);
+
+ private:
+ friend class DocumentReference;
+ friend class DocumentReferenceInternal;
+ friend class FirestoreInternal;
+
+ // TODO(zxu123): investigate possibility to use std::unique_ptr or
+ // firebase::UniquePtr.
+ CollectionReferenceInternal* internal_ = nullptr;
+};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_COLLECTION_REFERENCE_H_
diff --git a/Firestore/core/include/firebase/firestore/document_change.h b/Firestore/core/include/firebase/firestore/document_change.h
new file mode 100644
index 0000000..4812290
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/document_change.h
@@ -0,0 +1,34 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_CHANGE_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_CHANGE_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A DocumentChange represents a change to the documents matching a query. It
+ * contains the document affected and the type of change that occurred (added,
+ * modified, or removed).
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class DocumentChange {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_CHANGE_H_
diff --git a/Firestore/core/include/firebase/firestore/document_reference.h b/Firestore/core/include/firebase/firestore/document_reference.h
index d295188..9385ed3 100644
--- a/Firestore/core/include/firebase/firestore/document_reference.h
+++ b/Firestore/core/include/firebase/firestore/document_reference.h
@@ -29,6 +29,17 @@
#include <functional>
#endif
+#include "firebase/app.h"
+#include "firebase/firestore/collection_reference.h"
+#include "firebase/firestore/document_snapshot.h"
+#include "firebase/firestore/event_listener.h"
+#include "firebase/firestore/field_value.h"
+#include "firebase/firestore/firestore.h"
+#include "firebase/firestore/firestore_errors.h"
+#include "firebase/firestore/listener_registration.h"
+#include "firebase/firestore/set_options.h"
+#include "firebase/future.h"
+
// TODO(rsgowman): Note that RTDB uses:
// #if defined(FIREBASE_USE_MOVE_OPERATORS) || defined(DOXYGEN
// to protect move operators from older compilers. But all our supported
@@ -36,34 +47,12 @@
// here so we don't forget to mention this during the API review, and should be
// removed once this note has migrated to the API review doc.
-// TODO(rsgowman): replace these forward decls with appropriate includes (once
-// they exist)
-namespace firebase {
-class App;
-template <typename T>
-class Future;
-} // namespace firebase
-
namespace firebase {
namespace firestore {
-// TODO(rsgowman): replace these forward decls with appropriate includes (once
-// they exist)
-class FieldValue;
-class DocumentSnapshot;
+class DocumentReferenceInternal;
class Firestore;
-class Error;
-template <typename T>
-class EventListener;
-class ListenerRegistration;
-class CollectionReference;
-class DocumentListenOptions;
-// TODO(rsgowman): not quite a forward decl, but required to make the default
-// parameter to Set() "compile".
-class SetOptions {
- public:
- SetOptions();
-};
+class FirestoreInternal;
// TODO(rsgowman): move this into the FieldValue header
#ifdef STLPORT
@@ -80,12 +69,19 @@ using MapFieldValue = std::unordered_map<std::string, FieldValue>;
*
* Create a DocumentReference via Firebase::Document(const string& path).
*
+ * NOT thread-safe: an instance should not be used from multiple threads
+ *
* Subclassing Note: Firestore classes are not meant to be subclassed except for
* use in test mocks. Subclassing is not supported in production code and new
* SDK releases may break code that does so.
*/
class DocumentReference {
public:
+ enum class MetadataChanges {
+ kExclude,
+ kInclude,
+ };
+
/**
* @brief Default constructor. This creates an invalid DocumentReference.
* Attempting to perform any operations on this reference will fail (and cause
@@ -269,28 +265,15 @@ class DocumentReference {
* this DocumentReference. (Ownership is not transferred; you are responsible
* for making sure that listener is valid as long as this DocumentReference is
* valid and the listener is registered.)
+ * @param[in] metadata_changes Indicates whether metadata-only changes (i.e.
+ * only DocumentSnapshot.getMetadata() changed) should trigger snapshot
+ * events.
*
* @return A registration object that can be used to remove the listener.
*/
virtual ListenerRegistration AddSnapshotListener(
- EventListener<DocumentSnapshot>* listener);
-
- /**
- * @brief Starts listening to the document referenced by this
- * DocumentReference.
- *
- * @param[in] options The options to use for this listen.
- * @param[in] listener The event listener that will be called with the
- * snapshots, which must remain in memory until you remove the listener from
- * this DocumentReference. (Ownership is not transferred; you are responsible
- * for making sure that listener is valid as long as this DocumentReference is
- * valid and the listener is registered.)
- *
- * @return A registration object that can be used to remove the listener.
- */
- virtual ListenerRegistration AddSnapshotListener(
- const DocumentListenOptions& options,
- EventListener<DocumentSnapshot>* listener);
+ EventListener<DocumentSnapshot>* listener,
+ MetadataChanges metadata_changes = MetadataChanges::kExclude);
#if defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
/**
@@ -299,6 +282,9 @@ class DocumentReference {
*
* @param[in] callback function or lambda to call. When this function is
* called, exactly one of the parameters will be non-null.
+ * @param[in] metadata_changes Indicates whether metadata-only changes (i.e.
+ * only DocumentSnapshot.getMetadata() changed) should trigger snapshot
+ * events.
*
* @return A registration object that can be used to remove the listener.
*
@@ -306,28 +292,21 @@ class DocumentReference {
* std::function is not supported on STLPort.
*/
virtual ListenerRegistration AddSnapshotListener(
- std::function<void(const DocumentSnapshot*, const Error*)> callback);
-
- /**
- * @brief Starts listening to the document referenced by this
- * DocumentReference.
- *
- * @param[in] options The options to use for this listen.
- * @param[in] callback function or lambda to call. When this function is
- * called, exactly one of the parameters will be non-null.
- *
- * @return A registration object that can be used to remove the listener.
- *
- * @note This method is not available when using STLPort on Android, as
- * std::function is not supported on STLPort.
- */
- virtual ListenerRegistration AddSnapshotListener(
- const DocumentListenOptions& options,
- std::function<void(const DocumentSnapshot*, const Error*)> callback);
+ std::function<void(const DocumentSnapshot*, const Error*)> callback,
+ MetadataChanges metadata_changes = MetadataChanges::kExclude);
#endif // defined(FIREBASE_USE_STD_FUNCTION) || defined(DOXYGEN)
+
+ protected:
+ explicit DocumentReference(DocumentReferenceInternal* internal);
+
+ private:
+ friend class FirestoreInternal;
+
+ // TODO(zxu123): investigate possibility to use std::unique_ptr or
+ // firebase::UniquePtr.
+ DocumentReferenceInternal* internal_ = nullptr;
};
-// TODO(rsgowman): probably define and inline here.
bool operator==(const DocumentReference& lhs, const DocumentReference& rhs);
inline bool operator!=(const DocumentReference& lhs,
diff --git a/Firestore/core/include/firebase/firestore/document_snapshot.h b/Firestore/core/include/firebase/firestore/document_snapshot.h
new file mode 100644
index 0000000..3be72b5
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/document_snapshot.h
@@ -0,0 +1,38 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_SNAPSHOT_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_SNAPSHOT_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A DocumentSnapshot contains data read from a document in your Firestore
+ * database. The data can be extracted with the data() method or by using
+ * FooValue() to access a specific field, where Foo is the type of that field.
+ *
+ * For a DocumentSnapshot that points to a non-existing document, any data
+ * access will cause a failed assertion. You can use the exists() method to
+ * explicitly verify a documents existence.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class DocumentSnapshot {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_DOCUMENT_SNAPSHOT_H_
diff --git a/Firestore/core/include/firebase/firestore/event_listener.h b/Firestore/core/include/firebase/firestore/event_listener.h
index 6c94428..cbe8a28 100644
--- a/Firestore/core/include/firebase/firestore/event_listener.h
+++ b/Firestore/core/include/firebase/firestore/event_listener.h
@@ -22,19 +22,19 @@
#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_EVENT_LISTENER_H_
#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_EVENT_LISTENER_H_
+#include "firebase/firestore/firestore_errors.h"
+
namespace firebase {
namespace firestore {
-// TODO(rsgowman): replace these forward decl's with appropriate includes (once
-// they exist)
-class Error;
-
/**
* @brief An interface for event listeners.
*/
template <typename T>
class EventListener {
public:
+ virtual ~EventListener() {
+ }
/**
* @brief OnEvent will be called with the new value or the error if an error
* occurred.
@@ -44,7 +44,7 @@ class EventListener {
* @param value The value of the event. null if there was an error.
* @param error The error if there was error. null otherwise.
*/
- void OnEvent(const T* value, const Error* error);
+ virtual void OnEvent(const T* value, const Error* error) = 0;
};
} // namespace firestore
diff --git a/Firestore/core/include/firebase/firestore/field_path.h b/Firestore/core/include/firebase/firestore/field_path.h
new file mode 100644
index 0000000..29e1dea
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/field_path.h
@@ -0,0 +1,34 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_FIELD_PATH_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIELD_PATH_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A FieldPath refers to a field in a document. The path may consist of a single
+ * field name (referring to a top level field in the document), or a list of
+ * field names (referring to a nested field in the document).
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class FieldPath {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIELD_PATH_H_
diff --git a/Firestore/core/include/firebase/firestore/field_value.h b/Firestore/core/include/firebase/firestore/field_value.h
new file mode 100644
index 0000000..d919de4
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/field_value.h
@@ -0,0 +1,33 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_FIELD_VALUE_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIELD_VALUE_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * Sentinel values that can be used when writing document fields with setData()
+ * or updateData().
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class FieldValue {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIELD_VALUE_H_
diff --git a/Firestore/core/include/firebase/firestore/firestore.h b/Firestore/core/include/firebase/firestore/firestore.h
index 793fdd0..6591a72 100644
--- a/Firestore/core/include/firebase/firestore/firestore.h
+++ b/Firestore/core/include/firebase/firestore/firestore.h
@@ -22,23 +22,19 @@
#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_H_
#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_FIRESTORE_H_
+#include <memory>
#include <string>
-// TODO(rsgowman): replace these forward decl's with appropriate includes (once
-// they exist)
-namespace firebase {
-class App;
-class InitResult;
-} // namespace firebase
+#include "firebase/app.h"
+#include "firebase/firestore/collection_reference.h"
+#include "firebase/firestore/document_reference.h"
+#include "firebase/firestore/settings.h"
namespace firebase {
namespace firestore {
-// TODO(rsgowman): replace these forward decl's with appropriate includes (once
-// they exist)
class DocumentReference;
-class CollectionReference;
-class Settings;
+class FirestoreInternal;
/**
* @brief Entry point for the Firebase Firestore C++ SDK.
@@ -152,6 +148,16 @@ class Firestore {
/** Globally enables / disables Firestore logging for the SDK. */
static void set_logging_enabled(bool logging_enabled);
+
+ Firestore(const Firestore& src) = delete;
+ Firestore& operator=(const Firestore& src) = delete;
+
+ private:
+ explicit Firestore(::firebase::App* app);
+
+ // TODO(zxu123): investigate possibility to use std::unique_ptr or
+ // firebase::UniquePtr.
+ FirestoreInternal* internal_ = nullptr;
};
} // namespace firestore
diff --git a/Firestore/core/include/firebase/firestore/firestore_errors.h b/Firestore/core/include/firebase/firestore/firestore_errors.h
index 7a0ff7c..92c0c92 100644
--- a/Firestore/core/include/firebase/firestore/firestore_errors.h
+++ b/Firestore/core/include/firebase/firestore/firestore_errors.h
@@ -109,6 +109,10 @@ enum FirestoreErrorCode {
Unauthenticated = 16
};
+// TODO(zxu123): decide whether we actually want an Error class or just use
+// enum.
+using Error = FirestoreErrorCode;
+
} // namespace firestore
} // namespace firebase
diff --git a/Firestore/core/include/firebase/firestore/listener_registration.h b/Firestore/core/include/firebase/firestore/listener_registration.h
new file mode 100644
index 0000000..a37c2aa
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/listener_registration.h
@@ -0,0 +1,92 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_LISTENER_REGISTRATION_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_LISTENER_REGISTRATION_H_
+
+namespace firebase {
+namespace firestore {
+
+class FirestoreInternal;
+class ListenerRegistrationInternal;
+
+/** Represents a listener that can be removed by calling remove. */
+class ListenerRegistration {
+ public:
+ /**
+ * @brief Default constructor. This creates a no-op instance.
+ */
+ ListenerRegistration();
+
+ /**
+ * @brief Copy constructor. It's totally okay to copy ListenerRegistration
+ * instances.
+ *
+ * @param[in] registration ListenerRegistration to copy from.
+ */
+ ListenerRegistration(const ListenerRegistration& registration);
+
+ /**
+ * @brief Move constructor. Moving is an efficient operation for
+ * ListenerRegistration instances.
+ *
+ * @param[in] registration ListenerRegistration to move data from.
+ */
+ ListenerRegistration(ListenerRegistration&& registration);
+
+ ~ListenerRegistration();
+
+ /**
+ * @brief Copy assignment operator. It's totally okay to copy
+ * ListenerRegistration instances.
+ *
+ * @param[in] registration ListenerRegistration to copy from.
+ *
+ * @returns Reference to the destination ListenerRegistration.
+ */
+ ListenerRegistration& operator=(const ListenerRegistration& registration);
+
+ /**
+ * @brief Move assignment operator. Moving is an efficient operation for
+ * ListenerRegistration instances.
+ *
+ * @param[in] registration ListenerRegistration to move data from.
+ *
+ * @returns Reference to the destination ListenerRegistration.
+ */
+ ListenerRegistration& operator=(ListenerRegistration&& registration);
+
+ /**
+ * Removes the listener being tracked by this ListenerRegistration. After the
+ * initial call, subsequent calls have no effect.
+ */
+ void Remove();
+
+ private:
+ friend class DocumentReferenceInternal;
+ friend class ListenerRegistrationInternal;
+ friend class FirestoreInternal;
+
+ explicit ListenerRegistration(ListenerRegistrationInternal* internal);
+
+ FirestoreInternal* firestore_ = nullptr;
+ ListenerRegistrationInternal* internal_ = nullptr;
+};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_LISTENER_REGISTRATION_H_
diff --git a/Firestore/core/include/firebase/firestore/query.h b/Firestore/core/include/firebase/firestore/query.h
new file mode 100644
index 0000000..da6dfdd
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/query.h
@@ -0,0 +1,33 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_QUERY_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_QUERY_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A Query which you can read or listen to. You can also construct refined
+ * Query objects by adding filters and ordering.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class Query {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_QUERY_H_
diff --git a/Firestore/core/include/firebase/firestore/query_snapshot.h b/Firestore/core/include/firebase/firestore/query_snapshot.h
new file mode 100644
index 0000000..ffa2bd6
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/query_snapshot.h
@@ -0,0 +1,34 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_QUERY_SNAPSHOT_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_QUERY_SNAPSHOT_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A QuerySnapshot contains zero or more DocumentSnapshot objects. It can be
+ * iterated using a range-based for loop and its size can be inspected with
+ * empty() and count().
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class QuerySnapshot {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_QUERY_SNAPSHOT_H_
diff --git a/Firestore/core/include/firebase/firestore/set_options.h b/Firestore/core/include/firebase/firestore/set_options.h
new file mode 100644
index 0000000..802f3b5
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/set_options.h
@@ -0,0 +1,39 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_SET_OPTIONS_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SET_OPTIONS_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * An options object that configures the behavior of Set() calls. By providing
+ * the SetOptions objects returned by Merge(), the Set() methods in
+ * DocumentReference, WriteBatch and Transaction can be configured to perform
+ * granular merges instead of overwriting the target documents in their
+ * entirety.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class SetOptions {
+ public:
+ SetOptions();
+};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SET_OPTIONS_H_
diff --git a/Firestore/core/include/firebase/firestore/settings.h b/Firestore/core/include/firebase/firestore/settings.h
new file mode 100644
index 0000000..9356b26
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/settings.h
@@ -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.
+ */
+
+#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SETTINGS_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SETTINGS_H_
+
+namespace firebase {
+namespace firestore {
+
+class SettingsInternal;
+
+/** Settings used to configure a Firestore instance. */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class Settings {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SETTINGS_H_
diff --git a/Firestore/core/include/firebase/firestore/snapshot_metadata.h b/Firestore/core/include/firebase/firestore/snapshot_metadata.h
new file mode 100644
index 0000000..9bcc54c
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/snapshot_metadata.h
@@ -0,0 +1,46 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_SNAPSHOT_METADATA_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SNAPSHOT_METADATA_H_
+
+namespace firebase {
+namespace firestore {
+
+/** Metadata about a snapshot, describing the state of the snapshot. */
+class SnapshotMetadata {
+ public:
+ SnapshotMetadata(bool has_pending_writes, bool is_from_cache)
+ : has_pending_writes_(has_pending_writes), is_from_cache_(is_from_cache) {
+ }
+
+ bool has_pending_writes() const {
+ return has_pending_writes_;
+ }
+
+ bool is_from_cache() const {
+ return is_from_cache_;
+ }
+
+ private:
+ const bool has_pending_writes_;
+ const bool is_from_cache_;
+};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_SNAPSHOT_METADATA_H_
diff --git a/Firestore/core/include/firebase/firestore/transaction.h b/Firestore/core/include/firebase/firestore/transaction.h
new file mode 100644
index 0000000..be043b8
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/transaction.h
@@ -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.
+ */
+
+#ifndef FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_TRANSACTION_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_TRANSACTION_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * Transaction provides methods to read and write data within a transaction.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class Transaction {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_TRANSACTION_H_
diff --git a/Firestore/core/include/firebase/firestore/write_batch.h b/Firestore/core/include/firebase/firestore/write_batch.h
new file mode 100644
index 0000000..bd2c12f
--- /dev/null
+++ b/Firestore/core/include/firebase/firestore/write_batch.h
@@ -0,0 +1,39 @@
+/*
+ * 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_INCLUDE_FIREBASE_FIRESTORE_WRITE_BATCH_H_
+#define FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_WRITE_BATCH_H_
+
+namespace firebase {
+namespace firestore {
+
+/**
+ * A write batch is used to perform multiple writes as a single atomic unit.
+ *
+ * A WriteBatch object provides methods for adding writes to the write batch.
+ * None of the writes will be committed (or visible locally) until commit() is
+ * called.
+ *
+ * Unlike transactions, write batches are persisted offline and therefore are
+ * preferable when you don't need to condition your writes on read data.
+ */
+// TODO(zxu123): add more methods to complete the class and make it useful.
+class WriteBatch {};
+
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_INCLUDE_FIREBASE_FIRESTORE_WRITE_BATCH_H_
diff --git a/Firestore/core/src/firebase/firestore/nanopb/reader.cc b/Firestore/core/src/firebase/firestore/nanopb/reader.cc
index 7a12900..69e3d83 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.pb.h"
+#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h"
namespace firebase {
namespace firestore {
@@ -136,6 +136,14 @@ std::string Reader::ReadString() {
return result;
}
+void Reader::SkipField(const Tag& tag) {
+ if (!status_.ok()) return;
+
+ if (!pb_skip_field(&stream_, tag.wire_type)) {
+ status_ = Status(FirestoreErrorCode::DataLoss, PB_GET_ERROR(&stream_));
+ }
+}
+
} // namespace nanopb
} // namespace firestore
} // namespace firebase
diff --git a/Firestore/core/src/firebase/firestore/nanopb/reader.h b/Firestore/core/src/firebase/firestore/nanopb/reader.h
index 930211a..2c16ec4 100644
--- a/Firestore/core/src/firebase/firestore/nanopb/reader.h
+++ b/Firestore/core/src/firebase/firestore/nanopb/reader.h
@@ -89,6 +89,15 @@ class Reader {
template <typename T>
T ReadNestedMessage(const std::function<T(Reader*)>& read_message_fn);
+ /**
+ * Discards the bytes associated with the given tag.
+ *
+ * @param tag The tag associated with the field that is otherwise about to be
+ * read. This method uses the tag to determine how many bytes should be
+ * discarded.
+ */
+ void SkipField(const Tag& tag);
+
size_t bytes_left() const {
return stream_.bytes_left;
}
diff --git a/Firestore/core/src/firebase/firestore/nanopb/writer.cc b/Firestore/core/src/firebase/firestore/nanopb/writer.cc
index c3ffaac..7f32d4e 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.pb.h"
+#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h"
namespace firebase {
namespace firestore {
diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc
index 6ea5844..19a068b 100644
--- a/Firestore/core/src/firebase/firestore/remote/serializer.cc
+++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc
@@ -24,8 +24,8 @@
#include <string>
#include <utility>
-#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h"
-#include "Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h"
+#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.nanopb.h"
+#include "Firestore/Protos/nanopb/google/firestore/v1beta1/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"
@@ -167,77 +167,102 @@ void EncodeFieldValueImpl(Writer* writer, const FieldValue& field_value) {
FieldValue DecodeFieldValueImpl(Reader* reader) {
if (!reader->status().ok()) return FieldValue::NullValue();
- Tag tag = reader->ReadTag();
- if (!reader->status().ok()) return FieldValue::NullValue();
+ // There needs to be at least one entry in the FieldValue.
+ if (reader->bytes_left() == 0) {
+ reader->set_status(Status(FirestoreErrorCode::DataLoss,
+ "Input Value proto missing contents"));
+ return FieldValue::NullValue();
+ }
- // Ensure the tag matches the wire type
- switch (tag.field_number) {
- case google_firestore_v1beta1_Value_null_value_tag:
- case google_firestore_v1beta1_Value_boolean_value_tag:
- case google_firestore_v1beta1_Value_integer_value_tag:
- if (tag.wire_type != PB_WT_VARINT) {
- reader->set_status(
- Status(FirestoreErrorCode::DataLoss,
- "Input proto bytes cannot be parsed (mismatch between "
- "the wiretype and the field number (tag))"));
- }
- break;
+ FieldValue result = FieldValue::NullValue();
- case google_firestore_v1beta1_Value_string_value_tag:
- case google_firestore_v1beta1_Value_timestamp_value_tag:
- case google_firestore_v1beta1_Value_map_value_tag:
- if (tag.wire_type != PB_WT_STRING) {
- reader->set_status(
- Status(FirestoreErrorCode::DataLoss,
- "Input proto bytes cannot be parsed (mismatch between "
- "the wiretype and the field number (tag))"));
- }
- break;
+ while (reader->bytes_left()) {
+ Tag tag = reader->ReadTag();
+ if (!reader->status().ok()) return FieldValue::NullValue();
- default:
- // We could get here for one of two reasons; either because the input
- // bytes are corrupt, or because we're attempting to parse a tag that we
- // haven't implemented yet. Long term, the latter reason should become
- // less likely (especially in production), so we'll assume former.
-
- // TODO(rsgowman): While still in development, we'll contradict the above
- // and assume the latter. Remove the following assertion when we're
- // confident that we're handling all the tags in the protos.
- HARD_FAIL(
- "Unhandled message field number (tag): %s. (Or possibly "
- "corrupt input bytes)",
- tag.field_number);
- reader->set_status(Status(
- FirestoreErrorCode::DataLoss,
- "Input proto bytes cannot be parsed (invalid field number (tag))"));
- }
+ // Ensure the tag matches the wire type
+ switch (tag.field_number) {
+ case google_firestore_v1beta1_Value_null_value_tag:
+ case google_firestore_v1beta1_Value_boolean_value_tag:
+ case google_firestore_v1beta1_Value_integer_value_tag:
+ if (tag.wire_type != PB_WT_VARINT) {
+ reader->set_status(
+ Status(FirestoreErrorCode::DataLoss,
+ "Input proto bytes cannot be parsed (mismatch between "
+ "the wiretype and the field number (tag))"));
+ }
+ break;
- if (!reader->status().ok()) return FieldValue::NullValue();
+ case google_firestore_v1beta1_Value_string_value_tag:
+ case google_firestore_v1beta1_Value_timestamp_value_tag:
+ case google_firestore_v1beta1_Value_map_value_tag:
+ if (tag.wire_type != PB_WT_STRING) {
+ reader->set_status(
+ Status(FirestoreErrorCode::DataLoss,
+ "Input proto bytes cannot be parsed (mismatch between "
+ "the wiretype and the field number (tag))"));
+ }
+ break;
- switch (tag.field_number) {
- case google_firestore_v1beta1_Value_null_value_tag:
- reader->ReadNull();
- return FieldValue::NullValue();
- case google_firestore_v1beta1_Value_boolean_value_tag:
- return FieldValue::BooleanValue(reader->ReadBool());
- case google_firestore_v1beta1_Value_integer_value_tag:
- return FieldValue::IntegerValue(reader->ReadInteger());
- case google_firestore_v1beta1_Value_string_value_tag:
- return FieldValue::StringValue(reader->ReadString());
- case google_firestore_v1beta1_Value_timestamp_value_tag:
- return FieldValue::TimestampValue(
- reader->ReadNestedMessage<Timestamp>(DecodeTimestamp));
- case google_firestore_v1beta1_Value_map_value_tag:
- return FieldValue::ObjectValueFromMap(
- reader->ReadNestedMessage<ObjectValue::Map>(DecodeMapValue));
+ 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:
+ // TODO(b/74243929): Implement remaining types.
+ HARD_FAIL("Unhandled message field number (tag): %i.",
+ tag.field_number);
- default:
- // This indicates an internal error as we've already ensured that this is
- // a valid field_number.
- HARD_FAIL(
- "Somehow got an unexpected field number (tag) after verifying that "
- "the field number was expected.");
+ default:
+ // Unknown tag. According to the proto spec, we need to ignore these. No
+ // action required here, though we'll need to skip the relevant bytes
+ // below.
+ break;
+ }
+
+ if (!reader->status().ok()) return FieldValue::NullValue();
+
+ switch (tag.field_number) {
+ case google_firestore_v1beta1_Value_null_value_tag:
+ reader->ReadNull();
+ result = FieldValue::NullValue();
+ break;
+ case google_firestore_v1beta1_Value_boolean_value_tag:
+ result = FieldValue::BooleanValue(reader->ReadBool());
+ break;
+ case google_firestore_v1beta1_Value_integer_value_tag:
+ result = FieldValue::IntegerValue(reader->ReadInteger());
+ break;
+ case google_firestore_v1beta1_Value_string_value_tag:
+ result = FieldValue::StringValue(reader->ReadString());
+ break;
+ case google_firestore_v1beta1_Value_timestamp_value_tag:
+ result = FieldValue::TimestampValue(
+ reader->ReadNestedMessage<Timestamp>(DecodeTimestamp));
+ break;
+ case google_firestore_v1beta1_Value_map_value_tag:
+ // TODO(rsgowman): We should merge the existing map (if any) with the
+ // newly parsed map.
+ result = FieldValue::ObjectValueFromMap(
+ reader->ReadNestedMessage<ObjectValue::Map>(DecodeMapValue));
+ 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:
+ // TODO(b/74243929): Implement remaining types.
+ HARD_FAIL("Unhandled message field number (tag): %i.",
+ tag.field_number);
+
+ default:
+ // Unknown tag. According to the proto spec, we need to ignore these.
+ reader->SkipField(tag);
+ }
}
+
+ return result;
}
/**
@@ -504,7 +529,7 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
// Initialize BatchGetDocumentsResponse fields to their default values
std::unique_ptr<MaybeDocument> found;
std::string missing;
- // TODO(rsgowman): transaction
+ // We explicitly ignore the 'transaction' field
SnapshotVersion read_time = SnapshotVersion::None();
while (reader->bytes_left()) {
@@ -515,6 +540,7 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
switch (tag.field_number) {
case google_firestore_v1beta1_BatchGetDocumentsResponse_found_tag:
case google_firestore_v1beta1_BatchGetDocumentsResponse_missing_tag:
+ case google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag:
case google_firestore_v1beta1_BatchGetDocumentsResponse_read_time_tag:
if (tag.wire_type != PB_WT_STRING) {
reader->set_status(
@@ -524,14 +550,11 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
}
break;
- case google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag:
- // TODO(rsgowman)
- abort();
-
default:
- reader->set_status(Status(
- FirestoreErrorCode::DataLoss,
- "Input proto bytes cannot be parsed (invalid field number (tag))"));
+ // Unknown tag. According to the proto spec, we need to ignore these. No
+ // action required here, though we'll need to skip the relevant bytes
+ // below.
+ break;
}
if (!reader->status().ok()) return nullptr;
@@ -559,8 +582,13 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
break;
case google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag:
- // TODO(rsgowman)
- abort();
+ // This field is ignored by the client sdk, but we still need to extract
+ // it.
+ // TODO(rsgowman) switch this to reader->SkipField() (or whatever we end
+ // up calling it) once that exists. Possibly group this with other
+ // ignored and/or unknown fields
+ reader->ReadString();
+ break;
case google_firestore_v1beta1_BatchGetDocumentsResponse_read_time_tag:
read_time = SnapshotVersion{
@@ -568,11 +596,8 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
break;
default:
- // This indicates an internal error as we've already ensured that this
- // is a valid field_number.
- HARD_FAIL(
- "Somehow got an unexpected field number (tag) after verifying that "
- "the field number was expected.");
+ // Unknown tag. According to the proto spec, we need to ignore these.
+ reader->SkipField(tag);
}
}
@@ -581,9 +606,10 @@ std::unique_ptr<MaybeDocument> Serializer::DecodeBatchGetDocumentsResponse(
} else if (!missing.empty()) {
return absl::make_unique<NoDocument>(DecodeKey(missing), read_time);
} else {
- // Neither 'found' nor 'missing' fields were set.
- // TODO(rsgowman): Handle the error case.
- abort();
+ reader->set_status(Status(FirestoreErrorCode::DataLoss,
+ "Invalid BatchGetDocumentsReponse message: "
+ "Neither 'found' nor 'missing' fields set."));
+ return nullptr;
}
}
diff --git a/Firestore/core/src/firebase/firestore/util/CMakeLists.txt b/Firestore/core/src/firebase/firestore/util/CMakeLists.txt
index 043713f..30589a0 100644
--- a/Firestore/core/src/firebase/firestore/util/CMakeLists.txt
+++ b/Firestore/core/src/firebase/firestore/util/CMakeLists.txt
@@ -29,6 +29,7 @@ cc_library(
absl_strings
)
+
## assert and log
cc_library(
@@ -158,16 +159,6 @@ else()
endif()
-cc_library(
- firebase_firestore_util_async_queue
- SOURCES
- async_queue.cc
- async_queue.h
- DEPENDS
- ${FIREBASE_FIRESTORE_UTIL_EXECUTOR}
- ${FIREBASE_FIRESTORE_UTIL_LOG}
- EXCLUDE_FROM_ALL
-)
## main library
@@ -179,6 +170,8 @@ configure_file(
cc_library(
firebase_firestore_util
SOURCES
+ async_queue.cc
+ async_queue.h
autoid.cc
autoid.h
bits.cc
@@ -200,10 +193,11 @@ cc_library(
statusor_internals.h
string_util.cc
string_util.h
+ type_traits.h
DEPENDS
absl_base
firebase_firestore_util_base
- firebase_firestore_util_async_queue
+ ${FIREBASE_FIRESTORE_UTIL_EXECUTOR}
${FIREBASE_FIRESTORE_UTIL_LOG}
${FIREBASE_FIRESTORE_UTIL_RANDOM}
)
diff --git a/Firestore/core/src/firebase/firestore/util/comparison.cc b/Firestore/core/src/firebase/firestore/util/comparison.cc
index 5ac4c27..d1cdbfa 100644
--- a/Firestore/core/src/firebase/firestore/util/comparison.cc
+++ b/Firestore/core/src/firebase/firestore/util/comparison.cc
@@ -31,6 +31,12 @@ bool Comparator<absl::string_view>::operator()(
return left < right;
}
+bool Comparator<std::string>::operator()(const std::string& left,
+ const std::string& right) const {
+ // TODO(wilhuff): truncation aware comparison
+ return left < right;
+}
+
bool Comparator<double>::operator()(double left, double right) const {
// NaN sorts equal to itself and before any other number.
if (left < right) {
diff --git a/Firestore/core/src/firebase/firestore/util/comparison.h b/Firestore/core/src/firebase/firestore/util/comparison.h
index d7f4dfd..a7d7944 100644
--- a/Firestore/core/src/firebase/firestore/util/comparison.h
+++ b/Firestore/core/src/firebase/firestore/util/comparison.h
@@ -86,6 +86,11 @@ struct Comparator<absl::string_view> {
const absl::string_view& right) const;
};
+template <>
+struct Comparator<std::string> {
+ bool operator()(const std::string& left, const std::string& right) const;
+};
+
/** Compares two bools: false < true. */
template <>
struct Comparator<bool> : public std::less<bool> {};
diff --git a/Firestore/core/src/firebase/firestore/util/hard_assert_apple.mm b/Firestore/core/src/firebase/firestore/util/hard_assert_apple.mm
index 3324fe8..6abd324 100644
--- a/Firestore/core/src/firebase/firestore/util/hard_assert_apple.mm
+++ b/Firestore/core/src/firebase/firestore/util/hard_assert_apple.mm
@@ -32,8 +32,8 @@ void Fail(const char* file,
const int line,
const std::string& message) {
[[NSAssertionHandler currentHandler]
- handleFailureInFunction:WrapNSStringNoCopy(func)
- file:WrapNSStringNoCopy(file)
+ handleFailureInFunction:WrapNSString(func)
+ file:WrapNSString(file)
lineNumber:line
description:@"FIRESTORE INTERNAL ASSERTION FAILED: %s",
message.c_str()];
diff --git a/Firestore/core/src/firebase/firestore/util/hashing.h b/Firestore/core/src/firebase/firestore/util/hashing.h
index d8058c8..21c0bd6 100644
--- a/Firestore/core/src/firebase/firestore/util/hashing.h
+++ b/Firestore/core/src/firebase/firestore/util/hashing.h
@@ -18,6 +18,7 @@
#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_UTIL_HASHING_H_
#include <iterator>
+#include <string>
#include <type_traits>
namespace firebase {
@@ -49,6 +50,41 @@ namespace util {
namespace impl {
/**
+ * A type trait that identifies whether or not std::hash is available for a
+ * given type.
+ *
+ * This type should not be necessary since specialization failure on an
+ * expression like `decltype(std::hash<K>{}(value)` should be enough to disable
+ * overloads that require `std::hash` to be defined but unfortunately some
+ * standard libraries ship with std::hash defined for all types that only
+ * fail later (e.g. via static_assert). One such implementation is the libc++
+ * that ships with Xcode 8.3.3, which is a supported platform.
+ */
+template <typename T>
+struct has_std_hash {
+ // There may be other types for which std::hash is defined but they don't
+ // matter for our purposes.
+ enum {
+ value = std::is_arithmetic<T>{} || std::is_pointer<T>{} ||
+ std::is_same<T, std::string>{}
+ };
+
+ constexpr operator bool() const {
+ return value;
+ }
+};
+
+/**
+ * A type that's equivalent to size_t if std::hash<T> is defined or a compile
+ * error otherwise.
+ *
+ * This is effectively just a safe implementation of
+ * `decltype(std::hash<T>{}(std::declval<T>()))`.
+ */
+template <typename T>
+using std_hash_type = typename std::enable_if<has_std_hash<T>{}, size_t>::type;
+
+/**
* Combines a hash_value with whatever accumulated state there is so far.
*/
inline size_t Combine(size_t state, size_t hash_value) {
@@ -100,8 +136,7 @@ auto RankedInvokeHash(const K& value, HashChoice<0>) -> decltype(value.Hash()) {
* @return The result of `std::hash<K>{}(value)`
*/
template <typename K>
-auto RankedInvokeHash(const K& value, HashChoice<1>)
- -> decltype(std::hash<K>{}(value)) {
+std_hash_type<K> RankedInvokeHash(const K& value, HashChoice<1>) {
return std::hash<K>{}(value);
}
diff --git a/Firestore/core/src/firebase/firestore/util/string_format.h b/Firestore/core/src/firebase/firestore/util/string_format.h
index d691984..01776a9 100644
--- a/Firestore/core/src/firebase/firestore/util/string_format.h
+++ b/Firestore/core/src/firebase/firestore/util/string_format.h
@@ -22,6 +22,7 @@
#include <utility>
#include "Firestore/core/src/firebase/firestore/util/string_apple.h"
+#include "Firestore/core/src/firebase/firestore/util/type_traits.h"
#include "absl/base/attributes.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
@@ -43,7 +44,7 @@ template <int I>
struct FormatChoice : FormatChoice<I + 1> {};
template <>
-struct FormatChoice<4> {};
+struct FormatChoice<5> {};
} // namespace internal
@@ -87,8 +88,8 @@ class FormatArg : public absl::AlphaNum {
*/
template <
typename T,
- typename = typename std::enable_if<std::is_base_of<NSObject, T>{}>::type>
- FormatArg(T* object, internal::FormatChoice<0>)
+ typename = typename std::enable_if<is_objective_c_pointer<T>{}>::type>
+ FormatArg(T object, internal::FormatChoice<1>)
: AlphaNum{MakeStringView([object description])} {
}
@@ -96,20 +97,9 @@ class FormatArg : public absl::AlphaNum {
* Creates a FormatArg from any Objective-C Class type. Objective-C Class
* types are a special struct that aren't of a type derived from NSObject.
*/
- FormatArg(Class object, internal::FormatChoice<0>)
+ FormatArg(Class object, internal::FormatChoice<1>)
: AlphaNum{MakeStringView(NSStringFromClass(object))} {
}
-
- /**
- * Creates a FormatArg from any id pointer. Note that instances of `id<Foo>`
- * (which means "pointer conforming to the protocol Foo") do not match this
- * without first casting to type `id`. There's no way to express a template of
- * `id<T>` since `id<Foo>` isn't actually a C++ template and `id` isn't a
- * parameterized C++ class.
- */
- FormatArg(id object, internal::FormatChoice<0>)
- : AlphaNum{MakeStringView([object description])} {
- }
#endif
/**
@@ -117,7 +107,7 @@ class FormatArg : public absl::AlphaNum {
* handled specially to avoid ambiguity with generic pointers, which are
* handled differently.
*/
- FormatArg(std::nullptr_t, internal::FormatChoice<1>) : AlphaNum{"null"} {
+ FormatArg(std::nullptr_t, internal::FormatChoice<2>) : AlphaNum{"null"} {
}
/**
@@ -125,7 +115,7 @@ class FormatArg : public absl::AlphaNum {
* handled specially to avoid ambiguity with generic pointers, which are
* handled differently.
*/
- FormatArg(const char* string_value, internal::FormatChoice<2>)
+ FormatArg(const char* string_value, internal::FormatChoice<3>)
: AlphaNum{string_value == nullptr ? "null" : string_value} {
}
@@ -134,7 +124,7 @@ class FormatArg : public absl::AlphaNum {
* hexidecimal integer literal.
*/
template <typename T>
- FormatArg(T* pointer_value, internal::FormatChoice<3>)
+ FormatArg(T* pointer_value, internal::FormatChoice<4>)
: AlphaNum{absl::Hex{reinterpret_cast<uintptr_t>(pointer_value)}} {
}
@@ -143,7 +133,7 @@ class FormatArg : public absl::AlphaNum {
* absl::AlphaNum accepts.
*/
template <typename T>
- FormatArg(T&& value, internal::FormatChoice<4>)
+ FormatArg(T&& value, internal::FormatChoice<5>)
: AlphaNum{std::forward<T>(value)} {
}
};
diff --git a/Firestore/core/src/firebase/firestore/util/string_util.h b/Firestore/core/src/firebase/firestore/util/string_util.h
index 96ba0b0..86acc56 100644
--- a/Firestore/core/src/firebase/firestore/util/string_util.h
+++ b/Firestore/core/src/firebase/firestore/util/string_util.h
@@ -65,11 +65,6 @@ std::string PrefixSuccessor(absl::string_view prefix);
*/
std::string ImmediateSuccessor(absl::string_view s);
-/**
- * Returns true if the given value starts with the given prefix.
- */
-bool StartsWith(const std::string &value, const std::string &prefix);
-
} // namespace util
} // namespace firestore
} // namespace firebase
diff --git a/Firestore/core/src/firebase/firestore/util/type_traits.h b/Firestore/core/src/firebase/firestore/util/type_traits.h
new file mode 100644
index 0000000..52feb6b
--- /dev/null
+++ b/Firestore/core/src/firebase/firestore/util/type_traits.h
@@ -0,0 +1,90 @@
+/*
+ * 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_UTIL_TYPE_TRAITS_H_
+#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_UTIL_TYPE_TRAITS_H_
+
+#if __OBJC__
+#import <objc/objc.h> // for id
+#endif
+
+#include <type_traits>
+
+namespace firebase {
+namespace firestore {
+namespace util {
+
+#if __OBJC__
+
+/**
+ * A type trait that identifies whether or not the given pointer points to an
+ * Objective-C object.
+ *
+ * is_objective_c_pointer<NSObject*>::value == true
+ * is_objective_c_pointer<NSArray<NSString*>*>::value == true
+ *
+ * // id is a dynamically typed pointer to an Objective-C object.
+ * is_objective_c_pointer<id>::value == true
+ *
+ * // pointers to C++ classes are not Objective-C pointers.
+ * is_objective_c_pointer<void*>::value == false
+ * is_objective_c_pointer<std::string*>::value == false
+ * is_objective_c_pointer<std::unique_ptr<int>>::value == false
+ */
+template <typename T>
+struct is_objective_c_pointer {
+ private:
+ using yes_type = char (&)[10];
+ using no_type = char (&)[1];
+
+ /**
+ * A non-existent function declared to produce a pointer to type T (which is
+ * consistent with the way Objective-C objects are referenced).
+ *
+ * Note that there is no definition for this function but that's okay because
+ * we only need it to reason about the function's type at compile type.
+ */
+ static T Pointer();
+
+ static yes_type Choose(id value);
+ static no_type Choose(...);
+
+ public:
+ using value_type = bool;
+
+ enum { value = sizeof(Choose(Pointer())) == sizeof(yes_type) };
+
+ constexpr operator bool() const {
+ return value;
+ }
+
+ constexpr bool operator()() const {
+ return value;
+ }
+};
+
+// Hard-code the answer for `void` because you can't pass arguments of type
+// `void` to another function.
+template <>
+struct is_objective_c_pointer<void> : public std::false_type {};
+
+#endif // __OBJC__
+
+} // namespace util
+} // namespace firestore
+} // namespace firebase
+
+#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_UTIL_TYPE_TRAITS_H_
diff --git a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc
index ba9ea47..1125fb4 100644
--- a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc
+++ b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc
@@ -146,13 +146,21 @@ class SerializerTest : public ::testing::Test {
*
* @param status the expected (failed) status. Only the code() is verified.
*/
- void ExpectFailedStatusDuringDecode(Status status,
- const std::vector<uint8_t>& bytes) {
+ void ExpectFailedStatusDuringFieldValueDecode(
+ Status status, const std::vector<uint8_t>& bytes) {
StatusOr<FieldValue> bad_status = serializer.DecodeFieldValue(bytes);
ASSERT_NOT_OK(bad_status);
EXPECT_EQ(status.code(), bad_status.status().code());
}
+ void ExpectFailedStatusDuringMaybeDocumentDecode(
+ Status status, const std::vector<uint8_t>& bytes) {
+ StatusOr<std::unique_ptr<MaybeDocument>> bad_status =
+ serializer.DecodeMaybeDocument(bytes);
+ ASSERT_NOT_OK(bad_status);
+ EXPECT_EQ(status.code(), bad_status.status().code());
+ }
+
v1beta1::Value ValueProto(nullptr_t) {
std::vector<uint8_t> bytes =
EncodeFieldValue(&serializer, FieldValue::NullValue());
@@ -230,20 +238,21 @@ class SerializerTest : public ::testing::Test {
/**
* Creates entries in the proto that we don't care about.
*
- * We ignore create time in our serializer. We never set it, and never read it
- * (other than to throw it away). But the server could (and probably does) set
- * it, so we need to be able to discard it properly. The ExpectRoundTrip deals
- * with this asymmetry.
+ * We ignore certain fields in our serializer. We never set them, and never
+ * read them (other than to throw them away). But the server could (and
+ * probably does) set them, so we need to be able to discard them properly.
+ * The ExpectRoundTrip deals with this asymmetry.
*
* This method adds these ignored fields to the proto.
*/
void TouchIgnoredBatchGetDocumentsResponseFields(
v1beta1::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();
-
google::protobuf::Timestamp* create_time_proto =
doc_proto->mutable_create_time();
create_time_proto->set_seconds(8765);
@@ -465,6 +474,63 @@ TEST_F(SerializerTest, EncodesNestedObjects) {
ExpectRoundTrip(model, proto, FieldValue::Type::Object);
}
+TEST_F(SerializerTest, EncodesFieldValuesWithRepeatedEntries) {
+ // Technically, serialized Value protos can contain multiple values. (The last
+ // one "wins".) However, well-behaved proto emitters (such as libprotobuf)
+ // won't generate that, so to test, we either need to use hand-crafted, raw
+ // bytes or use a proto message that's *almost* the same as the real one, such
+ // that when it's encoded, you can generate these repeated fields. (This is
+ // how libprotobuf tests itself.)
+ //
+ // Using libprotobuf for this purpose is mildly inconvenient for us, since we
+ // don't run protoc as part of the build process, so we'd need to either add
+ // these fake messages to our protos tree (Protos/testprotos?) and then check
+ // in the results (which isn't great when writing new tests). Fortunately, we
+ // 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
+ // 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 {
+ 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),
+ PB_FIELD(2, INT64, SINGULAR, STATIC, OTHER,
+ google_firestore_v1beta1_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}};
+ std::vector<uint8_t> 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);
+ bytes.resize(stream.bytes_written);
+
+ // Decode the bytes into the model
+ StatusOr<FieldValue> actual_model_status = serializer.DecodeFieldValue(bytes);
+ EXPECT_OK(actual_model_status);
+ FieldValue actual_model = actual_model_status.ValueOrDie();
+
+ // Ensure the decoded model is as expected.
+ FieldValue expected_model = FieldValue::IntegerValue(42);
+ EXPECT_EQ(FieldValue::Type::Integer, actual_model.type());
+ EXPECT_EQ(expected_model, actual_model);
+}
+
TEST_F(SerializerTest, BadNullValue) {
std::vector<uint8_t> bytes =
EncodeFieldValue(&serializer, FieldValue::NullValue());
@@ -472,7 +538,7 @@ TEST_F(SerializerTest, BadNullValue) {
// Alter the null value from 0 to 1.
Mutate(&bytes[1], /*expected_initial_value=*/0, /*new_value=*/1);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -483,7 +549,7 @@ TEST_F(SerializerTest, BadBoolValue) {
// Alter the bool value from 1 to 2. (Value values are 0,1)
Mutate(&bytes[1], /*expected_initial_value=*/1, /*new_value=*/2);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -502,7 +568,7 @@ TEST_F(SerializerTest, BadIntegerValue) {
bytes.resize(12);
bytes[11] = 0x7f;
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -514,7 +580,7 @@ TEST_F(SerializerTest, BadStringValue) {
// used by the encoded tag.)
Mutate(&bytes[2], /*expected_initial_value=*/1, /*new_value=*/5);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -525,7 +591,7 @@ TEST_F(SerializerTest, BadTimestampValue_TooLarge) {
// Add some time, which should push us above the maximum allowed timestamp.
Mutate(&bytes[4], 0x82, 0x83);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -536,11 +602,16 @@ TEST_F(SerializerTest, BadTimestampValue_TooSmall) {
// Remove some time, which should push us below the minimum allowed timestamp.
Mutate(&bytes[4], 0x92, 0x91);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
-TEST_F(SerializerTest, BadTag) {
+TEST_F(SerializerTest, BadFieldValueTagAndNoOtherTagPresent) {
+ // A bad tag should be ignored. But if there are *no* valid tags, then we
+ // don't know the type of the FieldValue. Although it might be reasonable to
+ // assume some sort of default type in this situation, we've decided to fail
+ // the deserialization process in this case instead.
+
std::vector<uint8_t> bytes =
EncodeFieldValue(&serializer, FieldValue::NullValue());
@@ -550,15 +621,57 @@ TEST_F(SerializerTest, BadTag) {
// Specifically 31. 0xf8 represents field number 31 encoded as a varint.
Mutate(&bytes[0], /*expected_initial_value=*/0x58, /*new_value=*/0xf8);
- // TODO(rsgowman): The behaviour is *temporarily* slightly different during
- // development; this will cause a failed assertion rather than a failed
- // status. Remove this EXPECT_ANY_THROW statement (and reenable the
- // following commented out statement) once the corresponding assert has been
- // removed from serializer.cc.
- EXPECT_ANY_THROW(ExpectFailedStatusDuringDecode(
- Status(FirestoreErrorCode::DataLoss, "ignored"), bytes));
- // ExpectFailedStatusDuringDecode(
- // Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
+ ExpectFailedStatusDuringFieldValueDecode(
+ Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
+}
+
+TEST_F(SerializerTest, BadFieldValueTagWithOtherValidTagsPresent) {
+ // A bad tag should be ignored, in which case, we should successfully
+ // deserialize the rest of the bytes as if it wasn't there. To craft these
+ // bytes, we'll use the same technique as
+ // EncodesFieldValuesWithRepeatedEntries (so go read the comments there
+ // first).
+
+ // 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 {
+ 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. 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),
+ PB_FIELD(invalid_tag, INT64, SINGULAR, STATIC, OTHER,
+ google_firestore_v1beta1_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}};
+ std::vector<uint8_t> 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);
+ bytes.resize(stream.bytes_written);
+
+ // Decode the bytes into the model
+ StatusOr<FieldValue> actual_model_status = serializer.DecodeFieldValue(bytes);
+ Status s = actual_model_status.status();
+ EXPECT_OK(actual_model_status);
+ FieldValue actual_model = actual_model_status.ValueOrDie();
+
+ // Ensure the decoded model is as expected.
+ FieldValue expected_model = FieldValue::BooleanValue(true);
+ EXPECT_EQ(FieldValue::Type::Boolean, actual_model.type());
+ EXPECT_EQ(expected_model, actual_model);
}
TEST_F(SerializerTest, TagVarintWiretypeStringMismatch) {
@@ -570,7 +683,7 @@ TEST_F(SerializerTest, TagVarintWiretypeStringMismatch) {
// would do.)
Mutate(&bytes[0], /*expected_initial_value=*/0x08, /*new_value=*/0x0a);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -581,7 +694,7 @@ TEST_F(SerializerTest, TagStringWiretypeVarintMismatch) {
// 0x88 represents a string value encoded as a varint.
Mutate(&bytes[0], /*expected_initial_value=*/0x8a, /*new_value=*/0x88);
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -594,13 +707,13 @@ TEST_F(SerializerTest, IncompleteFieldValue) {
ASSERT_EQ(0x00, bytes[1]);
bytes.pop_back();
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
TEST_F(SerializerTest, IncompleteTag) {
std::vector<uint8_t> bytes;
- ExpectFailedStatusDuringDecode(
+ ExpectFailedStatusDuringFieldValueDecode(
Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
}
@@ -694,6 +807,69 @@ TEST_F(SerializerTest, EncodesNonEmptyDocument) {
ExpectRoundTrip(key, fields, update_time, proto);
}
+TEST_F(SerializerTest,
+ BadBatchGetDocumentsResponseTagWithOtherValidTagsPresent) {
+ // A bad tag should be ignored, in which case, we should successfully
+ // deserialize the rest of the bytes as if it wasn't there. To craft these
+ // bytes, we'll use the same technique as
+ // EncodesFieldValuesWithRepeatedEntries (so go read the comments there
+ // first).
+
+ // 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 {
+ pb_callback_t missing;
+ int64_t extra_field;
+ };
+
+ // Copy of the real one (from the nanopb generated firestore.pb.c), but with
+ // only missing and an extra_field. Also modified such that extra_field
+ // now has a tag of 31.
+ const int invalid_tag = 31;
+ const pb_field_t
+ google_firestore_v1beta1_BatchGetDocumentsResponse_fields_Fake[3] = {
+ PB_FIELD(2, STRING, SINGULAR, CALLBACK, FIRST,
+ google_firestore_v1beta1_BatchGetDocumentsResponse_Fake,
+ missing, missing, 0),
+ PB_FIELD(invalid_tag, INT64, SINGULAR, STATIC, OTHER,
+ google_firestore_v1beta1_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;
+ crafty_value.missing.funcs.encode =
+ [](pb_ostream_t* stream, const pb_field_t* field, void* const* arg) {
+ const char* missing_value = static_cast<const char*>(*arg);
+ if (!pb_encode_tag_for_field(stream, field)) return false;
+ return pb_encode_string(stream,
+ reinterpret_cast<const uint8_t*>(missing_value),
+ strlen(missing_value));
+ };
+ crafty_value.missing.arg = const_cast<char*>(missing_value);
+ crafty_value.extra_field = 42;
+
+ std::vector<uint8_t> bytes(128);
+ pb_ostream_t stream = pb_ostream_from_buffer(bytes.data(), bytes.size());
+ pb_encode(&stream,
+ google_firestore_v1beta1_BatchGetDocumentsResponse_fields_Fake,
+ &crafty_value);
+ bytes.resize(stream.bytes_written);
+
+ // Decode the bytes into the model
+ StatusOr<std::unique_ptr<MaybeDocument>> actual_model_status =
+ serializer.DecodeMaybeDocument(bytes);
+ EXPECT_OK(actual_model_status);
+ std::unique_ptr<MaybeDocument> actual_model =
+ std::move(actual_model_status).ValueOrDie();
+
+ // Ensure the decoded model is as expected.
+ NoDocument expected_model =
+ NoDocument(Key("one/two"), SnapshotVersion::None());
+ EXPECT_EQ(expected_model, *actual_model.get());
+}
+
TEST_F(SerializerTest, DecodesNoDocument) {
// We can't actually *encode* a NoDocument; the method exposed by the
// serializer requires both the document key and contents (as an ObjectValue,
@@ -713,5 +889,16 @@ TEST_F(SerializerTest, DecodesNoDocument) {
ExpectNoDocumentDeserializationRoundTrip(key, read_time, proto);
}
+TEST_F(SerializerTest, DecodeMaybeDocWithoutFoundOrMissingSetShouldFail) {
+ v1beta1::BatchGetDocumentsResponse proto;
+
+ std::vector<uint8_t> bytes(proto.ByteSizeLong());
+ bool status = proto.SerializeToArray(bytes.data(), bytes.size());
+ EXPECT_TRUE(status);
+
+ ExpectFailedStatusDuringMaybeDocumentDecode(
+ Status(FirestoreErrorCode::DataLoss, "ignored"), bytes);
+}
+
// TODO(rsgowman): Test [en|de]coding multiple protos into the same output
// vector.
diff --git a/Firestore/core/test/firebase/firestore/util/CMakeLists.txt b/Firestore/core/test/firebase/firestore/util/CMakeLists.txt
index bcb1c84..44a3b61 100644
--- a/Firestore/core/test/firebase/firestore/util/CMakeLists.txt
+++ b/Firestore/core/test/firebase/firestore/util/CMakeLists.txt
@@ -98,7 +98,7 @@ cc_test(
async_tests_util.h
DEPENDS
firebase_firestore_util_executor_std
- firebase_firestore_util_async_queue
+ firebase_firestore_util
)
if(HAVE_LIBDISPATCH)
@@ -111,7 +111,7 @@ if(HAVE_LIBDISPATCH)
async_tests_util.h
DEPENDS
firebase_firestore_util_executor_libdispatch
- firebase_firestore_util_async_queue
+ firebase_firestore_util
)
endif()
@@ -137,3 +137,12 @@ cc_test(
firebase_firestore_util
gmock
)
+
+if(APPLE)
+ target_sources(
+ firebase_firestore_util_test
+ PUBLIC
+ string_format_apple_test.mm
+ type_traits_apple_test.mm
+ )
+endif()
diff --git a/Firestore/core/test/firebase/firestore/util/hashing_test.cc b/Firestore/core/test/firebase/firestore/util/hashing_test.cc
index e5d9ff8..2c5c2f7 100644
--- a/Firestore/core/test/firebase/firestore/util/hashing_test.cc
+++ b/Firestore/core/test/firebase/firestore/util/hashing_test.cc
@@ -16,6 +16,9 @@
#include "Firestore/core/src/firebase/firestore/util/hashing.h"
+#include <map>
+#include <string>
+
#include "absl/strings/string_view.h"
#include "gtest/gtest.h"
@@ -29,6 +32,21 @@ struct HasHashMember {
}
};
+TEST(HashingTest, HasStdHash) {
+ EXPECT_TRUE(impl::has_std_hash<float>::value);
+ EXPECT_TRUE(impl::has_std_hash<double>::value);
+ EXPECT_TRUE(impl::has_std_hash<int>::value);
+ EXPECT_TRUE(impl::has_std_hash<int64_t>::value);
+ EXPECT_TRUE(impl::has_std_hash<std::string>::value);
+ EXPECT_TRUE(impl::has_std_hash<void*>::value);
+ EXPECT_TRUE(impl::has_std_hash<const char*>::value);
+
+ struct Foo {};
+ EXPECT_FALSE(impl::has_std_hash<Foo>::value);
+ EXPECT_FALSE(impl::has_std_hash<absl::string_view>::value);
+ EXPECT_FALSE((impl::has_std_hash<std::map<std::string, std::string>>::value));
+}
+
TEST(HashingTest, Int) {
ASSERT_EQ(std::hash<int>{}(0), Hash(0));
}
diff --git a/Firestore/core/test/firebase/firestore/util/string_format_apple_test.mm b/Firestore/core/test/firebase/firestore/util/string_format_apple_test.mm
new file mode 100644
index 0000000..f0bcd35
--- /dev/null
+++ b/Firestore/core/test/firebase/firestore/util/string_format_apple_test.mm
@@ -0,0 +1,60 @@
+/*
+ * 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/util/string_format.h"
+
+#import <Foundation/NSString.h>
+
+#include "gtest/gtest.h"
+
+@interface FSTDescribable : NSObject
+@end
+
+@implementation FSTDescribable
+
+- (NSString*)description {
+ return @"description";
+}
+
+@end
+
+namespace firebase {
+namespace firestore {
+namespace util {
+
+TEST(StringFormatTest, NSString) {
+ EXPECT_EQ("Hello World", StringFormat("Hello %s", @"World"));
+
+ NSString* hello = [NSString stringWithUTF8String:"Hello"];
+ EXPECT_EQ("Hello World", StringFormat("%s World", hello));
+
+ // NOLINTNEXTLINE false positive on "string"
+ NSMutableString* world = [NSMutableString string];
+ [world appendString:@"World"];
+ EXPECT_EQ("Hello World", StringFormat("Hello %s", world));
+}
+
+TEST(StringFormatTest, FSTDescribable) {
+ FSTDescribable* desc = [[FSTDescribable alloc] init];
+ EXPECT_EQ("Hello description", StringFormat("Hello %s", desc));
+
+ id desc_id = desc;
+ EXPECT_EQ("Hello description", StringFormat("Hello %s", desc_id));
+}
+
+} // namespace util
+} // namespace firestore
+} // namespace firebase
diff --git a/Firestore/core/test/firebase/firestore/util/type_traits_apple_test.mm b/Firestore/core/test/firebase/firestore/util/type_traits_apple_test.mm
new file mode 100644
index 0000000..dfb03bb
--- /dev/null
+++ b/Firestore/core/test/firebase/firestore/util/type_traits_apple_test.mm
@@ -0,0 +1,50 @@
+/*
+ * 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/util/type_traits.h"
+
+#import <Foundation/NSArray.h>
+#import <Foundation/NSObject.h>
+#import <Foundation/NSString.h>
+
+#include "gtest/gtest.h"
+
+namespace firebase {
+namespace firestore {
+namespace util {
+
+TEST(TypeTraitsTest, IsObjectiveCPointer) {
+ static_assert(is_objective_c_pointer<NSObject*>{}, "NSObject");
+ static_assert(is_objective_c_pointer<NSString*>{}, "NSString");
+ static_assert(is_objective_c_pointer<NSArray<NSString*>*>{},
+ "NSArray<NSString*>");
+
+ static_assert(is_objective_c_pointer<id>{}, "id");
+ static_assert(is_objective_c_pointer<id<NSCopying>>{}, "id<NSCopying>");
+
+ static_assert(!is_objective_c_pointer<int*>{}, "int*");
+ static_assert(!is_objective_c_pointer<void*>{}, "void*");
+ static_assert(!is_objective_c_pointer<int>{}, "int");
+ static_assert(!is_objective_c_pointer<void>{}, "void");
+
+ struct Foo {};
+ static_assert(!is_objective_c_pointer<Foo>{}, "Foo");
+ static_assert(!is_objective_c_pointer<Foo*>{}, "Foo");
+}
+
+} // namespace util
+} // namespace firestore
+} // namespace firebase
diff --git a/scripts/push-pods.sh b/scripts/push-pods.sh
index 9f4c303..b79b76e 100755
--- a/scripts/push-pods.sh
+++ b/scripts/push-pods.sh
@@ -23,18 +23,18 @@
pod cache clean FirebaseCore --all
#pod cache clean FirebaseAuth --all
-#pod cache clean FirebaseDatabase --all
+pod cache clean FirebaseDatabase --all
pod cache clean FirebaseFirestore --all
#pod cache clean FirebaseFunctions --all
-#pod cache clean FirebaseMessaging --all
+pod cache clean FirebaseMessaging --all
#pod cache clean FirebaseStorage --all
pod repo push cpdc-internal-spec FirebaseCore.podspec
#pod repo push cpdc-internal-spec FirebaseAuth.podspec
-#pod repo push cpdc-internal-spec FirebaseDatabase.podspec
+pod repo push cpdc-internal-spec FirebaseDatabase.podspec
pod repo push cpdc-internal-spec FirebaseFirestore.podspec --allow-warnings
#pod repo push cpdc-internal-spec FirebaseFunctions.podspec
-#pod repo push cpdc-internal-spec FirebaseMessaging.podspec
+pod repo push cpdc-internal-spec FirebaseMessaging.podspec
#pod repo push cpdc-internal-spec FirebaseStorage.podspec
# FirebaseFirestore warning (no plan to fix)
diff --git a/scripts/style.sh b/scripts/style.sh
index d8825f2..8eff1e8 100755
--- a/scripts/style.sh
+++ b/scripts/style.sh
@@ -122,6 +122,7 @@ s%^./%%
# Checked-in generated code
\%\.pb(objc|rpc)\.% d
\%\.pb\.% d
+\%\.nanopb\.% d
# Format C-ish sources only
\%\.(h|m|mm|cc|swift)$% p
diff --git a/scripts/update-tags.sh b/scripts/update-tags.sh
index 0c018c3..d321dd8 100755
--- a/scripts/update-tags.sh
+++ b/scripts/update-tags.sh
@@ -27,35 +27,35 @@
# Delete any existing tags at origin
-git push --delete origin '5.0.1'
-git push --delete origin 'Core-5.0.1'
+git push --delete origin '5.1.0'
+git push --delete origin 'Core-5.0.2'
#git push --delete origin 'Auth-5.0.0'
-#git push --delete origin 'Database-5.0.0'
-git push --delete origin 'Firestore-0.12.1'
+git push --delete origin 'Database-5.0.1'
+git push --delete origin 'Firestore-0.12.2'
#git push --delete origin 'Functions-2.0.0'
-#git push --delete origin 'Messaging-3.0.0'
+git push --delete origin 'Messaging-3.0.1'
#git push --delete origin 'Storage-3.0.0'
# Delete local tags
-git tag --delete '5.0.1'
-git tag --delete 'Core-5.0.1'
+git tag --delete '5.1.0'
+git tag --delete 'Core-5.0.2'
#git tag --delete 'Auth-5.0.0'
-#git tag --delete 'Database-5.0.0'
-git tag --delete 'Firestore-0.12.1'
+git tag --delete 'Database-5.0.1'
+git tag --delete 'Firestore-0.12.2'
#git tag --delete 'Functions-2.0.0'
-#git tag --delete 'Messaging-3.0.0'
+git tag --delete 'Messaging-3.0.1'
#git tag --delete 'Storage-3.0.0'
# Add and push the tags
-git tag '5.0.1'
-git tag 'Core-5.0.1'
+git tag '5.1.0'
+git tag 'Core-5.0.2'
#git tag 'Auth-5.0.0'
-#git tag 'Database-5.0.0'
-git tag 'Firestore-0.12.1'
+git tag 'Database-5.0.1'
+git tag 'Firestore-0.12.2'
#git tag 'Functions-2.0.0'
-#git tag 'Messaging-3.0.0'
+git tag 'Messaging-3.0.1'
#git tag 'Storage-3.0.0'
git push origin --tags