aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2017-10-03 08:55:22 -0700
committerGravatar GitHub <noreply@github.com>2017-10-03 08:55:22 -0700
commitbde743ed25166a0b320ae157bfb1d68064f531c9 (patch)
tree4dd7525d9df32fa5dbdb721d4b0d4f9b87f5e884 /Firestore/Protos
parentbf550507ffa8beee149383a5bf1e2363bccefbb4 (diff)
Release 4.3.0 (#327)
Initial release of Firestore at 0.8.0 Bump FirebaseCommunity to 0.1.3
Diffstat (limited to 'Firestore/Protos')
-rw-r--r--Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj428
-rw-r--r--Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme91
-rw-r--r--Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme91
-rw-r--r--Firestore/Protos/Podfile11
-rw-r--r--Firestore/Protos/README.md20
-rwxr-xr-xFirestore/Protos/build-protos.sh40
-rw-r--r--Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h132
-rw-r--r--Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.m192
-rw-r--r--Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h138
-rw-r--r--Firestore/Protos/objc/firestore/local/Mutation.pbobjc.m190
-rw-r--r--Firestore/Protos/objc/firestore/local/Target.pbobjc.h208
-rw-r--r--Firestore/Protos/objc/firestore/local/Target.pbobjc.m247
-rw-r--r--Firestore/Protos/objc/google/api/Annotations.pbobjc.h17
-rw-r--r--Firestore/Protos/objc/google/api/Annotations.pbobjc.m17
-rw-r--r--Firestore/Protos/objc/google/api/HTTP.pbobjc.h406
-rw-r--r--Firestore/Protos/objc/google/api/HTTP.pbobjc.m306
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h223
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m345
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h309
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m412
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h1342
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m2064
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h232
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m281
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h579
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m907
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h432
-rw-r--r--Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m653
-rw-r--r--Firestore/Protos/objc/google/rpc/Status.pbobjc.h155
-rw-r--r--Firestore/Protos/objc/google/rpc/Status.pbobjc.m136
-rw-r--r--Firestore/Protos/objc/google/type/Latlng.pbobjc.h127
-rw-r--r--Firestore/Protos/objc/google/type/Latlng.pbobjc.m119
-rw-r--r--Firestore/Protos/protos/firestore/local/maybe_document.proto33
-rw-r--r--Firestore/Protos/protos/firestore/local/mutation.proto44
-rw-r--r--Firestore/Protos/protos/firestore/local/target.proto90
-rw-r--r--Firestore/Protos/protos/google/api/annotations.proto31
-rw-r--r--Firestore/Protos/protos/google/api/http.proto291
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/common.proto82
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/document.proto148
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto719
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/query.proto231
-rw-r--r--Firestore/Protos/protos/google/firestore/v1beta1/write.proto189
-rw-r--r--Firestore/Protos/protos/google/rpc/status.proto92
-rw-r--r--Firestore/Protos/protos/google/type/latlng.proto71
-rwxr-xr-xFirestore/Protos/strip-registry.py36
45 files changed, 12907 insertions, 0 deletions
diff --git a/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj b/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..51a61b8
--- /dev/null
+++ b/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj
@@ -0,0 +1,428 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 621808027FC20B1A1B769E50 /* libPods-FrameworkMaker_iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 01F29B956E7F6E45EF34DE72 /* Pods-FrameworkMaker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker/Pods-FrameworkMaker.release.xcconfig"; sourceTree = "<group>"; };
+ 04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS.release.xcconfig"; sourceTree = "<group>"; };
+ 05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FrameworkMaker_iOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 1D25AC01A0F56F8BC5375DD2 /* libPods-FrameworkMaker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker_iOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS.debug.xcconfig"; sourceTree = "<group>"; };
+ 93482F41CCA683759459AC1E /* libPods-FrameworkMaker_macOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker_macOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FrameworkMaker_iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+ C8DA4EE8A169B227B0576C02 /* Pods-FrameworkMaker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FrameworkMaker.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FrameworkMaker/Pods-FrameworkMaker.debug.xcconfig"; sourceTree = "<group>"; };
+ D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FrameworkMaker_macOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ D013FA131ED9EC0B00FD68A9 /* iOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOS-Info.plist"; sourceTree = "<group>"; };
+ D013FA141ED9EC1500FD68A9 /* macOS-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "macOS-Info.plist"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 05A46BD41CC9B2BE007BDB33 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 621808027FC20B1A1B769E50 /* libPods-FrameworkMaker_iOS.a in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D013F9FC1ED9EB9900FD68A9 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 05A46BCE1CC9B2BE007BDB33 = {
+ isa = PBXGroup;
+ children = (
+ D013FA131ED9EC0B00FD68A9 /* iOS-Info.plist */,
+ D013FA141ED9EC1500FD68A9 /* macOS-Info.plist */,
+ 05A46BD81CC9B2BE007BDB33 /* Products */,
+ AA03828B8B59297B5A3389B0 /* Pods */,
+ D3884AD1918E82D7FD21433D /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ 05A46BD81CC9B2BE007BDB33 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */,
+ D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ AA03828B8B59297B5A3389B0 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ C8DA4EE8A169B227B0576C02 /* Pods-FrameworkMaker.debug.xcconfig */,
+ 01F29B956E7F6E45EF34DE72 /* Pods-FrameworkMaker.release.xcconfig */,
+ 5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */,
+ 04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */,
+ );
+ name = Pods;
+ sourceTree = "<group>";
+ };
+ D3884AD1918E82D7FD21433D /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1D25AC01A0F56F8BC5375DD2 /* libPods-FrameworkMaker.a */,
+ AB2E4F8834D5EA87A8F7124C /* libPods-FrameworkMaker_iOS.a */,
+ 93482F41CCA683759459AC1E /* libPods-FrameworkMaker_macOS.a */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 05A46BD61CC9B2BE007BDB33 /* FrameworkMaker_iOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 05A46BEE1CC9B2BE007BDB33 /* Build configuration list for PBXNativeTarget "FrameworkMaker_iOS" */;
+ buildPhases = (
+ AC1C2B143A86214CE77C9932 /* [CP] Check Pods Manifest.lock */,
+ 05A46BD31CC9B2BE007BDB33 /* Sources */,
+ 05A46BD41CC9B2BE007BDB33 /* Frameworks */,
+ 05A46BD51CC9B2BE007BDB33 /* Resources */,
+ 11182BBE1E5DB1C0F58623BB /* [CP] Embed Pods Frameworks */,
+ 5040608D1004852F08A22A14 /* [CP] Copy Pods Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FrameworkMaker_iOS;
+ productName = FrameworkMaker;
+ productReference = 05A46BD71CC9B2BE007BDB33 /* FrameworkMaker_iOS.app */;
+ productType = "com.apple.product-type.application";
+ };
+ D013F9FE1ED9EB9900FD68A9 /* FrameworkMaker_macOS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D013FA121ED9EB9900FD68A9 /* Build configuration list for PBXNativeTarget "FrameworkMaker_macOS" */;
+ buildPhases = (
+ D013F9FB1ED9EB9900FD68A9 /* Sources */,
+ D013F9FC1ED9EB9900FD68A9 /* Frameworks */,
+ D013F9FD1ED9EB9900FD68A9 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = FrameworkMaker_macOS;
+ productName = FrameworkMaker_macOS;
+ productReference = D013F9FF1ED9EB9900FD68A9 /* FrameworkMaker_macOS.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 05A46BCF1CC9B2BE007BDB33 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0730;
+ ORGANIZATIONNAME = "Google, Inc.";
+ TargetAttributes = {
+ 05A46BD61CC9B2BE007BDB33 = {
+ CreatedOnToolsVersion = 7.3;
+ };
+ D013F9FE1ED9EB9900FD68A9 = {
+ CreatedOnToolsVersion = 8.3.2;
+ ProvisioningStyle = Automatic;
+ };
+ };
+ };
+ buildConfigurationList = 05A46BD21CC9B2BE007BDB33 /* Build configuration list for PBXProject "FrameworkMaker" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 05A46BCE1CC9B2BE007BDB33;
+ productRefGroup = 05A46BD81CC9B2BE007BDB33 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 05A46BD61CC9B2BE007BDB33 /* FrameworkMaker_iOS */,
+ D013F9FE1ED9EB9900FD68A9 /* FrameworkMaker_macOS */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 05A46BD51CC9B2BE007BDB33 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D013F9FD1ED9EB9900FD68A9 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 11182BBE1E5DB1C0F58623BB /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 5040608D1004852F08A22A14 /* [CP] Copy Pods Resources */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS-resources.sh",
+ "$PODS_CONFIGURATION_BUILD_DIR/gRPC/gRPCCertificates.bundle",
+ );
+ name = "[CP] Copy Pods Resources";
+ outputPaths = (
+ "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FrameworkMaker_iOS/Pods-FrameworkMaker_iOS-resources.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ AC1C2B143A86214CE77C9932 /* [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-FrameworkMaker_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;
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 05A46BD31CC9B2BE007BDB33 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D013F9FB1ED9EB9900FD68A9 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 05A46BEC1CC9B2BE007BDB33 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 05A46BED1CC9B2BE007BDB33 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MACOSX_DEPLOYMENT_TARGET = 10.10;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 05A46BEF1CC9B2BE007BDB33 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 5BDF11E206B3015647181AB8 /* Pods-FrameworkMaker_iOS.debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ INFOPLIST_FILE = "$(SRCROOT)/iOS-Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "google.FrameworkMaker-iOS";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Debug;
+ };
+ 05A46BF01CC9B2BE007BDB33 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 04058317A2F1A863FB91F84F /* Pods-FrameworkMaker_iOS.release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ INFOPLIST_FILE = "$(SRCROOT)/iOS-Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "google.FrameworkMaker-iOS";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ };
+ name = Release;
+ };
+ D013FA101ED9EB9900FD68A9 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = "$(SRCROOT)/macOS-Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.google.FrameworkMaker-macOS";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ D013FA111ED9EB9900FD68A9 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ COMBINE_HIDPI_IMAGES = YES;
+ INFOPLIST_FILE = "$(SRCROOT)/macOS-Info.plist";
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "com.google.FrameworkMaker-macOS";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 05A46BD21CC9B2BE007BDB33 /* Build configuration list for PBXProject "FrameworkMaker" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 05A46BEC1CC9B2BE007BDB33 /* Debug */,
+ 05A46BED1CC9B2BE007BDB33 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 05A46BEE1CC9B2BE007BDB33 /* Build configuration list for PBXNativeTarget "FrameworkMaker_iOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 05A46BEF1CC9B2BE007BDB33 /* Debug */,
+ 05A46BF01CC9B2BE007BDB33 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D013FA121ED9EB9900FD68A9 /* Build configuration list for PBXNativeTarget "FrameworkMaker_macOS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D013FA101ED9EB9900FD68A9 /* Debug */,
+ D013FA111ED9EB9900FD68A9 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 05A46BCF1CC9B2BE007BDB33 /* Project object */;
+}
diff --git a/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme b/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme
new file mode 100644
index 0000000..2994deb
--- /dev/null
+++ b/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_iOS.xcscheme
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0830"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
+ BuildableName = "FrameworkMaker_iOS.app"
+ BlueprintName = "FrameworkMaker_iOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
+ BuildableName = "FrameworkMaker_iOS.app"
+ BlueprintName = "FrameworkMaker_iOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <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">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
+ BuildableName = "FrameworkMaker_iOS.app"
+ BlueprintName = "FrameworkMaker_iOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "05A46BD61CC9B2BE007BDB33"
+ BuildableName = "FrameworkMaker_iOS.app"
+ BlueprintName = "FrameworkMaker_iOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme b/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme
new file mode 100644
index 0000000..dbe6579
--- /dev/null
+++ b/Firestore/Protos/FrameworkMaker.xcodeproj/xcshareddata/xcschemes/FrameworkMaker_macOS.xcscheme
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ LastUpgradeVersion = "0830"
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
+ BuildableName = "FrameworkMaker_macOS.app"
+ BlueprintName = "FrameworkMaker_macOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ buildConfiguration = "Debug"
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
+ BuildableName = "FrameworkMaker_macOS.app"
+ BlueprintName = "FrameworkMaker_macOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ <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">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
+ BuildableName = "FrameworkMaker_macOS.app"
+ BlueprintName = "FrameworkMaker_macOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ buildConfiguration = "Release"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable
+ runnableDebuggingMode = "0">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D013F9FE1ED9EB9900FD68A9"
+ BuildableName = "FrameworkMaker_macOS.app"
+ BlueprintName = "FrameworkMaker_macOS"
+ ReferencedContainer = "container:FrameworkMaker.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
diff --git a/Firestore/Protos/Podfile b/Firestore/Protos/Podfile
new file mode 100644
index 0000000..988d7f8
--- /dev/null
+++ b/Firestore/Protos/Podfile
@@ -0,0 +1,11 @@
+# This Podfile and FrameworkMaker.xcodeproj is only here to access the
+# ProtoCompiler plugin.
+
+project 'FrameworkMaker.xcodeproj'
+
+target 'FrameworkMaker_iOS' do
+ platform :ios, '7.0'
+
+ # This should be versioned along with 'gRPC-ProtoRPC' in Firestore.podspec
+ pod '!ProtoCompiler-gRPCPlugin'
+end
diff --git a/Firestore/Protos/README.md b/Firestore/Protos/README.md
new file mode 100644
index 0000000..cb6d90e
--- /dev/null
+++ b/Firestore/Protos/README.md
@@ -0,0 +1,20 @@
+## Usage
+
+```
+cd firebase-ios-sdk/Firestore/Protos
+./build-protos.sh
+```
+
+Verify diffs, tests and make PR
+
+### Script Details
+
+Get the protoc and the gRPC plugin. See
+[here](https://github.com/grpc/grpc/tree/master/src/objective-c). The
+easiest way I found was to add
+`pod '!ProtoCompiler-gRPCPlugin'` to a Podfile and do `pod update`.
+
+After running the protoc, shell commands run to fix up the generated code:
+ * Flatten import paths for CocoaPods library build.
+ * Remove unneeded extensionRegistry functions.
+ * Remove non-buildable code from Annotations.pbobjc.*.
diff --git a/Firestore/Protos/build-protos.sh b/Firestore/Protos/build-protos.sh
new file mode 100755
index 0000000..4cfb12e
--- /dev/null
+++ b/Firestore/Protos/build-protos.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+# Copyright 2017 Google
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Run this script from firebase-ios-sdk/Firestore/Protos to regnenerate the
+# Objective C files from the protos.
+
+# pod update to install protoc and the gRPC plugin compiler.
+rm -rf Pods
+rm Podfile.lock
+pod update
+
+# Generate the objective C files from the protos.
+./Pods/!ProtoCompiler/protoc --plugin=protoc-gen-grpc=Pods/\!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin -I protos --objc_out=objc --grpc_out=objc `find protos -name *.proto -print | xargs`
+
+# CocoaPods does not like paths in library imports, flatten them.
+
+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
+ ./strip-registry.py $i
+done
+
+# Remove non-buildable code from Annotations.pbobjc.*.
+
+echo "static int annotations_stub __attribute__((unused,used)) = 0;" > objc/google/api/Annotations.pbobjc.m
+echo "// Empty stub file" > objc/google/api/Annotations.pbobjc.h
diff --git a/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h b/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h
new file mode 100644
index 0000000..d34090a
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.h
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/maybe_document.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class FSTPBNoDocument;
+@class GCFSDocument;
+@class GPBTimestamp;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - FSTPBMaybeDocumentRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface FSTPBMaybeDocumentRoot : GPBRootObject
+@end
+
+#pragma mark - FSTPBNoDocument
+
+typedef GPB_ENUM(FSTPBNoDocument_FieldNumber) {
+ FSTPBNoDocument_FieldNumber_Name = 1,
+ FSTPBNoDocument_FieldNumber_ReadTime = 2,
+};
+
+/**
+ * A message indicating that the document is known to not exist.
+ **/
+@interface FSTPBNoDocument : GPBMessage
+
+/**
+ * The name of the document that does not exist, in the standard format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
+
+/** The time at which we observed that it does not exist. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+@end
+
+#pragma mark - FSTPBMaybeDocument
+
+typedef GPB_ENUM(FSTPBMaybeDocument_FieldNumber) {
+ FSTPBMaybeDocument_FieldNumber_NoDocument = 1,
+ FSTPBMaybeDocument_FieldNumber_Document = 2,
+};
+
+typedef GPB_ENUM(FSTPBMaybeDocument_DocumentType_OneOfCase) {
+ FSTPBMaybeDocument_DocumentType_OneOfCase_GPBUnsetOneOfCase = 0,
+ FSTPBMaybeDocument_DocumentType_OneOfCase_NoDocument = 1,
+ FSTPBMaybeDocument_DocumentType_OneOfCase_Document = 2,
+};
+
+/**
+ * Represents either an existing document or the explicitly known absence of a
+ * document.
+ **/
+@interface FSTPBMaybeDocument : GPBMessage
+
+@property(nonatomic, readonly) FSTPBMaybeDocument_DocumentType_OneOfCase documentTypeOneOfCase;
+
+/** Used if the document is known to not exist. */
+@property(nonatomic, readwrite, strong, null_resettable) FSTPBNoDocument *noDocument;
+
+/** The document (if it exists). */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'documentType'.
+ **/
+void FSTPBMaybeDocument_ClearDocumentTypeOneOfCase(FSTPBMaybeDocument *message);
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.m b/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.m
new file mode 100644
index 0000000..1d4404d
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/MaybeDocument.pbobjc.m
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/maybe_document.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "MaybeDocument.pbobjc.h"
+ #import "Document.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - FSTPBMaybeDocumentRoot
+
+@implementation FSTPBMaybeDocumentRoot
+
+
+@end
+
+#pragma mark - FSTPBMaybeDocumentRoot_FileDescriptor
+
+static GPBFileDescriptor *FSTPBMaybeDocumentRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"firestore.client"
+ objcPrefix:@"FSTPB"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - FSTPBNoDocument
+
+@implementation FSTPBNoDocument
+
+@dynamic name;
+@dynamic hasReadTime, readTime;
+
+typedef struct FSTPBNoDocument__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *name;
+ GPBTimestamp *readTime;
+} FSTPBNoDocument__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "name",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBNoDocument_FieldNumber_Name,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(FSTPBNoDocument__storage_, name),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = FSTPBNoDocument_FieldNumber_ReadTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(FSTPBNoDocument__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBNoDocument class]
+ rootClass:[FSTPBMaybeDocumentRoot class]
+ file:FSTPBMaybeDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBNoDocument__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - FSTPBMaybeDocument
+
+@implementation FSTPBMaybeDocument
+
+@dynamic documentTypeOneOfCase;
+@dynamic noDocument;
+@dynamic document;
+
+typedef struct FSTPBMaybeDocument__storage_ {
+ uint32_t _has_storage_[2];
+ FSTPBNoDocument *noDocument;
+ GCFSDocument *document;
+} FSTPBMaybeDocument__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "noDocument",
+ .dataTypeSpecific.className = GPBStringifySymbol(FSTPBNoDocument),
+ .number = FSTPBMaybeDocument_FieldNumber_NoDocument,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(FSTPBMaybeDocument__storage_, noDocument),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "document",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = FSTPBMaybeDocument_FieldNumber_Document,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(FSTPBMaybeDocument__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBMaybeDocument class]
+ rootClass:[FSTPBMaybeDocumentRoot class]
+ file:FSTPBMaybeDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBMaybeDocument__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "documentType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void FSTPBMaybeDocument_ClearDocumentTypeOneOfCase(FSTPBMaybeDocument *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h b/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h
new file mode 100644
index 0000000..0089632
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/mutation.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSWrite;
+@class GPBTimestamp;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - FSTPBMutationRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface FSTPBMutationRoot : GPBRootObject
+@end
+
+#pragma mark - FSTPBMutationQueue
+
+typedef GPB_ENUM(FSTPBMutationQueue_FieldNumber) {
+ FSTPBMutationQueue_FieldNumber_LastAcknowledgedBatchId = 1,
+ FSTPBMutationQueue_FieldNumber_LastStreamToken = 2,
+};
+
+/**
+ * Each user gets a single queue of WriteBatches to apply to the server.
+ * MutationQueue tracks the metadata about the queue.
+ **/
+@interface FSTPBMutationQueue : GPBMessage
+
+/**
+ * An identifier for the highest numbered batch that has been acknowledged by
+ * the server. All WriteBatches in this queue with batch_ids less than or
+ * equal to this value are considered to have been acknowledged by the
+ * server.
+ **/
+@property(nonatomic, readwrite) int32_t lastAcknowledgedBatchId;
+
+/**
+ * A stream token that was previously sent by the server.
+ *
+ * See StreamingWriteRequest in datastore.proto for more details about usage.
+ *
+ * After sending this token, earlier tokens may not be used anymore so only a
+ * single stream token is retained.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *lastStreamToken;
+
+@end
+
+#pragma mark - FSTPBWriteBatch
+
+typedef GPB_ENUM(FSTPBWriteBatch_FieldNumber) {
+ FSTPBWriteBatch_FieldNumber_BatchId = 1,
+ FSTPBWriteBatch_FieldNumber_WritesArray = 2,
+ FSTPBWriteBatch_FieldNumber_LocalWriteTime = 3,
+};
+
+/**
+ * Message containing a batch of user-level writes intended to be sent to
+ * the server in a single call. Each user-level batch gets a separate
+ * WriteBatch with a new batch_id.
+ **/
+@interface FSTPBWriteBatch : GPBMessage
+
+/**
+ * An identifier for this batch, allocated by the mutation queue in a
+ * monotonically increasing manner.
+ **/
+@property(nonatomic, readwrite) int32_t batchId;
+
+/** A list of writes to apply. All writes will be applied atomically. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWrite*> *writesArray;
+/** The number of items in @c writesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger writesArray_Count;
+
+/** The local time at which the write batch was initiated. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *localWriteTime;
+/** Test to see if @c localWriteTime has been set. */
+@property(nonatomic, readwrite) BOOL hasLocalWriteTime;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.m b/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.m
new file mode 100644
index 0000000..8034143
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/Mutation.pbobjc.m
@@ -0,0 +1,190 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/mutation.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Mutation.pbobjc.h"
+ #import "Write.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma mark - FSTPBMutationRoot
+
+@implementation FSTPBMutationRoot
+
+
+@end
+
+#pragma mark - FSTPBMutationRoot_FileDescriptor
+
+static GPBFileDescriptor *FSTPBMutationRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"firestore.client"
+ objcPrefix:@"FSTPB"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - FSTPBMutationQueue
+
+@implementation FSTPBMutationQueue
+
+@dynamic lastAcknowledgedBatchId;
+@dynamic lastStreamToken;
+
+typedef struct FSTPBMutationQueue__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t lastAcknowledgedBatchId;
+ NSData *lastStreamToken;
+} FSTPBMutationQueue__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "lastAcknowledgedBatchId",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBMutationQueue_FieldNumber_LastAcknowledgedBatchId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(FSTPBMutationQueue__storage_, lastAcknowledgedBatchId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "lastStreamToken",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBMutationQueue_FieldNumber_LastStreamToken,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(FSTPBMutationQueue__storage_, lastStreamToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBMutationQueue class]
+ rootClass:[FSTPBMutationRoot class]
+ file:FSTPBMutationRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBMutationQueue__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - FSTPBWriteBatch
+
+@implementation FSTPBWriteBatch
+
+@dynamic batchId;
+@dynamic writesArray, writesArray_Count;
+@dynamic hasLocalWriteTime, localWriteTime;
+
+typedef struct FSTPBWriteBatch__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t batchId;
+ NSMutableArray *writesArray;
+ GPBTimestamp *localWriteTime;
+} FSTPBWriteBatch__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "batchId",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBWriteBatch_FieldNumber_BatchId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(FSTPBWriteBatch__storage_, batchId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "writesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSWrite),
+ .number = FSTPBWriteBatch_FieldNumber_WritesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(FSTPBWriteBatch__storage_, writesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "localWriteTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = FSTPBWriteBatch_FieldNumber_LocalWriteTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(FSTPBWriteBatch__storage_, localWriteTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBWriteBatch class]
+ rootClass:[FSTPBMutationRoot class]
+ file:FSTPBMutationRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBWriteBatch__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/firestore/local/Target.pbobjc.h b/Firestore/Protos/objc/firestore/local/Target.pbobjc.h
new file mode 100644
index 0000000..d8bf49c
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/Target.pbobjc.h
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/target.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSTarget_DocumentsTarget;
+@class GCFSTarget_QueryTarget;
+@class GPBTimestamp;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - FSTPBTargetRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface FSTPBTargetRoot : GPBRootObject
+@end
+
+#pragma mark - FSTPBTarget
+
+typedef GPB_ENUM(FSTPBTarget_FieldNumber) {
+ FSTPBTarget_FieldNumber_TargetId = 1,
+ FSTPBTarget_FieldNumber_SnapshotVersion = 2,
+ FSTPBTarget_FieldNumber_ResumeToken = 3,
+ FSTPBTarget_FieldNumber_LastListenSequenceNumber = 4,
+ FSTPBTarget_FieldNumber_Query = 5,
+ FSTPBTarget_FieldNumber_Documents = 6,
+};
+
+typedef GPB_ENUM(FSTPBTarget_TargetType_OneOfCase) {
+ FSTPBTarget_TargetType_OneOfCase_GPBUnsetOneOfCase = 0,
+ FSTPBTarget_TargetType_OneOfCase_Query = 5,
+ FSTPBTarget_TargetType_OneOfCase_Documents = 6,
+};
+
+/**
+ * A Target is a long-lived data structure representing a resumable listen on a
+ * particular user query. While the query describes what to listen to, the
+ * Target records data about when the results were last updated and enough
+ * information to be able to resume listening later.
+ **/
+@interface FSTPBTarget : GPBMessage
+
+/**
+ * An auto-generated sequential numeric identifier for the target. This
+ * serves as the identity of the target, and once assigned never changes.
+ **/
+@property(nonatomic, readwrite) int32_t targetId;
+
+/**
+ * The last snapshot version received from the Watch Service for this target.
+ *
+ * This is the same value as TargetChange.read_time
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *snapshotVersion;
+/** Test to see if @c snapshotVersion has been set. */
+@property(nonatomic, readwrite) BOOL hasSnapshotVersion;
+
+/**
+ * An opaque, server-assigned token that allows watching a query to be
+ * resumed after disconnecting without retransmitting all the data that
+ * matches the query. The resume token essentially identifies a point in
+ * time from which the server should resume sending results.
+ *
+ * This is related to the snapshot_version in that the resume_token
+ * effectively also encodes that value, but the resume_token is opaque and
+ * sometimes encodes additional information.
+ *
+ * A consequence of this is that the resume_token should be used when asking
+ * the server to reason about where this client is in the watch stream, but
+ * the client should use the snapshot_version for its own purposes.
+ *
+ * This is the same value as TargetChange.resume_token
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken;
+
+/**
+ * A sequence number representing the last time this query was listened to,
+ * used for garbage collection purposes.
+ *
+ * Conventionally this would be a timestamp value, but device-local clocks
+ * are unreliable and they must be able to create new listens even while
+ * disconnected. Instead this should be a monotonically increasing number
+ * that's incremented on each listen call.
+ *
+ * This is different from the target_id since the target_id is an immutable
+ * identifier assigned to the Target on first use while
+ * last_listen_sequence_number is updated every time the query is listened
+ * to.
+ **/
+@property(nonatomic, readwrite) int64_t lastListenSequenceNumber;
+
+/** The server-side type of target to listen to. */
+@property(nonatomic, readonly) FSTPBTarget_TargetType_OneOfCase targetTypeOneOfCase;
+
+/** A target specified by a query. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_QueryTarget *query;
+
+/** A target specified by a set of document names. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_DocumentsTarget *documents;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'targetType'.
+ **/
+void FSTPBTarget_ClearTargetTypeOneOfCase(FSTPBTarget *message);
+
+#pragma mark - FSTPBTargetGlobal
+
+typedef GPB_ENUM(FSTPBTargetGlobal_FieldNumber) {
+ FSTPBTargetGlobal_FieldNumber_HighestTargetId = 1,
+ FSTPBTargetGlobal_FieldNumber_HighestListenSequenceNumber = 2,
+ FSTPBTargetGlobal_FieldNumber_LastRemoteSnapshotVersion = 3,
+};
+
+/**
+ * Global state tracked across all Targets, tracked separately to avoid the
+ * need for extra indexes.
+ **/
+@interface FSTPBTargetGlobal : GPBMessage
+
+/**
+ * The highest numbered target id across all Targets.
+ *
+ * See Target.target_id.
+ **/
+@property(nonatomic, readwrite) int32_t highestTargetId;
+
+/**
+ * The highest numbered last_listen_sequence_number across all Targets.
+ *
+ * See Target.last_listen_sequence_number.
+ **/
+@property(nonatomic, readwrite) int64_t highestListenSequenceNumber;
+
+/**
+ * A global snapshot version representing the last consistent snapshot we
+ * received from the backend. This is monotonically increasing and any
+ * snapshots received from the backend prior to this version (e.g. for
+ * targets resumed with a resume_token) should be suppressed (buffered) until
+ * the backend has caught up to this snapshot_version again. This prevents
+ * our cache from ever going backwards in time.
+ *
+ * This is updated whenever our we get a TargetChange with a read_time and
+ * empty target_ids.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *lastRemoteSnapshotVersion;
+/** Test to see if @c lastRemoteSnapshotVersion has been set. */
+@property(nonatomic, readwrite) BOOL hasLastRemoteSnapshotVersion;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/firestore/local/Target.pbobjc.m b/Firestore/Protos/objc/firestore/local/Target.pbobjc.m
new file mode 100644
index 0000000..6f6ccf2
--- /dev/null
+++ b/Firestore/Protos/objc/firestore/local/Target.pbobjc.m
@@ -0,0 +1,247 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: firestore/local/target.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Target.pbobjc.h"
+ #import "Firestore.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - FSTPBTargetRoot
+
+@implementation FSTPBTargetRoot
+
+
+@end
+
+#pragma mark - FSTPBTargetRoot_FileDescriptor
+
+static GPBFileDescriptor *FSTPBTargetRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"firestore.client"
+ objcPrefix:@"FSTPB"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - FSTPBTarget
+
+@implementation FSTPBTarget
+
+@dynamic targetTypeOneOfCase;
+@dynamic targetId;
+@dynamic hasSnapshotVersion, snapshotVersion;
+@dynamic resumeToken;
+@dynamic lastListenSequenceNumber;
+@dynamic query;
+@dynamic documents;
+
+typedef struct FSTPBTarget__storage_ {
+ uint32_t _has_storage_[2];
+ int32_t targetId;
+ GPBTimestamp *snapshotVersion;
+ NSData *resumeToken;
+ GCFSTarget_QueryTarget *query;
+ GCFSTarget_DocumentsTarget *documents;
+ int64_t lastListenSequenceNumber;
+} FSTPBTarget__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "targetId",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBTarget_FieldNumber_TargetId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, targetId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "snapshotVersion",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = FSTPBTarget_FieldNumber_SnapshotVersion,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, snapshotVersion),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "resumeToken",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBTarget_FieldNumber_ResumeToken,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, resumeToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "lastListenSequenceNumber",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBTarget_FieldNumber_LastListenSequenceNumber,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, lastListenSequenceNumber),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt64,
+ },
+ {
+ .name = "query",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTarget_QueryTarget),
+ .number = FSTPBTarget_FieldNumber_Query,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, query),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "documents",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTarget_DocumentsTarget),
+ .number = FSTPBTarget_FieldNumber_Documents,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(FSTPBTarget__storage_, documents),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBTarget class]
+ rootClass:[FSTPBTargetRoot class]
+ file:FSTPBTargetRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBTarget__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "targetType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void FSTPBTarget_ClearTargetTypeOneOfCase(FSTPBTarget *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - FSTPBTargetGlobal
+
+@implementation FSTPBTargetGlobal
+
+@dynamic highestTargetId;
+@dynamic highestListenSequenceNumber;
+@dynamic hasLastRemoteSnapshotVersion, lastRemoteSnapshotVersion;
+
+typedef struct FSTPBTargetGlobal__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t highestTargetId;
+ GPBTimestamp *lastRemoteSnapshotVersion;
+ int64_t highestListenSequenceNumber;
+} FSTPBTargetGlobal__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "highestTargetId",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBTargetGlobal_FieldNumber_HighestTargetId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(FSTPBTargetGlobal__storage_, highestTargetId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "highestListenSequenceNumber",
+ .dataTypeSpecific.className = NULL,
+ .number = FSTPBTargetGlobal_FieldNumber_HighestListenSequenceNumber,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(FSTPBTargetGlobal__storage_, highestListenSequenceNumber),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt64,
+ },
+ {
+ .name = "lastRemoteSnapshotVersion",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = FSTPBTargetGlobal_FieldNumber_LastRemoteSnapshotVersion,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(FSTPBTargetGlobal__storage_, lastRemoteSnapshotVersion),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[FSTPBTargetGlobal class]
+ rootClass:[FSTPBTargetRoot class]
+ file:FSTPBTargetRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(FSTPBTargetGlobal__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/api/Annotations.pbobjc.h b/Firestore/Protos/objc/google/api/Annotations.pbobjc.h
new file mode 100644
index 0000000..b7bee2d
--- /dev/null
+++ b/Firestore/Protos/objc/google/api/Annotations.pbobjc.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Empty stub file
diff --git a/Firestore/Protos/objc/google/api/Annotations.pbobjc.m b/Firestore/Protos/objc/google/api/Annotations.pbobjc.m
new file mode 100644
index 0000000..ef0558d
--- /dev/null
+++ b/Firestore/Protos/objc/google/api/Annotations.pbobjc.m
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+static int annotations_stub __attribute__((unused,used)) = 0;
diff --git a/Firestore/Protos/objc/google/api/HTTP.pbobjc.h b/Firestore/Protos/objc/google/api/HTTP.pbobjc.h
new file mode 100644
index 0000000..9cc00dc
--- /dev/null
+++ b/Firestore/Protos/objc/google/api/HTTP.pbobjc.h
@@ -0,0 +1,406 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/http.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GAPICustomHttpPattern;
+@class GAPIHttpRule;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - GAPIHTTPRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GAPIHTTPRoot : GPBRootObject
+@end
+
+#pragma mark - GAPIHttp
+
+typedef GPB_ENUM(GAPIHttp_FieldNumber) {
+ GAPIHttp_FieldNumber_RulesArray = 1,
+};
+
+/**
+ * Defines the HTTP configuration for a service. It contains a list of
+ * [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+ * to one or more HTTP REST API methods.
+ **/
+@interface GAPIHttp : GPBMessage
+
+/**
+ * A list of HTTP configuration rules that apply to individual API methods.
+ *
+ * **NOTE:** All service configuration rules follow "last one wins" order.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GAPIHttpRule*> *rulesArray;
+/** The number of items in @c rulesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger rulesArray_Count;
+
+@end
+
+#pragma mark - GAPIHttpRule
+
+typedef GPB_ENUM(GAPIHttpRule_FieldNumber) {
+ GAPIHttpRule_FieldNumber_Selector = 1,
+ GAPIHttpRule_FieldNumber_Get = 2,
+ GAPIHttpRule_FieldNumber_Put = 3,
+ GAPIHttpRule_FieldNumber_Post = 4,
+ GAPIHttpRule_FieldNumber_Delete_p = 5,
+ GAPIHttpRule_FieldNumber_Patch = 6,
+ GAPIHttpRule_FieldNumber_Body = 7,
+ GAPIHttpRule_FieldNumber_Custom = 8,
+ GAPIHttpRule_FieldNumber_AdditionalBindingsArray = 11,
+};
+
+typedef GPB_ENUM(GAPIHttpRule_Pattern_OneOfCase) {
+ GAPIHttpRule_Pattern_OneOfCase_GPBUnsetOneOfCase = 0,
+ GAPIHttpRule_Pattern_OneOfCase_Get = 2,
+ GAPIHttpRule_Pattern_OneOfCase_Put = 3,
+ GAPIHttpRule_Pattern_OneOfCase_Post = 4,
+ GAPIHttpRule_Pattern_OneOfCase_Delete_p = 5,
+ GAPIHttpRule_Pattern_OneOfCase_Patch = 6,
+ GAPIHttpRule_Pattern_OneOfCase_Custom = 8,
+};
+
+/**
+ * `HttpRule` defines the mapping of an RPC method to one or more HTTP
+ * REST APIs. The mapping determines what portions of the request
+ * message are populated from the path, query parameters, or body of
+ * the HTTP request. The mapping is typically specified as an
+ * `google.api.http` annotation, see "google/api/annotations.proto"
+ * for details.
+ *
+ * The mapping consists of a field specifying the path template and
+ * method kind. The path template can refer to fields in the request
+ * message, as in the example below which describes a REST GET
+ * operation on a resource collection of messages:
+ *
+ *
+ * service Messaging {
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
+ * option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
+ * }
+ * }
+ * message GetMessageRequest {
+ * message SubMessage {
+ * string subfield = 1;
+ * }
+ * string message_id = 1; // mapped to the URL
+ * SubMessage sub = 2; // `sub.subfield` is url-mapped
+ * }
+ * message Message {
+ * string text = 1; // content of the resource
+ * }
+ *
+ * The same http annotation can alternatively be expressed inside the
+ * `GRPC API Configuration` YAML file.
+ *
+ * http:
+ * rules:
+ * - selector: <proto_package_name>.Messaging.GetMessage
+ * get: /v1/messages/{message_id}/{sub.subfield}
+ *
+ * This definition enables an automatic, bidrectional mapping of HTTP
+ * JSON to RPC. Example:
+ *
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
+ *
+ * In general, not only fields but also field paths can be referenced
+ * from a path pattern. Fields mapped to the path pattern cannot be
+ * repeated and must have a primitive (non-message) type.
+ *
+ * Any fields in the request message which are not bound by the path
+ * pattern automatically become (optional) HTTP query
+ * parameters. Assume the following definition of the request message:
+ *
+ *
+ * message GetMessageRequest {
+ * message SubMessage {
+ * string subfield = 1;
+ * }
+ * string message_id = 1; // mapped to the URL
+ * int64 revision = 2; // becomes a parameter
+ * SubMessage sub = 3; // `sub.subfield` becomes a parameter
+ * }
+ *
+ *
+ * This enables a HTTP JSON to RPC mapping as below:
+ *
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
+ *
+ * Note that fields which are mapped to HTTP parameters must have a
+ * primitive type or a repeated primitive type. Message types are not
+ * allowed. In the case of a repeated type, the parameter can be
+ * repeated in the URL, as in `...?param=A&param=B`.
+ *
+ * For HTTP method kinds which allow a request body, the `body` field
+ * specifies the mapping. Consider a REST update method on the
+ * message resource collection:
+ *
+ *
+ * service Messaging {
+ * rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * put: "/v1/messages/{message_id}"
+ * body: "message"
+ * };
+ * }
+ * }
+ * message UpdateMessageRequest {
+ * string message_id = 1; // mapped to the URL
+ * Message message = 2; // mapped to the body
+ * }
+ *
+ *
+ * The following HTTP JSON to RPC mapping is enabled, where the
+ * representation of the JSON in the request body is determined by
+ * protos JSON encoding:
+ *
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+ *
+ * The special name `*` can be used in the body mapping to define that
+ * every field not bound by the path template should be mapped to the
+ * request body. This enables the following alternative definition of
+ * the update method:
+ *
+ * service Messaging {
+ * rpc UpdateMessage(Message) returns (Message) {
+ * option (google.api.http) = {
+ * put: "/v1/messages/{message_id}"
+ * body: "*"
+ * };
+ * }
+ * }
+ * message Message {
+ * string message_id = 1;
+ * string text = 2;
+ * }
+ *
+ *
+ * The following HTTP JSON to RPC mapping is enabled:
+ *
+ * HTTP | RPC
+ * -----|-----
+ * `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+ *
+ * Note that when using `*` in the body mapping, it is not possible to
+ * have HTTP parameters, as all fields not bound by the path end in
+ * the body. This makes this option more rarely used in practice of
+ * defining REST APIs. The common usage of `*` is in custom methods
+ * which don't use the URL at all for transferring data.
+ *
+ * It is possible to define multiple HTTP methods for one RPC by using
+ * the `additional_bindings` option. Example:
+ *
+ * service Messaging {
+ * rpc GetMessage(GetMessageRequest) returns (Message) {
+ * option (google.api.http) = {
+ * get: "/v1/messages/{message_id}"
+ * additional_bindings {
+ * get: "/v1/users/{user_id}/messages/{message_id}"
+ * }
+ * };
+ * }
+ * }
+ * message GetMessageRequest {
+ * string message_id = 1;
+ * string user_id = 2;
+ * }
+ *
+ *
+ * This enables the following two alternative HTTP JSON to RPC
+ * mappings:
+ *
+ * HTTP | RPC
+ * -----|-----
+ * `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+ * `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+ *
+ * # Rules for HTTP mapping
+ *
+ * The rules for mapping HTTP path, query parameters, and body fields
+ * to the request message are as follows:
+ *
+ * 1. The `body` field specifies either `*` or a field path, or is
+ * omitted. If omitted, it assumes there is no HTTP body.
+ * 2. Leaf fields (recursive expansion of nested messages in the
+ * request) can be classified into three types:
+ * (a) Matched in the URL template.
+ * (b) Covered by body (if body is `*`, everything except (a) fields;
+ * else everything under the body field)
+ * (c) All other fields.
+ * 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+ * 4. Any body sent with an HTTP request can contain only (b) fields.
+ *
+ * The syntax of the path template is as follows:
+ *
+ * Template = "/" Segments [ Verb ] ;
+ * Segments = Segment { "/" Segment } ;
+ * Segment = "*" | "**" | LITERAL | Variable ;
+ * Variable = "{" FieldPath [ "=" Segments ] "}" ;
+ * FieldPath = IDENT { "." IDENT } ;
+ * Verb = ":" LITERAL ;
+ *
+ * The syntax `*` matches a single path segment. It follows the semantics of
+ * [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+ * Expansion.
+ *
+ * The syntax `**` matches zero or more path segments. It follows the semantics
+ * of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved
+ * Expansion. NOTE: it must be the last segment in the path except the Verb.
+ *
+ * The syntax `LITERAL` matches literal text in the URL path.
+ *
+ * The syntax `Variable` matches the entire path as specified by its template;
+ * this nested template must not contain further variables. If a variable
+ * matches a single path segment, its template may be omitted, e.g. `{var}`
+ * is equivalent to `{var=*}`.
+ *
+ * NOTE: the field paths in variables and in the `body` must not refer to
+ * repeated fields or map fields.
+ *
+ * Use CustomHttpPattern to specify any HTTP method that is not included in the
+ * `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+ * a given URL path rule. The wild-card rule is useful for services that provide
+ * content to Web (HTML) clients.
+ **/
+@interface GAPIHttpRule : GPBMessage
+
+/**
+ * Selects methods to which this rule applies.
+ *
+ * Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *selector;
+
+/**
+ * Determines the URL pattern is matched by this rules. This pattern can be
+ * used with any of the {get|put|post|delete|patch} methods. A custom method
+ * can be defined using the 'custom' field.
+ **/
+@property(nonatomic, readonly) GAPIHttpRule_Pattern_OneOfCase patternOneOfCase;
+
+/** Used for listing and getting information about resources. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *get;
+
+/** Used for updating a resource. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *put;
+
+/** Used for creating a resource. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *post;
+
+/** Used for deleting a resource. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *delete_p;
+
+/** Used for updating a resource. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *patch;
+
+/** Custom pattern is used for defining custom verbs. */
+@property(nonatomic, readwrite, strong, null_resettable) GAPICustomHttpPattern *custom;
+
+/**
+ * The name of the request field whose value is mapped to the HTTP body, or
+ * `*` for mapping all fields not captured by the path pattern to the HTTP
+ * body. NOTE: the referred field must not be a repeated field and must be
+ * present at the top-level of request message type.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *body;
+
+/**
+ * Additional HTTP bindings for the selector. Nested bindings must
+ * not contain an `additional_bindings` field themselves (that is,
+ * the nesting may only be one level deep).
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GAPIHttpRule*> *additionalBindingsArray;
+/** The number of items in @c additionalBindingsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger additionalBindingsArray_Count;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'pattern'.
+ **/
+void GAPIHttpRule_ClearPatternOneOfCase(GAPIHttpRule *message);
+
+#pragma mark - GAPICustomHttpPattern
+
+typedef GPB_ENUM(GAPICustomHttpPattern_FieldNumber) {
+ GAPICustomHttpPattern_FieldNumber_Kind = 1,
+ GAPICustomHttpPattern_FieldNumber_Path = 2,
+};
+
+/**
+ * A custom pattern is used for defining custom HTTP verb.
+ **/
+@interface GAPICustomHttpPattern : GPBMessage
+
+/** The name of this custom HTTP verb. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *kind;
+
+/** The path matched by this custom verb. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *path;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/api/HTTP.pbobjc.m b/Firestore/Protos/objc/google/api/HTTP.pbobjc.m
new file mode 100644
index 0000000..5adf41c
--- /dev/null
+++ b/Firestore/Protos/objc/google/api/HTTP.pbobjc.m
@@ -0,0 +1,306 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/api/http.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+ #import "HTTP.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GAPIHTTPRoot
+
+@implementation GAPIHTTPRoot
+
+// No extensions in the file and no imports, so no need to generate
+// +extensionRegistry.
+
+@end
+
+#pragma mark - GAPIHTTPRoot_FileDescriptor
+
+static GPBFileDescriptor *GAPIHTTPRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.api"
+ objcPrefix:@"GAPI"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GAPIHttp
+
+@implementation GAPIHttp
+
+@dynamic rulesArray, rulesArray_Count;
+
+typedef struct GAPIHttp__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *rulesArray;
+} GAPIHttp__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "rulesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
+ .number = GAPIHttp_FieldNumber_RulesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GAPIHttp__storage_, rulesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GAPIHttp class]
+ rootClass:[GAPIHTTPRoot class]
+ file:GAPIHTTPRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GAPIHttp__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GAPIHttpRule
+
+@implementation GAPIHttpRule
+
+@dynamic patternOneOfCase;
+@dynamic selector;
+@dynamic get;
+@dynamic put;
+@dynamic post;
+@dynamic delete_p;
+@dynamic patch;
+@dynamic custom;
+@dynamic body;
+@dynamic additionalBindingsArray, additionalBindingsArray_Count;
+
+typedef struct GAPIHttpRule__storage_ {
+ uint32_t _has_storage_[2];
+ NSString *selector;
+ NSString *get;
+ NSString *put;
+ NSString *post;
+ NSString *delete_p;
+ NSString *patch;
+ NSString *body;
+ GAPICustomHttpPattern *custom;
+ NSMutableArray *additionalBindingsArray;
+} GAPIHttpRule__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "selector",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Selector,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, selector),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "get",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Get,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, get),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "put",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Put,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, put),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "post",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Post,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, post),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "delete_p",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Delete_p,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, delete_p),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "patch",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Patch,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, patch),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "body",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPIHttpRule_FieldNumber_Body,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, body),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "custom",
+ .dataTypeSpecific.className = GPBStringifySymbol(GAPICustomHttpPattern),
+ .number = GAPIHttpRule_FieldNumber_Custom,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, custom),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "additionalBindingsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GAPIHttpRule),
+ .number = GAPIHttpRule_FieldNumber_AdditionalBindingsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GAPIHttpRule__storage_, additionalBindingsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GAPIHttpRule class]
+ rootClass:[GAPIHTTPRoot class]
+ file:GAPIHTTPRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GAPIHttpRule__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "pattern",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GAPIHttpRule_ClearPatternOneOfCase(GAPIHttpRule *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GAPICustomHttpPattern
+
+@implementation GAPICustomHttpPattern
+
+@dynamic kind;
+@dynamic path;
+
+typedef struct GAPICustomHttpPattern__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *kind;
+ NSString *path;
+} GAPICustomHttpPattern__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "kind",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPICustomHttpPattern_FieldNumber_Kind,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, kind),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "path",
+ .dataTypeSpecific.className = NULL,
+ .number = GAPICustomHttpPattern_FieldNumber_Path,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GAPICustomHttpPattern__storage_, path),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GAPICustomHttpPattern class]
+ rootClass:[GAPIHTTPRoot class]
+ file:GAPIHTTPRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GAPICustomHttpPattern__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h
new file mode 100644
index 0000000..6215e82
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h
@@ -0,0 +1,223 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/common.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSTransactionOptions_ReadOnly;
+@class GCFSTransactionOptions_ReadWrite;
+@class GPBTimestamp;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - GCFSCommonRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GCFSCommonRoot : GPBRootObject
+@end
+
+#pragma mark - GCFSDocumentMask
+
+typedef GPB_ENUM(GCFSDocumentMask_FieldNumber) {
+ GCFSDocumentMask_FieldNumber_FieldPathsArray = 1,
+};
+
+/**
+ * A set of field paths on a document.
+ * Used to restrict a get or update operation on a document to a subset of its
+ * fields.
+ * This is different from standard field masks, as this is always scoped to a
+ * [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
+ **/
+@interface GCFSDocumentMask : GPBMessage
+
+/**
+ * The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+ * path syntax reference.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *fieldPathsArray;
+/** The number of items in @c fieldPathsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fieldPathsArray_Count;
+
+@end
+
+#pragma mark - GCFSPrecondition
+
+typedef GPB_ENUM(GCFSPrecondition_FieldNumber) {
+ GCFSPrecondition_FieldNumber_Exists = 1,
+ GCFSPrecondition_FieldNumber_UpdateTime = 2,
+};
+
+typedef GPB_ENUM(GCFSPrecondition_ConditionType_OneOfCase) {
+ GCFSPrecondition_ConditionType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSPrecondition_ConditionType_OneOfCase_Exists = 1,
+ GCFSPrecondition_ConditionType_OneOfCase_UpdateTime = 2,
+};
+
+/**
+ * A precondition on a document, used for conditional operations.
+ **/
+@interface GCFSPrecondition : GPBMessage
+
+/** The type of precondition. */
+@property(nonatomic, readonly) GCFSPrecondition_ConditionType_OneOfCase conditionTypeOneOfCase;
+
+/**
+ * When set to `true`, the target document must exist.
+ * When set to `false`, the target document must not exist.
+ **/
+@property(nonatomic, readwrite) BOOL exists;
+
+/**
+ * When set, the target document must exist and have been last updated at
+ * that time.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *updateTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'conditionType'.
+ **/
+void GCFSPrecondition_ClearConditionTypeOneOfCase(GCFSPrecondition *message);
+
+#pragma mark - GCFSTransactionOptions
+
+typedef GPB_ENUM(GCFSTransactionOptions_FieldNumber) {
+ GCFSTransactionOptions_FieldNumber_ReadOnly = 2,
+ GCFSTransactionOptions_FieldNumber_ReadWrite = 3,
+};
+
+typedef GPB_ENUM(GCFSTransactionOptions_Mode_OneOfCase) {
+ GCFSTransactionOptions_Mode_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSTransactionOptions_Mode_OneOfCase_ReadOnly = 2,
+ GCFSTransactionOptions_Mode_OneOfCase_ReadWrite = 3,
+};
+
+/**
+ * Options for creating a new transaction.
+ **/
+@interface GCFSTransactionOptions : GPBMessage
+
+/** The mode of the transaction. */
+@property(nonatomic, readonly) GCFSTransactionOptions_Mode_OneOfCase modeOneOfCase;
+
+/** The transaction can only be used for read operations. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions_ReadOnly *readOnly;
+
+/** The transaction can be used for both read and write operations. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions_ReadWrite *readWrite;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'mode'.
+ **/
+void GCFSTransactionOptions_ClearModeOneOfCase(GCFSTransactionOptions *message);
+
+#pragma mark - GCFSTransactionOptions_ReadWrite
+
+typedef GPB_ENUM(GCFSTransactionOptions_ReadWrite_FieldNumber) {
+ GCFSTransactionOptions_ReadWrite_FieldNumber_RetryTransaction = 1,
+};
+
+/**
+ * Options for a transaction that can be used to read and write documents.
+ **/
+@interface GCFSTransactionOptions_ReadWrite : GPBMessage
+
+/** An optional transaction to retry. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *retryTransaction;
+
+@end
+
+#pragma mark - GCFSTransactionOptions_ReadOnly
+
+typedef GPB_ENUM(GCFSTransactionOptions_ReadOnly_FieldNumber) {
+ GCFSTransactionOptions_ReadOnly_FieldNumber_ReadTime = 2,
+};
+
+typedef GPB_ENUM(GCFSTransactionOptions_ReadOnly_ConsistencySelector_OneOfCase) {
+ GCFSTransactionOptions_ReadOnly_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSTransactionOptions_ReadOnly_ConsistencySelector_OneOfCase_ReadTime = 2,
+};
+
+/**
+ * Options for a transaction that can only be used to read documents.
+ **/
+@interface GCFSTransactionOptions_ReadOnly : GPBMessage
+
+/**
+ * The consistency mode for this transaction. If not set, defaults to strong
+ * consistency.
+ **/
+@property(nonatomic, readonly) GCFSTransactionOptions_ReadOnly_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;
+
+/**
+ * Reads documents at the given time.
+ * This may not be older than 60 seconds.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'consistencySelector'.
+ **/
+void GCFSTransactionOptions_ReadOnly_ClearConsistencySelectorOneOfCase(GCFSTransactionOptions_ReadOnly *message);
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m
new file mode 100644
index 0000000..118f56e
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.m
@@ -0,0 +1,345 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/common.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Common.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GCFSCommonRoot
+
+@implementation GCFSCommonRoot
+
+
+@end
+
+#pragma mark - GCFSCommonRoot_FileDescriptor
+
+static GPBFileDescriptor *GCFSCommonRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
+ objcPrefix:@"GCFS"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GCFSDocumentMask
+
+@implementation GCFSDocumentMask
+
+@dynamic fieldPathsArray, fieldPathsArray_Count;
+
+typedef struct GCFSDocumentMask__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *fieldPathsArray;
+} GCFSDocumentMask__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "fieldPathsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentMask_FieldNumber_FieldPathsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentMask__storage_, fieldPathsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentMask class]
+ rootClass:[GCFSCommonRoot class]
+ file:GCFSCommonRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentMask__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSPrecondition
+
+@implementation GCFSPrecondition
+
+@dynamic conditionTypeOneOfCase;
+@dynamic exists;
+@dynamic updateTime;
+
+typedef struct GCFSPrecondition__storage_ {
+ uint32_t _has_storage_[2];
+ GPBTimestamp *updateTime;
+} GCFSPrecondition__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "exists",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSPrecondition_FieldNumber_Exists,
+ .hasIndex = -1,
+ .offset = 0, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ {
+ .name = "updateTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSPrecondition_FieldNumber_UpdateTime,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSPrecondition__storage_, updateTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSPrecondition class]
+ rootClass:[GCFSCommonRoot class]
+ file:GCFSCommonRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSPrecondition__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "conditionType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSPrecondition_ClearConditionTypeOneOfCase(GCFSPrecondition *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSTransactionOptions
+
+@implementation GCFSTransactionOptions
+
+@dynamic modeOneOfCase;
+@dynamic readOnly;
+@dynamic readWrite;
+
+typedef struct GCFSTransactionOptions__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSTransactionOptions_ReadOnly *readOnly;
+ GCFSTransactionOptions_ReadWrite *readWrite;
+} GCFSTransactionOptions__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "readOnly",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTransactionOptions_ReadOnly),
+ .number = GCFSTransactionOptions_FieldNumber_ReadOnly,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTransactionOptions__storage_, readOnly),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "readWrite",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTransactionOptions_ReadWrite),
+ .number = GCFSTransactionOptions_FieldNumber_ReadWrite,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTransactionOptions__storage_, readWrite),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTransactionOptions class]
+ rootClass:[GCFSCommonRoot class]
+ file:GCFSCommonRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTransactionOptions__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "mode",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSTransactionOptions_ClearModeOneOfCase(GCFSTransactionOptions *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSTransactionOptions_ReadWrite
+
+@implementation GCFSTransactionOptions_ReadWrite
+
+@dynamic retryTransaction;
+
+typedef struct GCFSTransactionOptions_ReadWrite__storage_ {
+ uint32_t _has_storage_[1];
+ NSData *retryTransaction;
+} GCFSTransactionOptions_ReadWrite__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "retryTransaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTransactionOptions_ReadWrite_FieldNumber_RetryTransaction,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSTransactionOptions_ReadWrite__storage_, retryTransaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTransactionOptions_ReadWrite class]
+ rootClass:[GCFSCommonRoot class]
+ file:GCFSCommonRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTransactionOptions_ReadWrite__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSTransactionOptions)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSTransactionOptions_ReadOnly
+
+@implementation GCFSTransactionOptions_ReadOnly
+
+@dynamic consistencySelectorOneOfCase;
+@dynamic readTime;
+
+typedef struct GCFSTransactionOptions_ReadOnly__storage_ {
+ uint32_t _has_storage_[2];
+ GPBTimestamp *readTime;
+} GCFSTransactionOptions_ReadOnly__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSTransactionOptions_ReadOnly_FieldNumber_ReadTime,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTransactionOptions_ReadOnly__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTransactionOptions_ReadOnly class]
+ rootClass:[GCFSCommonRoot class]
+ file:GCFSCommonRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTransactionOptions_ReadOnly__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "consistencySelector",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSTransactionOptions)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSTransactionOptions_ReadOnly_ClearConsistencySelectorOneOfCase(GCFSTransactionOptions_ReadOnly *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h
new file mode 100644
index 0000000..3c5bfb1
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h
@@ -0,0 +1,309 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/document.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSArrayValue;
+@class GCFSMapValue;
+@class GCFSValue;
+@class GPBTimestamp;
+@class GTPLatLng;
+GPB_ENUM_FWD_DECLARE(GPBNullValue);
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - GCFSDocumentRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GCFSDocumentRoot : GPBRootObject
+@end
+
+#pragma mark - GCFSDocument
+
+typedef GPB_ENUM(GCFSDocument_FieldNumber) {
+ GCFSDocument_FieldNumber_Name = 1,
+ GCFSDocument_FieldNumber_Fields = 2,
+ GCFSDocument_FieldNumber_CreateTime = 3,
+ GCFSDocument_FieldNumber_UpdateTime = 4,
+};
+
+/**
+ * A Firestore document.
+ *
+ * Must not exceed 1 MiB - 4 bytes.
+ **/
+@interface GCFSDocument : GPBMessage
+
+/**
+ * The resource name of the document, for example
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
+
+/**
+ * The document's fields.
+ *
+ * The map keys represent field names.
+ *
+ * A simple field name contains only characters `a` to `z`, `A` to `Z`,
+ * `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
+ * `foo_bar_17`.
+ *
+ * Field names matching the regular expression `__.*__` are reserved. Reserved
+ * field names are forbidden except in certain documented contexts. The map
+ * keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+ * empty.
+ *
+ * Field paths may be used in other contexts to refer to structured fields
+ * defined here. For `map_value`, the field path is represented by the simple
+ * or quoted field names of the containing fields, delimited by `.`. For
+ * example, the structured field
+ * `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+ * represented by the field path `foo.x&y`.
+ *
+ * Within a field path, a quoted field name starts and ends with `` ` `` and
+ * may contain any character. Some characters, including `` ` ``, must be
+ * escaped using a `\\`. For example, `` `x&y` `` represents `x&y` and
+ * `` `bak\\`tik` `` represents `` bak`tik ``.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GCFSValue*> *fields;
+/** The number of items in @c fields without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fields_Count;
+
+/**
+ * Output only. The time at which the document was created.
+ *
+ * This value increases monotonically when a document is deleted then
+ * recreated. It can also be compared to values from other documents and
+ * the `read_time` of a query.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *createTime;
+/** Test to see if @c createTime has been set. */
+@property(nonatomic, readwrite) BOOL hasCreateTime;
+
+/**
+ * Output only. The time at which the document was last changed.
+ *
+ * This value is initally set to the `create_time` then increases
+ * monotonically with each change to the document. It can also be
+ * compared to values from other documents and the `read_time` of a query.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *updateTime;
+/** Test to see if @c updateTime has been set. */
+@property(nonatomic, readwrite) BOOL hasUpdateTime;
+
+@end
+
+#pragma mark - GCFSValue
+
+typedef GPB_ENUM(GCFSValue_FieldNumber) {
+ GCFSValue_FieldNumber_BooleanValue = 1,
+ GCFSValue_FieldNumber_IntegerValue = 2,
+ GCFSValue_FieldNumber_DoubleValue = 3,
+ GCFSValue_FieldNumber_ReferenceValue = 5,
+ GCFSValue_FieldNumber_MapValue = 6,
+ GCFSValue_FieldNumber_GeoPointValue = 8,
+ GCFSValue_FieldNumber_ArrayValue = 9,
+ GCFSValue_FieldNumber_TimestampValue = 10,
+ GCFSValue_FieldNumber_NullValue = 11,
+ GCFSValue_FieldNumber_StringValue = 17,
+ GCFSValue_FieldNumber_BytesValue = 18,
+};
+
+typedef GPB_ENUM(GCFSValue_ValueType_OneOfCase) {
+ GCFSValue_ValueType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSValue_ValueType_OneOfCase_NullValue = 11,
+ GCFSValue_ValueType_OneOfCase_BooleanValue = 1,
+ GCFSValue_ValueType_OneOfCase_IntegerValue = 2,
+ GCFSValue_ValueType_OneOfCase_DoubleValue = 3,
+ GCFSValue_ValueType_OneOfCase_TimestampValue = 10,
+ GCFSValue_ValueType_OneOfCase_StringValue = 17,
+ GCFSValue_ValueType_OneOfCase_BytesValue = 18,
+ GCFSValue_ValueType_OneOfCase_ReferenceValue = 5,
+ GCFSValue_ValueType_OneOfCase_GeoPointValue = 8,
+ GCFSValue_ValueType_OneOfCase_ArrayValue = 9,
+ GCFSValue_ValueType_OneOfCase_MapValue = 6,
+};
+
+/**
+ * A message that can hold any of the supported value types.
+ **/
+@interface GCFSValue : GPBMessage
+
+/** Must have a value set. */
+@property(nonatomic, readonly) GCFSValue_ValueType_OneOfCase valueTypeOneOfCase;
+
+/** A null value. */
+@property(nonatomic, readwrite) enum GPBNullValue nullValue;
+
+/** A boolean value. */
+@property(nonatomic, readwrite) BOOL booleanValue;
+
+/** An integer value. */
+@property(nonatomic, readwrite) int64_t integerValue;
+
+/** A double value. */
+@property(nonatomic, readwrite) double doubleValue;
+
+/**
+ * A timestamp value.
+ *
+ * Precise only to microseconds. When stored, any additional precision is
+ * rounded down.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *timestampValue;
+
+/**
+ * A string value.
+ *
+ * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+ * Only the first 1,500 bytes of the UTF-8 representation are considered by
+ * queries.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
+
+/**
+ * A bytes value.
+ *
+ * Must not exceed 1 MiB - 89 bytes.
+ * Only the first 1,500 bytes are considered by queries.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *bytesValue;
+
+/**
+ * A reference to a document. For example:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *referenceValue;
+
+/** A geo point value representing a point on the surface of Earth. */
+@property(nonatomic, readwrite, strong, null_resettable) GTPLatLng *geoPointValue;
+
+/**
+ * An array value.
+ *
+ * Cannot contain another array value.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSArrayValue *arrayValue;
+
+/** A map value. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSMapValue *mapValue;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSValue's @c nullValue property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSValue_NullValue_RawValue(GCFSValue *message);
+/**
+ * Sets the raw value of an @c GCFSValue's @c nullValue property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSValue_NullValue_RawValue(GCFSValue *message, int32_t value);
+
+/**
+ * Clears whatever value was set for the oneof 'valueType'.
+ **/
+void GCFSValue_ClearValueTypeOneOfCase(GCFSValue *message);
+
+#pragma mark - GCFSArrayValue
+
+typedef GPB_ENUM(GCFSArrayValue_FieldNumber) {
+ GCFSArrayValue_FieldNumber_ValuesArray = 1,
+};
+
+/**
+ * An array value.
+ **/
+@interface GCFSArrayValue : GPBMessage
+
+/** Values in the array. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSValue*> *valuesArray;
+/** The number of items in @c valuesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger valuesArray_Count;
+
+@end
+
+#pragma mark - GCFSMapValue
+
+typedef GPB_ENUM(GCFSMapValue_FieldNumber) {
+ GCFSMapValue_FieldNumber_Fields = 1,
+};
+
+/**
+ * A map value.
+ **/
+@interface GCFSMapValue : GPBMessage
+
+/**
+ * The map's fields.
+ *
+ * The map keys represent field names. Field names matching the regular
+ * expression `__.*__` are reserved. Reserved field names are forbidden except
+ * in certain documented contexts. The map keys, represented as UTF-8, must
+ * not exceed 1,500 bytes and cannot be empty.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GCFSValue*> *fields;
+/** The number of items in @c fields without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fields_Count;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m
new file mode 100644
index 0000000..2c805c3
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m
@@ -0,0 +1,412 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/document.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Struct.pbobjc.h>
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Struct.pbobjc.h"
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Document.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+ #import "Latlng.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GCFSDocumentRoot
+
+@implementation GCFSDocumentRoot
+
+
+@end
+
+#pragma mark - GCFSDocumentRoot_FileDescriptor
+
+static GPBFileDescriptor *GCFSDocumentRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
+ objcPrefix:@"GCFS"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GCFSDocument
+
+@implementation GCFSDocument
+
+@dynamic name;
+@dynamic fields, fields_Count;
+@dynamic hasCreateTime, createTime;
+@dynamic hasUpdateTime, updateTime;
+
+typedef struct GCFSDocument__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *name;
+ NSMutableDictionary *fields;
+ GPBTimestamp *createTime;
+ GPBTimestamp *updateTime;
+} GCFSDocument__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "name",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocument_FieldNumber_Name,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocument__storage_, name),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "fields",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSDocument_FieldNumber_Fields,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocument__storage_, fields),
+ .flags = GPBFieldMapKeyString,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "createTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSDocument_FieldNumber_CreateTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSDocument__storage_, createTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "updateTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSDocument_FieldNumber_UpdateTime,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSDocument__storage_, updateTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocument class]
+ rootClass:[GCFSDocumentRoot class]
+ file:GCFSDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocument__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSValue
+
+@implementation GCFSValue
+
+@dynamic valueTypeOneOfCase;
+@dynamic nullValue;
+@dynamic booleanValue;
+@dynamic integerValue;
+@dynamic doubleValue;
+@dynamic timestampValue;
+@dynamic stringValue;
+@dynamic bytesValue;
+@dynamic referenceValue;
+@dynamic geoPointValue;
+@dynamic arrayValue;
+@dynamic mapValue;
+
+typedef struct GCFSValue__storage_ {
+ uint32_t _has_storage_[2];
+ GPBNullValue nullValue;
+ NSString *referenceValue;
+ GCFSMapValue *mapValue;
+ GTPLatLng *geoPointValue;
+ GCFSArrayValue *arrayValue;
+ GPBTimestamp *timestampValue;
+ NSString *stringValue;
+ NSData *bytesValue;
+ int64_t integerValue;
+ double doubleValue;
+} GCFSValue__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "booleanValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_BooleanValue,
+ .hasIndex = -1,
+ .offset = 0, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ {
+ .name = "integerValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_IntegerValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, integerValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt64,
+ },
+ {
+ .name = "doubleValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_DoubleValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, doubleValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeDouble,
+ },
+ {
+ .name = "referenceValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_ReferenceValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, referenceValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "mapValue",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSMapValue),
+ .number = GCFSValue_FieldNumber_MapValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, mapValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "geoPointValue",
+ .dataTypeSpecific.className = GPBStringifySymbol(GTPLatLng),
+ .number = GCFSValue_FieldNumber_GeoPointValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, geoPointValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "arrayValue",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSArrayValue),
+ .number = GCFSValue_FieldNumber_ArrayValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, arrayValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "timestampValue",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSValue_FieldNumber_TimestampValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, timestampValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "nullValue",
+ .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor,
+ .number = GCFSValue_FieldNumber_NullValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, nullValue),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ {
+ .name = "stringValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_StringValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, stringValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "bytesValue",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSValue_FieldNumber_BytesValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSValue__storage_, bytesValue),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSValue class]
+ rootClass:[GCFSDocumentRoot class]
+ file:GCFSDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSValue__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "valueType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSValue_NullValue_RawValue(GCFSValue *message) {
+ GPBDescriptor *descriptor = [GCFSValue descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSValue_FieldNumber_NullValue];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSValue_NullValue_RawValue(GCFSValue *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSValue descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSValue_FieldNumber_NullValue];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+void GCFSValue_ClearValueTypeOneOfCase(GCFSValue *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSArrayValue
+
+@implementation GCFSArrayValue
+
+@dynamic valuesArray, valuesArray_Count;
+
+typedef struct GCFSArrayValue__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *valuesArray;
+} GCFSArrayValue__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "valuesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSArrayValue_FieldNumber_ValuesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSArrayValue__storage_, valuesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSArrayValue class]
+ rootClass:[GCFSDocumentRoot class]
+ file:GCFSDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSArrayValue__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSMapValue
+
+@implementation GCFSMapValue
+
+@dynamic fields, fields_Count;
+
+typedef struct GCFSMapValue__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableDictionary *fields;
+} GCFSMapValue__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "fields",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSMapValue_FieldNumber_Fields,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSMapValue__storage_, fields),
+ .flags = GPBFieldMapKeyString,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSMapValue class]
+ rootClass:[GCFSDocumentRoot class]
+ file:GCFSDocumentRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSMapValue__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h
new file mode 100644
index 0000000..0acd8c0
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h
@@ -0,0 +1,1342 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/firestore.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSDocument;
+@class GCFSDocumentChange;
+@class GCFSDocumentDelete;
+@class GCFSDocumentMask;
+@class GCFSDocumentRemove;
+@class GCFSExistenceFilter;
+@class GCFSPrecondition;
+@class GCFSStructuredQuery;
+@class GCFSTarget;
+@class GCFSTargetChange;
+@class GCFSTarget_DocumentsTarget;
+@class GCFSTarget_QueryTarget;
+@class GCFSTransactionOptions;
+@class GCFSWrite;
+@class GCFSWriteResult;
+@class GPBTimestamp;
+@class RPCStatus;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - Enum GCFSTargetChange_TargetChangeType
+
+/** The type of change. */
+typedef GPB_ENUM(GCFSTargetChange_TargetChangeType) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSTargetChange_TargetChangeType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** No change has occurred. Used only to send an updated `resume_token`. */
+ GCFSTargetChange_TargetChangeType_NoChange = 0,
+
+ /** The targets have been added. */
+ GCFSTargetChange_TargetChangeType_Add = 1,
+
+ /** The targets have been removed. */
+ GCFSTargetChange_TargetChangeType_Remove = 2,
+
+ /**
+ * The targets reflect all changes committed before the targets were added
+ * to the stream.
+ *
+ * This will be sent after or with a `read_time` that is greater than or
+ * equal to the time at which the targets were added.
+ *
+ * Listeners can wait for this change if read-after-write semantics
+ * are desired.
+ **/
+ GCFSTargetChange_TargetChangeType_Current = 3,
+
+ /**
+ * The targets have been reset, and a new initial state for the targets
+ * will be returned in subsequent changes.
+ *
+ * After the initial state is complete, `CURRENT` will be returned even
+ * if the target was previously indicated to be `CURRENT`.
+ **/
+ GCFSTargetChange_TargetChangeType_Reset = 4,
+};
+
+GPBEnumDescriptor *GCFSTargetChange_TargetChangeType_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSTargetChange_TargetChangeType_IsValidValue(int32_t value);
+
+#pragma mark - GCFSFirestoreRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GCFSFirestoreRoot : GPBRootObject
+@end
+
+#pragma mark - GCFSGetDocumentRequest
+
+typedef GPB_ENUM(GCFSGetDocumentRequest_FieldNumber) {
+ GCFSGetDocumentRequest_FieldNumber_Name = 1,
+ GCFSGetDocumentRequest_FieldNumber_Mask = 2,
+ GCFSGetDocumentRequest_FieldNumber_Transaction = 3,
+ GCFSGetDocumentRequest_FieldNumber_ReadTime = 5,
+};
+
+typedef GPB_ENUM(GCFSGetDocumentRequest_ConsistencySelector_OneOfCase) {
+ GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_Transaction = 3,
+ GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_ReadTime = 5,
+};
+
+/**
+ * The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
+ **/
+@interface GCFSGetDocumentRequest : GPBMessage
+
+/**
+ * The resource name of the Document to get. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
+
+/**
+ * The fields to return. If not set, returns all fields.
+ *
+ * If the document has a field that is not present in this mask, that field
+ * will not be returned in the response.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
+/** Test to see if @c mask has been set. */
+@property(nonatomic, readwrite) BOOL hasMask;
+
+/**
+ * The consistency mode for this transaction.
+ * If not set, defaults to strong consistency.
+ **/
+@property(nonatomic, readonly) GCFSGetDocumentRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;
+
+/** Reads the document in a transaction. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * Reads the version of the document at the given time.
+ * This may not be older than 60 seconds.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'consistencySelector'.
+ **/
+void GCFSGetDocumentRequest_ClearConsistencySelectorOneOfCase(GCFSGetDocumentRequest *message);
+
+#pragma mark - GCFSListDocumentsRequest
+
+typedef GPB_ENUM(GCFSListDocumentsRequest_FieldNumber) {
+ GCFSListDocumentsRequest_FieldNumber_Parent = 1,
+ GCFSListDocumentsRequest_FieldNumber_CollectionId = 2,
+ GCFSListDocumentsRequest_FieldNumber_PageSize = 3,
+ GCFSListDocumentsRequest_FieldNumber_PageToken = 4,
+ GCFSListDocumentsRequest_FieldNumber_OrderBy = 6,
+ GCFSListDocumentsRequest_FieldNumber_Mask = 7,
+ GCFSListDocumentsRequest_FieldNumber_Transaction = 8,
+ GCFSListDocumentsRequest_FieldNumber_ReadTime = 10,
+ GCFSListDocumentsRequest_FieldNumber_ShowMissing = 12,
+};
+
+typedef GPB_ENUM(GCFSListDocumentsRequest_ConsistencySelector_OneOfCase) {
+ GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_Transaction = 8,
+ GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_ReadTime = 10,
+};
+
+/**
+ * The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+ **/
+@interface GCFSListDocumentsRequest : GPBMessage
+
+/**
+ * The parent resource name. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents` or
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * For example:
+ * `projects/my-project/databases/my-database/documents` or
+ * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;
+
+/**
+ * The collection ID, relative to `parent`, to list. For example: `chatrooms`
+ * or `messages`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *collectionId;
+
+/** The maximum number of documents to return. */
+@property(nonatomic, readwrite) int32_t pageSize;
+
+/** The `next_page_token` value returned from a previous List request, if any. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *pageToken;
+
+/** The order to sort results by. For example: `priority desc, name`. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *orderBy;
+
+/**
+ * The fields to return. If not set, returns all fields.
+ *
+ * If a document has a field that is not present in this mask, that field
+ * will not be returned in the response.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
+/** Test to see if @c mask has been set. */
+@property(nonatomic, readwrite) BOOL hasMask;
+
+/**
+ * The consistency mode for this transaction.
+ * If not set, defaults to strong consistency.
+ **/
+@property(nonatomic, readonly) GCFSListDocumentsRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;
+
+/** Reads documents in a transaction. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * Reads documents as they were at the given time.
+ * This may not be older than 60 seconds.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+/**
+ * If the list should show missing documents. A missing document is a
+ * document that does not exist but has sub-documents. These documents will
+ * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+ * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+ *
+ * Requests with `show_missing` may not specify `where` or
+ * `order_by`.
+ **/
+@property(nonatomic, readwrite) BOOL showMissing;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'consistencySelector'.
+ **/
+void GCFSListDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSListDocumentsRequest *message);
+
+#pragma mark - GCFSListDocumentsResponse
+
+typedef GPB_ENUM(GCFSListDocumentsResponse_FieldNumber) {
+ GCFSListDocumentsResponse_FieldNumber_DocumentsArray = 1,
+ GCFSListDocumentsResponse_FieldNumber_NextPageToken = 2,
+};
+
+/**
+ * The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+ **/
+@interface GCFSListDocumentsResponse : GPBMessage
+
+/** The Documents found. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSDocument*> *documentsArray;
+/** The number of items in @c documentsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger documentsArray_Count;
+
+/** The next page token. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *nextPageToken;
+
+@end
+
+#pragma mark - GCFSCreateDocumentRequest
+
+typedef GPB_ENUM(GCFSCreateDocumentRequest_FieldNumber) {
+ GCFSCreateDocumentRequest_FieldNumber_Parent = 1,
+ GCFSCreateDocumentRequest_FieldNumber_CollectionId = 2,
+ GCFSCreateDocumentRequest_FieldNumber_DocumentId = 3,
+ GCFSCreateDocumentRequest_FieldNumber_Document = 4,
+ GCFSCreateDocumentRequest_FieldNumber_Mask = 5,
+};
+
+/**
+ * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
+ **/
+@interface GCFSCreateDocumentRequest : GPBMessage
+
+/**
+ * The parent resource. For example:
+ * `projects/{project_id}/databases/{database_id}/documents` or
+ * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;
+
+/** The collection ID, relative to `parent`, to list. For example: `chatrooms`. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *collectionId;
+
+/**
+ * The client-assigned document ID to use for this document.
+ *
+ * Optional. If not specified, an ID will be assigned by the service.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *documentId;
+
+/** The document to create. `name` must not be set. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
+/** Test to see if @c document has been set. */
+@property(nonatomic, readwrite) BOOL hasDocument;
+
+/**
+ * The fields to return. If not set, returns all fields.
+ *
+ * If the document has a field that is not present in this mask, that field
+ * will not be returned in the response.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
+/** Test to see if @c mask has been set. */
+@property(nonatomic, readwrite) BOOL hasMask;
+
+@end
+
+#pragma mark - GCFSUpdateDocumentRequest
+
+typedef GPB_ENUM(GCFSUpdateDocumentRequest_FieldNumber) {
+ GCFSUpdateDocumentRequest_FieldNumber_Document = 1,
+ GCFSUpdateDocumentRequest_FieldNumber_UpdateMask = 2,
+ GCFSUpdateDocumentRequest_FieldNumber_Mask = 3,
+ GCFSUpdateDocumentRequest_FieldNumber_CurrentDocument = 4,
+};
+
+/**
+ * The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
+ **/
+@interface GCFSUpdateDocumentRequest : GPBMessage
+
+/**
+ * The updated document.
+ * Creates the document if it does not already exist.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
+/** Test to see if @c document has been set. */
+@property(nonatomic, readwrite) BOOL hasDocument;
+
+/**
+ * The fields to update.
+ * None of the field paths in the mask may contain a reserved name.
+ *
+ * If the document exists on the server and has fields not referenced in the
+ * mask, they are left unchanged.
+ * Fields referenced in the mask, but not present in the input document, are
+ * deleted from the document on the server.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *updateMask;
+/** Test to see if @c updateMask has been set. */
+@property(nonatomic, readwrite) BOOL hasUpdateMask;
+
+/**
+ * The fields to return. If not set, returns all fields.
+ *
+ * If the document has a field that is not present in this mask, that field
+ * will not be returned in the response.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
+/** Test to see if @c mask has been set. */
+@property(nonatomic, readwrite) BOOL hasMask;
+
+/**
+ * An optional precondition on the document.
+ * The request will fail if this is set and not met by the target document.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument;
+/** Test to see if @c currentDocument has been set. */
+@property(nonatomic, readwrite) BOOL hasCurrentDocument;
+
+@end
+
+#pragma mark - GCFSDeleteDocumentRequest
+
+typedef GPB_ENUM(GCFSDeleteDocumentRequest_FieldNumber) {
+ GCFSDeleteDocumentRequest_FieldNumber_Name = 1,
+ GCFSDeleteDocumentRequest_FieldNumber_CurrentDocument = 2,
+};
+
+/**
+ * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
+ **/
+@interface GCFSDeleteDocumentRequest : GPBMessage
+
+/**
+ * The resource name of the Document to delete. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
+
+/**
+ * An optional precondition on the document.
+ * The request will fail if this is set and not met by the target document.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument;
+/** Test to see if @c currentDocument has been set. */
+@property(nonatomic, readwrite) BOOL hasCurrentDocument;
+
+@end
+
+#pragma mark - GCFSBatchGetDocumentsRequest
+
+typedef GPB_ENUM(GCFSBatchGetDocumentsRequest_FieldNumber) {
+ GCFSBatchGetDocumentsRequest_FieldNumber_Database = 1,
+ GCFSBatchGetDocumentsRequest_FieldNumber_DocumentsArray = 2,
+ GCFSBatchGetDocumentsRequest_FieldNumber_Mask = 3,
+ GCFSBatchGetDocumentsRequest_FieldNumber_Transaction = 4,
+ GCFSBatchGetDocumentsRequest_FieldNumber_NewTransaction = 5,
+ GCFSBatchGetDocumentsRequest_FieldNumber_ReadTime = 7,
+};
+
+typedef GPB_ENUM(GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase) {
+ GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_Transaction = 4,
+ GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_NewTransaction = 5,
+ GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_ReadTime = 7,
+};
+
+/**
+ * The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+ **/
+@interface GCFSBatchGetDocumentsRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/**
+ * The names of the documents to retrieve. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * The request will fail if any of the document is not a child resource of the
+ * given `database`. Duplicate names will be elided.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *documentsArray;
+/** The number of items in @c documentsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger documentsArray_Count;
+
+/**
+ * The fields to return. If not set, returns all fields.
+ *
+ * If a document has a field that is not present in this mask, that field will
+ * not be returned in the response.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
+/** Test to see if @c mask has been set. */
+@property(nonatomic, readwrite) BOOL hasMask;
+
+/**
+ * The consistency mode for this transaction.
+ * If not set, defaults to strong consistency.
+ **/
+@property(nonatomic, readonly) GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;
+
+/** Reads documents in a transaction. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * Starts a new transaction and reads the documents.
+ * Defaults to a read-only transaction.
+ * The new transaction ID will be returned as the first response in the
+ * stream.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *newTransaction NS_RETURNS_NOT_RETAINED;
+
+/**
+ * Reads documents as they were at the given time.
+ * This may not be older than 60 seconds.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'consistencySelector'.
+ **/
+void GCFSBatchGetDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSBatchGetDocumentsRequest *message);
+
+#pragma mark - GCFSBatchGetDocumentsResponse
+
+typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_FieldNumber) {
+ GCFSBatchGetDocumentsResponse_FieldNumber_Found = 1,
+ GCFSBatchGetDocumentsResponse_FieldNumber_Missing = 2,
+ GCFSBatchGetDocumentsResponse_FieldNumber_Transaction = 3,
+ GCFSBatchGetDocumentsResponse_FieldNumber_ReadTime = 4,
+};
+
+typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_Result_OneOfCase) {
+ GCFSBatchGetDocumentsResponse_Result_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSBatchGetDocumentsResponse_Result_OneOfCase_Found = 1,
+ GCFSBatchGetDocumentsResponse_Result_OneOfCase_Missing = 2,
+};
+
+/**
+ * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+ **/
+@interface GCFSBatchGetDocumentsResponse : GPBMessage
+
+/**
+ * A single result.
+ * This can be empty if the server is just returning a transaction.
+ **/
+@property(nonatomic, readonly) GCFSBatchGetDocumentsResponse_Result_OneOfCase resultOneOfCase;
+
+/** A document that was requested. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *found;
+
+/**
+ * A document name that was requested but does not exist. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *missing;
+
+/**
+ * The transaction that was started as part of this request.
+ * Will only be set in the first response, and only if
+ * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * The time at which the document was read.
+ * This may be monotically increasing, in this case the previous documents in
+ * the result stream are guaranteed not to have changed between their
+ * read_time and this one.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'result'.
+ **/
+void GCFSBatchGetDocumentsResponse_ClearResultOneOfCase(GCFSBatchGetDocumentsResponse *message);
+
+#pragma mark - GCFSBeginTransactionRequest
+
+typedef GPB_ENUM(GCFSBeginTransactionRequest_FieldNumber) {
+ GCFSBeginTransactionRequest_FieldNumber_Database = 1,
+ GCFSBeginTransactionRequest_FieldNumber_Options = 2,
+};
+
+/**
+ * The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+ **/
+@interface GCFSBeginTransactionRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/**
+ * The options for the transaction.
+ * Defaults to a read-write transaction.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *options;
+/** Test to see if @c options has been set. */
+@property(nonatomic, readwrite) BOOL hasOptions;
+
+@end
+
+#pragma mark - GCFSBeginTransactionResponse
+
+typedef GPB_ENUM(GCFSBeginTransactionResponse_FieldNumber) {
+ GCFSBeginTransactionResponse_FieldNumber_Transaction = 1,
+};
+
+/**
+ * The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+ **/
+@interface GCFSBeginTransactionResponse : GPBMessage
+
+/** The transaction that was started. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+@end
+
+#pragma mark - GCFSCommitRequest
+
+typedef GPB_ENUM(GCFSCommitRequest_FieldNumber) {
+ GCFSCommitRequest_FieldNumber_Database = 1,
+ GCFSCommitRequest_FieldNumber_WritesArray = 2,
+ GCFSCommitRequest_FieldNumber_Transaction = 3,
+};
+
+/**
+ * The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+ **/
+@interface GCFSCommitRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/**
+ * The writes to apply.
+ *
+ * Always executed atomically and in order.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWrite*> *writesArray;
+/** The number of items in @c writesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger writesArray_Count;
+
+/**
+ * If non-empty, applies all writes in this transaction, and commits it.
+ * Otherwise, applies the writes as if they were in their own transaction.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+@end
+
+#pragma mark - GCFSCommitResponse
+
+typedef GPB_ENUM(GCFSCommitResponse_FieldNumber) {
+ GCFSCommitResponse_FieldNumber_WriteResultsArray = 1,
+ GCFSCommitResponse_FieldNumber_CommitTime = 2,
+};
+
+/**
+ * The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+ **/
+@interface GCFSCommitResponse : GPBMessage
+
+/**
+ * The result of applying the writes.
+ *
+ * This i-th write result corresponds to the i-th write in the
+ * request.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWriteResult*> *writeResultsArray;
+/** The number of items in @c writeResultsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger writeResultsArray_Count;
+
+/** The time at which the commit occurred. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *commitTime;
+/** Test to see if @c commitTime has been set. */
+@property(nonatomic, readwrite) BOOL hasCommitTime;
+
+@end
+
+#pragma mark - GCFSRollbackRequest
+
+typedef GPB_ENUM(GCFSRollbackRequest_FieldNumber) {
+ GCFSRollbackRequest_FieldNumber_Database = 1,
+ GCFSRollbackRequest_FieldNumber_Transaction = 2,
+};
+
+/**
+ * The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
+ **/
+@interface GCFSRollbackRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/** The transaction to roll back. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+@end
+
+#pragma mark - GCFSRunQueryRequest
+
+typedef GPB_ENUM(GCFSRunQueryRequest_FieldNumber) {
+ GCFSRunQueryRequest_FieldNumber_Parent = 1,
+ GCFSRunQueryRequest_FieldNumber_StructuredQuery = 2,
+ GCFSRunQueryRequest_FieldNumber_Transaction = 5,
+ GCFSRunQueryRequest_FieldNumber_NewTransaction = 6,
+ GCFSRunQueryRequest_FieldNumber_ReadTime = 7,
+};
+
+typedef GPB_ENUM(GCFSRunQueryRequest_QueryType_OneOfCase) {
+ GCFSRunQueryRequest_QueryType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSRunQueryRequest_QueryType_OneOfCase_StructuredQuery = 2,
+};
+
+typedef GPB_ENUM(GCFSRunQueryRequest_ConsistencySelector_OneOfCase) {
+ GCFSRunQueryRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSRunQueryRequest_ConsistencySelector_OneOfCase_Transaction = 5,
+ GCFSRunQueryRequest_ConsistencySelector_OneOfCase_NewTransaction = 6,
+ GCFSRunQueryRequest_ConsistencySelector_OneOfCase_ReadTime = 7,
+};
+
+/**
+ * The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+ **/
+@interface GCFSRunQueryRequest : GPBMessage
+
+/**
+ * The parent resource name. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents` or
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * For example:
+ * `projects/my-project/databases/my-database/documents` or
+ * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;
+
+/** The query to run. */
+@property(nonatomic, readonly) GCFSRunQueryRequest_QueryType_OneOfCase queryTypeOneOfCase;
+
+/** A structured query. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery *structuredQuery;
+
+/**
+ * The consistency mode for this transaction.
+ * If not set, defaults to strong consistency.
+ **/
+@property(nonatomic, readonly) GCFSRunQueryRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;
+
+/** Reads documents in a transaction. */
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * Starts a new transaction and reads the documents.
+ * Defaults to a read-only transaction.
+ * The new transaction ID will be returned as the first response in the
+ * stream.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *newTransaction NS_RETURNS_NOT_RETAINED;
+
+/**
+ * Reads documents as they were at the given time.
+ * This may not be older than 60 seconds.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'queryType'.
+ **/
+void GCFSRunQueryRequest_ClearQueryTypeOneOfCase(GCFSRunQueryRequest *message);
+/**
+ * Clears whatever value was set for the oneof 'consistencySelector'.
+ **/
+void GCFSRunQueryRequest_ClearConsistencySelectorOneOfCase(GCFSRunQueryRequest *message);
+
+#pragma mark - GCFSRunQueryResponse
+
+typedef GPB_ENUM(GCFSRunQueryResponse_FieldNumber) {
+ GCFSRunQueryResponse_FieldNumber_Document = 1,
+ GCFSRunQueryResponse_FieldNumber_Transaction = 2,
+ GCFSRunQueryResponse_FieldNumber_ReadTime = 3,
+ GCFSRunQueryResponse_FieldNumber_SkippedResults = 4,
+};
+
+/**
+ * The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+ **/
+@interface GCFSRunQueryResponse : GPBMessage
+
+/**
+ * The transaction that was started as part of this request.
+ * Can only be set in the first response, and only if
+ * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+ * If set, no other fields will be set in this response.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;
+
+/**
+ * A query result.
+ * Not set when reporting partial progress.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
+/** Test to see if @c document has been set. */
+@property(nonatomic, readwrite) BOOL hasDocument;
+
+/**
+ * The time at which the document was read. This may be monotonically
+ * increasing; in this case, the previous documents in the result stream are
+ * guaranteed not to have changed between their `read_time` and this one.
+ *
+ * If the query returns no results, a response with `read_time` and no
+ * `document` will be sent, and this represents the time at which the query
+ * was run.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+/**
+ * The number of results that have been skipped due to an offset between
+ * the last response and the current response.
+ **/
+@property(nonatomic, readwrite) int32_t skippedResults;
+
+@end
+
+#pragma mark - GCFSWriteRequest
+
+typedef GPB_ENUM(GCFSWriteRequest_FieldNumber) {
+ GCFSWriteRequest_FieldNumber_Database = 1,
+ GCFSWriteRequest_FieldNumber_StreamId = 2,
+ GCFSWriteRequest_FieldNumber_WritesArray = 3,
+ GCFSWriteRequest_FieldNumber_StreamToken = 4,
+ GCFSWriteRequest_FieldNumber_Labels = 5,
+};
+
+/**
+ * The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+ *
+ * The first request creates a stream, or resumes an existing one from a token.
+ *
+ * When creating a new stream, the server replies with a response containing
+ * only an ID and a token, to use in the next request.
+ *
+ * When resuming a stream, the server first streams any responses later than the
+ * given token, then a response containing only an up-to-date token, to use in
+ * the next request.
+ **/
+@interface GCFSWriteRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ * This is only required in the first message.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/**
+ * The ID of the write stream to resume.
+ * This may only be set in the first message. When left empty, a new write
+ * stream will be created.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *streamId;
+
+/**
+ * The writes to apply.
+ *
+ * Always executed atomically and in order.
+ * This must be empty on the first request.
+ * This may be empty on the last request.
+ * This must not be empty on all other requests.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWrite*> *writesArray;
+/** The number of items in @c writesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger writesArray_Count;
+
+/**
+ * A stream token that was previously sent by the server.
+ *
+ * The client should set this field to the token from the most recent
+ * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+ * received responses up to this token. After sending this token, earlier
+ * tokens may not be used anymore.
+ *
+ * The server may close the stream if there are too many unacknowledged
+ * responses.
+ *
+ * Leave this field unset when creating a new stream. To resume a stream at
+ * a specific point, set this field and the `stream_id` field.
+ *
+ * Leave this field unset when creating a new stream.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *streamToken;
+
+/** Labels associated with this write request. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *labels;
+/** The number of items in @c labels without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger labels_Count;
+
+@end
+
+#pragma mark - GCFSWriteResponse
+
+typedef GPB_ENUM(GCFSWriteResponse_FieldNumber) {
+ GCFSWriteResponse_FieldNumber_StreamId = 1,
+ GCFSWriteResponse_FieldNumber_StreamToken = 2,
+ GCFSWriteResponse_FieldNumber_WriteResultsArray = 3,
+ GCFSWriteResponse_FieldNumber_CommitTime = 4,
+};
+
+/**
+ * The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+ **/
+@interface GCFSWriteResponse : GPBMessage
+
+/**
+ * The ID of the stream.
+ * Only set on the first message, when a new stream was created.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *streamId;
+
+/**
+ * A token that represents the position of this response in the stream.
+ * This can be used by a client to resume the stream at this point.
+ *
+ * This field is always set.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *streamToken;
+
+/**
+ * The result of applying the writes.
+ *
+ * This i-th write result corresponds to the i-th write in the
+ * request.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWriteResult*> *writeResultsArray;
+/** The number of items in @c writeResultsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger writeResultsArray_Count;
+
+/** The time at which the commit occurred. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *commitTime;
+/** Test to see if @c commitTime has been set. */
+@property(nonatomic, readwrite) BOOL hasCommitTime;
+
+@end
+
+#pragma mark - GCFSListenRequest
+
+typedef GPB_ENUM(GCFSListenRequest_FieldNumber) {
+ GCFSListenRequest_FieldNumber_Database = 1,
+ GCFSListenRequest_FieldNumber_AddTarget = 2,
+ GCFSListenRequest_FieldNumber_RemoveTarget = 3,
+ GCFSListenRequest_FieldNumber_Labels = 4,
+};
+
+typedef GPB_ENUM(GCFSListenRequest_TargetChange_OneOfCase) {
+ GCFSListenRequest_TargetChange_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSListenRequest_TargetChange_OneOfCase_AddTarget = 2,
+ GCFSListenRequest_TargetChange_OneOfCase_RemoveTarget = 3,
+};
+
+/**
+ * A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]
+ **/
+@interface GCFSListenRequest : GPBMessage
+
+/**
+ * The database name. In the format:
+ * `projects/{project_id}/databases/{database_id}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *database;
+
+/** The supported target changes. */
+@property(nonatomic, readonly) GCFSListenRequest_TargetChange_OneOfCase targetChangeOneOfCase;
+
+/** A target to add to this stream. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget *addTarget;
+
+/** The ID of a target to remove from this stream. */
+@property(nonatomic, readwrite) int32_t removeTarget;
+
+/** Labels associated with this target change. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *labels;
+/** The number of items in @c labels without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger labels_Count;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'targetChange'.
+ **/
+void GCFSListenRequest_ClearTargetChangeOneOfCase(GCFSListenRequest *message);
+
+#pragma mark - GCFSListenResponse
+
+typedef GPB_ENUM(GCFSListenResponse_FieldNumber) {
+ GCFSListenResponse_FieldNumber_TargetChange = 2,
+ GCFSListenResponse_FieldNumber_DocumentChange = 3,
+ GCFSListenResponse_FieldNumber_DocumentDelete = 4,
+ GCFSListenResponse_FieldNumber_Filter = 5,
+ GCFSListenResponse_FieldNumber_DocumentRemove = 6,
+};
+
+typedef GPB_ENUM(GCFSListenResponse_ResponseType_OneOfCase) {
+ GCFSListenResponse_ResponseType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSListenResponse_ResponseType_OneOfCase_TargetChange = 2,
+ GCFSListenResponse_ResponseType_OneOfCase_DocumentChange = 3,
+ GCFSListenResponse_ResponseType_OneOfCase_DocumentDelete = 4,
+ GCFSListenResponse_ResponseType_OneOfCase_DocumentRemove = 6,
+ GCFSListenResponse_ResponseType_OneOfCase_Filter = 5,
+};
+
+/**
+ * The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
+ **/
+@interface GCFSListenResponse : GPBMessage
+
+/** The supported responses. */
+@property(nonatomic, readonly) GCFSListenResponse_ResponseType_OneOfCase responseTypeOneOfCase;
+
+/** Targets have changed. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTargetChange *targetChange;
+
+/** A [Document][google.firestore.v1beta1.Document] has changed. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentChange *documentChange;
+
+/** A [Document][google.firestore.v1beta1.Document] has been deleted. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentDelete *documentDelete;
+
+/**
+ * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+ * relevant to that target).
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentRemove *documentRemove;
+
+/**
+ * A filter to apply to the set of documents previously returned for the
+ * given target.
+ *
+ * Returned when documents may have been removed from the given target, but
+ * the exact documents are unknown.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSExistenceFilter *filter;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'responseType'.
+ **/
+void GCFSListenResponse_ClearResponseTypeOneOfCase(GCFSListenResponse *message);
+
+#pragma mark - GCFSTarget
+
+typedef GPB_ENUM(GCFSTarget_FieldNumber) {
+ GCFSTarget_FieldNumber_Query = 2,
+ GCFSTarget_FieldNumber_Documents = 3,
+ GCFSTarget_FieldNumber_ResumeToken = 4,
+ GCFSTarget_FieldNumber_TargetId = 5,
+ GCFSTarget_FieldNumber_Once = 6,
+ GCFSTarget_FieldNumber_ReadTime = 11,
+};
+
+typedef GPB_ENUM(GCFSTarget_TargetType_OneOfCase) {
+ GCFSTarget_TargetType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSTarget_TargetType_OneOfCase_Query = 2,
+ GCFSTarget_TargetType_OneOfCase_Documents = 3,
+};
+
+typedef GPB_ENUM(GCFSTarget_ResumeType_OneOfCase) {
+ GCFSTarget_ResumeType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSTarget_ResumeType_OneOfCase_ResumeToken = 4,
+ GCFSTarget_ResumeType_OneOfCase_ReadTime = 11,
+};
+
+/**
+ * A specification of a set of documents to listen to.
+ **/
+@interface GCFSTarget : GPBMessage
+
+/** The type of target to listen to. */
+@property(nonatomic, readonly) GCFSTarget_TargetType_OneOfCase targetTypeOneOfCase;
+
+/** A target specified by a query. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_QueryTarget *query;
+
+/** A target specified by a set of document names. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_DocumentsTarget *documents;
+
+/**
+ * When to start listening.
+ *
+ * If not specified, all matching Documents are returned before any
+ * subsequent changes.
+ **/
+@property(nonatomic, readonly) GCFSTarget_ResumeType_OneOfCase resumeTypeOneOfCase;
+
+/**
+ * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
+ *
+ * Using a resume token with a different target is unsupported and may fail.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken;
+
+/**
+ * Start listening after a specific `read_time`.
+ *
+ * The client must know the state of matching documents at this time.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+
+/**
+ * A client provided target ID.
+ *
+ * If not set, the server will assign an ID for the target.
+ *
+ * Used for resuming a target without changing IDs. The IDs can either be
+ * client-assigned or be server-assigned in a previous stream. All targets
+ * with client provided IDs must be added before adding a target that needs
+ * a server-assigned id.
+ **/
+@property(nonatomic, readwrite) int32_t targetId;
+
+/** If the target should be removed once it is current and consistent. */
+@property(nonatomic, readwrite) BOOL once;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'targetType'.
+ **/
+void GCFSTarget_ClearTargetTypeOneOfCase(GCFSTarget *message);
+/**
+ * Clears whatever value was set for the oneof 'resumeType'.
+ **/
+void GCFSTarget_ClearResumeTypeOneOfCase(GCFSTarget *message);
+
+#pragma mark - GCFSTarget_DocumentsTarget
+
+typedef GPB_ENUM(GCFSTarget_DocumentsTarget_FieldNumber) {
+ GCFSTarget_DocumentsTarget_FieldNumber_DocumentsArray = 2,
+};
+
+/**
+ * A target specified by a set of documents names.
+ **/
+@interface GCFSTarget_DocumentsTarget : GPBMessage
+
+/**
+ * The names of the documents to retrieve. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * The request will fail if any of the document is not a child resource of
+ * the given `database`. Duplicate names will be elided.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *documentsArray;
+/** The number of items in @c documentsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger documentsArray_Count;
+
+@end
+
+#pragma mark - GCFSTarget_QueryTarget
+
+typedef GPB_ENUM(GCFSTarget_QueryTarget_FieldNumber) {
+ GCFSTarget_QueryTarget_FieldNumber_Parent = 1,
+ GCFSTarget_QueryTarget_FieldNumber_StructuredQuery = 2,
+};
+
+typedef GPB_ENUM(GCFSTarget_QueryTarget_QueryType_OneOfCase) {
+ GCFSTarget_QueryTarget_QueryType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSTarget_QueryTarget_QueryType_OneOfCase_StructuredQuery = 2,
+};
+
+/**
+ * A target specified by a query.
+ **/
+@interface GCFSTarget_QueryTarget : GPBMessage
+
+/**
+ * The parent resource name. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents` or
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * For example:
+ * `projects/my-project/databases/my-database/documents` or
+ * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;
+
+/** The query to run. */
+@property(nonatomic, readonly) GCFSTarget_QueryTarget_QueryType_OneOfCase queryTypeOneOfCase;
+
+/** A structured query. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery *structuredQuery;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'queryType'.
+ **/
+void GCFSTarget_QueryTarget_ClearQueryTypeOneOfCase(GCFSTarget_QueryTarget *message);
+
+#pragma mark - GCFSTargetChange
+
+typedef GPB_ENUM(GCFSTargetChange_FieldNumber) {
+ GCFSTargetChange_FieldNumber_TargetChangeType = 1,
+ GCFSTargetChange_FieldNumber_TargetIdsArray = 2,
+ GCFSTargetChange_FieldNumber_Cause = 3,
+ GCFSTargetChange_FieldNumber_ResumeToken = 4,
+ GCFSTargetChange_FieldNumber_ReadTime = 6,
+};
+
+/**
+ * Targets being watched have changed.
+ **/
+@interface GCFSTargetChange : GPBMessage
+
+/** The type of change that occurred. */
+@property(nonatomic, readwrite) GCFSTargetChange_TargetChangeType targetChangeType;
+
+/**
+ * The target IDs of targets that have changed.
+ *
+ * If empty, the change applies to all targets.
+ *
+ * For `target_change_type=ADD`, the order of the target IDs matches the order
+ * of the requests to add the targets. This allows clients to unambiguously
+ * associate server-assigned target IDs with added targets.
+ *
+ * For other states, the order of the target IDs is not defined.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *targetIdsArray;
+/** The number of items in @c targetIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger targetIdsArray_Count;
+
+/** The error that resulted in this change, if applicable. */
+@property(nonatomic, readwrite, strong, null_resettable) RPCStatus *cause;
+/** Test to see if @c cause has been set. */
+@property(nonatomic, readwrite) BOOL hasCause;
+
+/**
+ * A token that can be used to resume the stream for the given `target_ids`,
+ * or all targets if `target_ids` is empty.
+ *
+ * Not set on every target change.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken;
+
+/**
+ * The consistent `read_time` for the given `target_ids` (omitted when the
+ * target_ids are not at a consistent snapshot).
+ *
+ * The stream is guaranteed to send a `read_time` with `target_ids` empty
+ * whenever the entire stream reaches a new consistent snapshot. ADD,
+ * CURRENT, and RESET messages are guaranteed to (eventually) result in a
+ * new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
+ *
+ * For a given stream, `read_time` is guaranteed to be monotonically
+ * increasing.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSTargetChange's @c targetChangeType property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message);
+/**
+ * Sets the raw value of an @c GCFSTargetChange's @c targetChangeType property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message, int32_t value);
+
+#pragma mark - GCFSListCollectionIdsRequest
+
+typedef GPB_ENUM(GCFSListCollectionIdsRequest_FieldNumber) {
+ GCFSListCollectionIdsRequest_FieldNumber_Parent = 1,
+ GCFSListCollectionIdsRequest_FieldNumber_PageSize = 2,
+ GCFSListCollectionIdsRequest_FieldNumber_PageToken = 3,
+};
+
+/**
+ * The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+ **/
+@interface GCFSListCollectionIdsRequest : GPBMessage
+
+/**
+ * The parent document. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ * For example:
+ * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;
+
+/** The maximum number of results to return. */
+@property(nonatomic, readwrite) int32_t pageSize;
+
+/**
+ * A page token. Must be a value from
+ * [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse].
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *pageToken;
+
+@end
+
+#pragma mark - GCFSListCollectionIdsResponse
+
+typedef GPB_ENUM(GCFSListCollectionIdsResponse_FieldNumber) {
+ GCFSListCollectionIdsResponse_FieldNumber_CollectionIdsArray = 1,
+ GCFSListCollectionIdsResponse_FieldNumber_NextPageToken = 2,
+};
+
+/**
+ * The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+ **/
+@interface GCFSListCollectionIdsResponse : GPBMessage
+
+/** The collection ids. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *collectionIdsArray;
+/** The number of items in @c collectionIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger collectionIdsArray_Count;
+
+/** A page token that may be used to continue the list. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *nextPageToken;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m
new file mode 100644
index 0000000..4bdee01
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.m
@@ -0,0 +1,2064 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/firestore.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Empty.pbobjc.h>
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Empty.pbobjc.h"
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Firestore.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+ #import "Common.pbobjc.h"
+ #import "Document.pbobjc.h"
+ #import "Query.pbobjc.h"
+ #import "Write.pbobjc.h"
+ #import "Status.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GCFSFirestoreRoot
+
+@implementation GCFSFirestoreRoot
+
+
+@end
+
+#pragma mark - GCFSFirestoreRoot_FileDescriptor
+
+static GPBFileDescriptor *GCFSFirestoreRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
+ objcPrefix:@"GCFS"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GCFSGetDocumentRequest
+
+@implementation GCFSGetDocumentRequest
+
+@dynamic consistencySelectorOneOfCase;
+@dynamic name;
+@dynamic hasMask, mask;
+@dynamic transaction;
+@dynamic readTime;
+
+typedef struct GCFSGetDocumentRequest__storage_ {
+ uint32_t _has_storage_[2];
+ NSString *name;
+ GCFSDocumentMask *mask;
+ NSData *transaction;
+ GPBTimestamp *readTime;
+} GCFSGetDocumentRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "name",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSGetDocumentRequest_FieldNumber_Name,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSGetDocumentRequest__storage_, name),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "mask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSGetDocumentRequest_FieldNumber_Mask,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSGetDocumentRequest__storage_, mask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSGetDocumentRequest_FieldNumber_Transaction,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSGetDocumentRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSGetDocumentRequest_FieldNumber_ReadTime,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSGetDocumentRequest__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSGetDocumentRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSGetDocumentRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "consistencySelector",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSGetDocumentRequest_ClearConsistencySelectorOneOfCase(GCFSGetDocumentRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSListDocumentsRequest
+
+@implementation GCFSListDocumentsRequest
+
+@dynamic consistencySelectorOneOfCase;
+@dynamic parent;
+@dynamic collectionId;
+@dynamic pageSize;
+@dynamic pageToken;
+@dynamic orderBy;
+@dynamic hasMask, mask;
+@dynamic transaction;
+@dynamic readTime;
+@dynamic showMissing;
+
+typedef struct GCFSListDocumentsRequest__storage_ {
+ uint32_t _has_storage_[2];
+ int32_t pageSize;
+ NSString *parent;
+ NSString *collectionId;
+ NSString *pageToken;
+ NSString *orderBy;
+ GCFSDocumentMask *mask;
+ NSData *transaction;
+ GPBTimestamp *readTime;
+} GCFSListDocumentsRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "parent",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_Parent,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, parent),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "collectionId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_CollectionId,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, collectionId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "pageSize",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_PageSize,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, pageSize),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "pageToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_PageToken,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, pageToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "orderBy",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_OrderBy,
+ .hasIndex = 4,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, orderBy),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "mask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSListDocumentsRequest_FieldNumber_Mask,
+ .hasIndex = 5,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, mask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_Transaction,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSListDocumentsRequest_FieldNumber_ReadTime,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsRequest__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "showMissing",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsRequest_FieldNumber_ShowMissing,
+ .hasIndex = 6,
+ .offset = 7, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListDocumentsRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListDocumentsRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "consistencySelector",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSListDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSListDocumentsRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSListDocumentsResponse
+
+@implementation GCFSListDocumentsResponse
+
+@dynamic documentsArray, documentsArray_Count;
+@dynamic nextPageToken;
+
+typedef struct GCFSListDocumentsResponse__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *documentsArray;
+ NSString *nextPageToken;
+} GCFSListDocumentsResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "documentsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSListDocumentsResponse_FieldNumber_DocumentsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsResponse__storage_, documentsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "nextPageToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListDocumentsResponse_FieldNumber_NextPageToken,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSListDocumentsResponse__storage_, nextPageToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListDocumentsResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListDocumentsResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSCreateDocumentRequest
+
+@implementation GCFSCreateDocumentRequest
+
+@dynamic parent;
+@dynamic collectionId;
+@dynamic documentId;
+@dynamic hasDocument, document;
+@dynamic hasMask, mask;
+
+typedef struct GCFSCreateDocumentRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *parent;
+ NSString *collectionId;
+ NSString *documentId;
+ GCFSDocument *document;
+ GCFSDocumentMask *mask;
+} GCFSCreateDocumentRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "parent",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCreateDocumentRequest_FieldNumber_Parent,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSCreateDocumentRequest__storage_, parent),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "collectionId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCreateDocumentRequest_FieldNumber_CollectionId,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSCreateDocumentRequest__storage_, collectionId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "documentId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCreateDocumentRequest_FieldNumber_DocumentId,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSCreateDocumentRequest__storage_, documentId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "document",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSCreateDocumentRequest_FieldNumber_Document,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSCreateDocumentRequest__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "mask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSCreateDocumentRequest_FieldNumber_Mask,
+ .hasIndex = 4,
+ .offset = (uint32_t)offsetof(GCFSCreateDocumentRequest__storage_, mask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSCreateDocumentRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSCreateDocumentRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSUpdateDocumentRequest
+
+@implementation GCFSUpdateDocumentRequest
+
+@dynamic hasDocument, document;
+@dynamic hasUpdateMask, updateMask;
+@dynamic hasMask, mask;
+@dynamic hasCurrentDocument, currentDocument;
+
+typedef struct GCFSUpdateDocumentRequest__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSDocument *document;
+ GCFSDocumentMask *updateMask;
+ GCFSDocumentMask *mask;
+ GCFSPrecondition *currentDocument;
+} GCFSUpdateDocumentRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSUpdateDocumentRequest_FieldNumber_Document,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSUpdateDocumentRequest__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "updateMask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSUpdateDocumentRequest_FieldNumber_UpdateMask,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSUpdateDocumentRequest__storage_, updateMask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "mask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSUpdateDocumentRequest_FieldNumber_Mask,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSUpdateDocumentRequest__storage_, mask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "currentDocument",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSPrecondition),
+ .number = GCFSUpdateDocumentRequest_FieldNumber_CurrentDocument,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSUpdateDocumentRequest__storage_, currentDocument),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSUpdateDocumentRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSUpdateDocumentRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSDeleteDocumentRequest
+
+@implementation GCFSDeleteDocumentRequest
+
+@dynamic name;
+@dynamic hasCurrentDocument, currentDocument;
+
+typedef struct GCFSDeleteDocumentRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *name;
+ GCFSPrecondition *currentDocument;
+} GCFSDeleteDocumentRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "name",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDeleteDocumentRequest_FieldNumber_Name,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDeleteDocumentRequest__storage_, name),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "currentDocument",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSPrecondition),
+ .number = GCFSDeleteDocumentRequest_FieldNumber_CurrentDocument,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSDeleteDocumentRequest__storage_, currentDocument),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDeleteDocumentRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDeleteDocumentRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSBatchGetDocumentsRequest
+
+@implementation GCFSBatchGetDocumentsRequest
+
+@dynamic consistencySelectorOneOfCase;
+@dynamic database;
+@dynamic documentsArray, documentsArray_Count;
+@dynamic hasMask, mask;
+@dynamic transaction;
+@dynamic newTransaction;
+@dynamic readTime;
+
+typedef struct GCFSBatchGetDocumentsRequest__storage_ {
+ uint32_t _has_storage_[2];
+ NSString *database;
+ NSMutableArray *documentsArray;
+ GCFSDocumentMask *mask;
+ NSData *transaction;
+ GCFSTransactionOptions *newTransaction;
+ GPBTimestamp *readTime;
+} GCFSBatchGetDocumentsRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "documentsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_DocumentsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, documentsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "mask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_Mask,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, mask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_Transaction,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "newTransaction",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTransactionOptions),
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_NewTransaction,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, newTransaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSBatchGetDocumentsRequest_FieldNumber_ReadTime,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsRequest__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSBatchGetDocumentsRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSBatchGetDocumentsRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "consistencySelector",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSBatchGetDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSBatchGetDocumentsRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSBatchGetDocumentsResponse
+
+@implementation GCFSBatchGetDocumentsResponse
+
+@dynamic resultOneOfCase;
+@dynamic found;
+@dynamic missing;
+@dynamic transaction;
+@dynamic hasReadTime, readTime;
+
+typedef struct GCFSBatchGetDocumentsResponse__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSDocument *found;
+ NSString *missing;
+ NSData *transaction;
+ GPBTimestamp *readTime;
+} GCFSBatchGetDocumentsResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "found",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSBatchGetDocumentsResponse_FieldNumber_Found,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsResponse__storage_, found),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "missing",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBatchGetDocumentsResponse_FieldNumber_Missing,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsResponse__storage_, missing),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBatchGetDocumentsResponse_FieldNumber_Transaction,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsResponse__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSBatchGetDocumentsResponse_FieldNumber_ReadTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSBatchGetDocumentsResponse__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSBatchGetDocumentsResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSBatchGetDocumentsResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "result",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSBatchGetDocumentsResponse_ClearResultOneOfCase(GCFSBatchGetDocumentsResponse *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSBeginTransactionRequest
+
+@implementation GCFSBeginTransactionRequest
+
+@dynamic database;
+@dynamic hasOptions, options;
+
+typedef struct GCFSBeginTransactionRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *database;
+ GCFSTransactionOptions *options;
+} GCFSBeginTransactionRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBeginTransactionRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSBeginTransactionRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "options",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTransactionOptions),
+ .number = GCFSBeginTransactionRequest_FieldNumber_Options,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSBeginTransactionRequest__storage_, options),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSBeginTransactionRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSBeginTransactionRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSBeginTransactionResponse
+
+@implementation GCFSBeginTransactionResponse
+
+@dynamic transaction;
+
+typedef struct GCFSBeginTransactionResponse__storage_ {
+ uint32_t _has_storage_[1];
+ NSData *transaction;
+} GCFSBeginTransactionResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSBeginTransactionResponse_FieldNumber_Transaction,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSBeginTransactionResponse__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSBeginTransactionResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSBeginTransactionResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSCommitRequest
+
+@implementation GCFSCommitRequest
+
+@dynamic database;
+@dynamic writesArray, writesArray_Count;
+@dynamic transaction;
+
+typedef struct GCFSCommitRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *database;
+ NSMutableArray *writesArray;
+ NSData *transaction;
+} GCFSCommitRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCommitRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSCommitRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "writesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSWrite),
+ .number = GCFSCommitRequest_FieldNumber_WritesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSCommitRequest__storage_, writesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCommitRequest_FieldNumber_Transaction,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSCommitRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSCommitRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSCommitRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSCommitResponse
+
+@implementation GCFSCommitResponse
+
+@dynamic writeResultsArray, writeResultsArray_Count;
+@dynamic hasCommitTime, commitTime;
+
+typedef struct GCFSCommitResponse__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *writeResultsArray;
+ GPBTimestamp *commitTime;
+} GCFSCommitResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "writeResultsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSWriteResult),
+ .number = GCFSCommitResponse_FieldNumber_WriteResultsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSCommitResponse__storage_, writeResultsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "commitTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSCommitResponse_FieldNumber_CommitTime,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSCommitResponse__storage_, commitTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSCommitResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSCommitResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSRollbackRequest
+
+@implementation GCFSRollbackRequest
+
+@dynamic database;
+@dynamic transaction;
+
+typedef struct GCFSRollbackRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *database;
+ NSData *transaction;
+} GCFSRollbackRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRollbackRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSRollbackRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRollbackRequest_FieldNumber_Transaction,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSRollbackRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSRollbackRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSRollbackRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSRunQueryRequest
+
+@implementation GCFSRunQueryRequest
+
+@dynamic queryTypeOneOfCase;
+@dynamic consistencySelectorOneOfCase;
+@dynamic parent;
+@dynamic structuredQuery;
+@dynamic transaction;
+@dynamic newTransaction;
+@dynamic readTime;
+
+typedef struct GCFSRunQueryRequest__storage_ {
+ uint32_t _has_storage_[3];
+ NSString *parent;
+ GCFSStructuredQuery *structuredQuery;
+ NSData *transaction;
+ GCFSTransactionOptions *newTransaction;
+ GPBTimestamp *readTime;
+} GCFSRunQueryRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "parent",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRunQueryRequest_FieldNumber_Parent,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSRunQueryRequest__storage_, parent),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "structuredQuery",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery),
+ .number = GCFSRunQueryRequest_FieldNumber_StructuredQuery,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSRunQueryRequest__storage_, structuredQuery),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRunQueryRequest_FieldNumber_Transaction,
+ .hasIndex = -2,
+ .offset = (uint32_t)offsetof(GCFSRunQueryRequest__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "newTransaction",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTransactionOptions),
+ .number = GCFSRunQueryRequest_FieldNumber_NewTransaction,
+ .hasIndex = -2,
+ .offset = (uint32_t)offsetof(GCFSRunQueryRequest__storage_, newTransaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSRunQueryRequest_FieldNumber_ReadTime,
+ .hasIndex = -2,
+ .offset = (uint32_t)offsetof(GCFSRunQueryRequest__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSRunQueryRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSRunQueryRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "queryType",
+ "consistencySelector",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSRunQueryRequest_ClearQueryTypeOneOfCase(GCFSRunQueryRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+void GCFSRunQueryRequest_ClearConsistencySelectorOneOfCase(GCFSRunQueryRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:1];
+ GPBMaybeClearOneof(message, oneof, -2, 0);
+}
+#pragma mark - GCFSRunQueryResponse
+
+@implementation GCFSRunQueryResponse
+
+@dynamic transaction;
+@dynamic hasDocument, document;
+@dynamic hasReadTime, readTime;
+@dynamic skippedResults;
+
+typedef struct GCFSRunQueryResponse__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t skippedResults;
+ GCFSDocument *document;
+ NSData *transaction;
+ GPBTimestamp *readTime;
+} GCFSRunQueryResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSRunQueryResponse_FieldNumber_Document,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSRunQueryResponse__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transaction",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRunQueryResponse_FieldNumber_Transaction,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSRunQueryResponse__storage_, transaction),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSRunQueryResponse_FieldNumber_ReadTime,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSRunQueryResponse__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "skippedResults",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSRunQueryResponse_FieldNumber_SkippedResults,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSRunQueryResponse__storage_, skippedResults),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSRunQueryResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSRunQueryResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSWriteRequest
+
+@implementation GCFSWriteRequest
+
+@dynamic database;
+@dynamic streamId;
+@dynamic writesArray, writesArray_Count;
+@dynamic streamToken;
+@dynamic labels, labels_Count;
+
+typedef struct GCFSWriteRequest__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *database;
+ NSString *streamId;
+ NSMutableArray *writesArray;
+ NSData *streamToken;
+ NSMutableDictionary *labels;
+} GCFSWriteRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSWriteRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "streamId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteRequest_FieldNumber_StreamId,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSWriteRequest__storage_, streamId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "writesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSWrite),
+ .number = GCFSWriteRequest_FieldNumber_WritesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSWriteRequest__storage_, writesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "streamToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteRequest_FieldNumber_StreamToken,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSWriteRequest__storage_, streamToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "labels",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteRequest_FieldNumber_Labels,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSWriteRequest__storage_, labels),
+ .flags = GPBFieldMapKeyString,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSWriteRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSWriteRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSWriteResponse
+
+@implementation GCFSWriteResponse
+
+@dynamic streamId;
+@dynamic streamToken;
+@dynamic writeResultsArray, writeResultsArray_Count;
+@dynamic hasCommitTime, commitTime;
+
+typedef struct GCFSWriteResponse__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *streamId;
+ NSData *streamToken;
+ NSMutableArray *writeResultsArray;
+ GPBTimestamp *commitTime;
+} GCFSWriteResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "streamId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteResponse_FieldNumber_StreamId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSWriteResponse__storage_, streamId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "streamToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWriteResponse_FieldNumber_StreamToken,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSWriteResponse__storage_, streamToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "writeResultsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSWriteResult),
+ .number = GCFSWriteResponse_FieldNumber_WriteResultsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSWriteResponse__storage_, writeResultsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "commitTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSWriteResponse_FieldNumber_CommitTime,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSWriteResponse__storage_, commitTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSWriteResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSWriteResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSListenRequest
+
+@implementation GCFSListenRequest
+
+@dynamic targetChangeOneOfCase;
+@dynamic database;
+@dynamic addTarget;
+@dynamic removeTarget;
+@dynamic labels, labels_Count;
+
+typedef struct GCFSListenRequest__storage_ {
+ uint32_t _has_storage_[2];
+ int32_t removeTarget;
+ NSString *database;
+ GCFSTarget *addTarget;
+ NSMutableDictionary *labels;
+} GCFSListenRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "database",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListenRequest_FieldNumber_Database,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSListenRequest__storage_, database),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "addTarget",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTarget),
+ .number = GCFSListenRequest_FieldNumber_AddTarget,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenRequest__storage_, addTarget),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "removeTarget",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListenRequest_FieldNumber_RemoveTarget,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenRequest__storage_, removeTarget),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "labels",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListenRequest_FieldNumber_Labels,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSListenRequest__storage_, labels),
+ .flags = GPBFieldMapKeyString,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListenRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListenRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "targetChange",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSListenRequest_ClearTargetChangeOneOfCase(GCFSListenRequest *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSListenResponse
+
+@implementation GCFSListenResponse
+
+@dynamic responseTypeOneOfCase;
+@dynamic targetChange;
+@dynamic documentChange;
+@dynamic documentDelete;
+@dynamic documentRemove;
+@dynamic filter;
+
+typedef struct GCFSListenResponse__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSTargetChange *targetChange;
+ GCFSDocumentChange *documentChange;
+ GCFSDocumentDelete *documentDelete;
+ GCFSExistenceFilter *filter;
+ GCFSDocumentRemove *documentRemove;
+} GCFSListenResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "targetChange",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTargetChange),
+ .number = GCFSListenResponse_FieldNumber_TargetChange,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenResponse__storage_, targetChange),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "documentChange",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentChange),
+ .number = GCFSListenResponse_FieldNumber_DocumentChange,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenResponse__storage_, documentChange),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "documentDelete",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentDelete),
+ .number = GCFSListenResponse_FieldNumber_DocumentDelete,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenResponse__storage_, documentDelete),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "filter",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSExistenceFilter),
+ .number = GCFSListenResponse_FieldNumber_Filter,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenResponse__storage_, filter),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "documentRemove",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentRemove),
+ .number = GCFSListenResponse_FieldNumber_DocumentRemove,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSListenResponse__storage_, documentRemove),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListenResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListenResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "responseType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSListenResponse_ClearResponseTypeOneOfCase(GCFSListenResponse *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSTarget
+
+@implementation GCFSTarget
+
+@dynamic targetTypeOneOfCase;
+@dynamic resumeTypeOneOfCase;
+@dynamic query;
+@dynamic documents;
+@dynamic resumeToken;
+@dynamic readTime;
+@dynamic targetId;
+@dynamic once;
+
+typedef struct GCFSTarget__storage_ {
+ uint32_t _has_storage_[3];
+ int32_t targetId;
+ GCFSTarget_QueryTarget *query;
+ GCFSTarget_DocumentsTarget *documents;
+ NSData *resumeToken;
+ GPBTimestamp *readTime;
+} GCFSTarget__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "query",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTarget_QueryTarget),
+ .number = GCFSTarget_FieldNumber_Query,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTarget__storage_, query),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "documents",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSTarget_DocumentsTarget),
+ .number = GCFSTarget_FieldNumber_Documents,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTarget__storage_, documents),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "resumeToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTarget_FieldNumber_ResumeToken,
+ .hasIndex = -2,
+ .offset = (uint32_t)offsetof(GCFSTarget__storage_, resumeToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "targetId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTarget_FieldNumber_TargetId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSTarget__storage_, targetId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "once",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTarget_FieldNumber_Once,
+ .hasIndex = 1,
+ .offset = 2, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSTarget_FieldNumber_ReadTime,
+ .hasIndex = -2,
+ .offset = (uint32_t)offsetof(GCFSTarget__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTarget class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTarget__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "targetType",
+ "resumeType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSTarget_ClearTargetTypeOneOfCase(GCFSTarget *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+void GCFSTarget_ClearResumeTypeOneOfCase(GCFSTarget *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:1];
+ GPBMaybeClearOneof(message, oneof, -2, 0);
+}
+#pragma mark - GCFSTarget_DocumentsTarget
+
+@implementation GCFSTarget_DocumentsTarget
+
+@dynamic documentsArray, documentsArray_Count;
+
+typedef struct GCFSTarget_DocumentsTarget__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *documentsArray;
+} GCFSTarget_DocumentsTarget__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "documentsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTarget_DocumentsTarget_FieldNumber_DocumentsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSTarget_DocumentsTarget__storage_, documentsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTarget_DocumentsTarget class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTarget_DocumentsTarget__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSTarget)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSTarget_QueryTarget
+
+@implementation GCFSTarget_QueryTarget
+
+@dynamic queryTypeOneOfCase;
+@dynamic parent;
+@dynamic structuredQuery;
+
+typedef struct GCFSTarget_QueryTarget__storage_ {
+ uint32_t _has_storage_[2];
+ NSString *parent;
+ GCFSStructuredQuery *structuredQuery;
+} GCFSTarget_QueryTarget__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "parent",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTarget_QueryTarget_FieldNumber_Parent,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSTarget_QueryTarget__storage_, parent),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "structuredQuery",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery),
+ .number = GCFSTarget_QueryTarget_FieldNumber_StructuredQuery,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSTarget_QueryTarget__storage_, structuredQuery),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTarget_QueryTarget class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTarget_QueryTarget__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "queryType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSTarget)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSTarget_QueryTarget_ClearQueryTypeOneOfCase(GCFSTarget_QueryTarget *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSTargetChange
+
+@implementation GCFSTargetChange
+
+@dynamic targetChangeType;
+@dynamic targetIdsArray, targetIdsArray_Count;
+@dynamic hasCause, cause;
+@dynamic resumeToken;
+@dynamic hasReadTime, readTime;
+
+typedef struct GCFSTargetChange__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSTargetChange_TargetChangeType targetChangeType;
+ GPBInt32Array *targetIdsArray;
+ RPCStatus *cause;
+ NSData *resumeToken;
+ GPBTimestamp *readTime;
+} GCFSTargetChange__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "targetChangeType",
+ .dataTypeSpecific.enumDescFunc = GCFSTargetChange_TargetChangeType_EnumDescriptor,
+ .number = GCFSTargetChange_FieldNumber_TargetChangeType,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSTargetChange__storage_, targetChangeType),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ {
+ .name = "targetIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTargetChange_FieldNumber_TargetIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSTargetChange__storage_, targetIdsArray),
+ .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "cause",
+ .dataTypeSpecific.className = GPBStringifySymbol(RPCStatus),
+ .number = GCFSTargetChange_FieldNumber_Cause,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSTargetChange__storage_, cause),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "resumeToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSTargetChange_FieldNumber_ResumeToken,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSTargetChange__storage_, resumeToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBytes,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSTargetChange_FieldNumber_ReadTime,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSTargetChange__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSTargetChange class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSTargetChange__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message) {
+ GPBDescriptor *descriptor = [GCFSTargetChange descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSTargetChange_FieldNumber_TargetChangeType];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSTargetChange descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSTargetChange_FieldNumber_TargetChangeType];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+#pragma mark - Enum GCFSTargetChange_TargetChangeType
+
+GPBEnumDescriptor *GCFSTargetChange_TargetChangeType_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "NoChange\000Add\000Remove\000Current\000Reset\000";
+ static const int32_t values[] = {
+ GCFSTargetChange_TargetChangeType_NoChange,
+ GCFSTargetChange_TargetChangeType_Add,
+ GCFSTargetChange_TargetChangeType_Remove,
+ GCFSTargetChange_TargetChangeType_Current,
+ GCFSTargetChange_TargetChangeType_Reset,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSTargetChange_TargetChangeType)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSTargetChange_TargetChangeType_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSTargetChange_TargetChangeType_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSTargetChange_TargetChangeType_NoChange:
+ case GCFSTargetChange_TargetChangeType_Add:
+ case GCFSTargetChange_TargetChangeType_Remove:
+ case GCFSTargetChange_TargetChangeType_Current:
+ case GCFSTargetChange_TargetChangeType_Reset:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSListCollectionIdsRequest
+
+@implementation GCFSListCollectionIdsRequest
+
+@dynamic parent;
+@dynamic pageSize;
+@dynamic pageToken;
+
+typedef struct GCFSListCollectionIdsRequest__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t pageSize;
+ NSString *parent;
+ NSString *pageToken;
+} GCFSListCollectionIdsRequest__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "parent",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListCollectionIdsRequest_FieldNumber_Parent,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSListCollectionIdsRequest__storage_, parent),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "pageSize",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListCollectionIdsRequest_FieldNumber_PageSize,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSListCollectionIdsRequest__storage_, pageSize),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "pageToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListCollectionIdsRequest_FieldNumber_PageToken,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSListCollectionIdsRequest__storage_, pageToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListCollectionIdsRequest class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListCollectionIdsRequest__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSListCollectionIdsResponse
+
+@implementation GCFSListCollectionIdsResponse
+
+@dynamic collectionIdsArray, collectionIdsArray_Count;
+@dynamic nextPageToken;
+
+typedef struct GCFSListCollectionIdsResponse__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *collectionIdsArray;
+ NSString *nextPageToken;
+} GCFSListCollectionIdsResponse__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "collectionIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListCollectionIdsResponse_FieldNumber_CollectionIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSListCollectionIdsResponse__storage_, collectionIdsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "nextPageToken",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSListCollectionIdsResponse_FieldNumber_NextPageToken,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSListCollectionIdsResponse__storage_, nextPageToken),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSListCollectionIdsResponse class]
+ rootClass:[GCFSFirestoreRoot class]
+ file:GCFSFirestoreRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSListCollectionIdsResponse__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h
new file mode 100644
index 0000000..5704c2b
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h
@@ -0,0 +1,232 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "Firestore.pbobjc.h"
+
+#import <ProtoRPC/ProtoService.h>
+#import <ProtoRPC/ProtoRPC.h>
+#import <RxLibrary/GRXWriteable.h>
+#import <RxLibrary/GRXWriter.h>
+
+#import "Annotations.pbobjc.h"
+#import "Common.pbobjc.h"
+#import "Document.pbobjc.h"
+#import "Query.pbobjc.h"
+#import "Write.pbobjc.h"
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Empty.pbobjc.h>
+#else
+ #import "Empty.pbobjc.h"
+#endif
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+#import "Status.pbobjc.h"
+
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol GCFSFirestore <NSObject>
+
+#pragma mark GetDocument(GetDocumentRequest) returns (Document)
+
+/**
+ * Gets a single document.
+ */
+- (void)getDocumentWithRequest:(GCFSGetDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Gets a single document.
+ */
+- (GRPCProtoCall *)RPCToGetDocumentWithRequest:(GCFSGetDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse)
+
+/**
+ * Lists documents.
+ */
+- (void)listDocumentsWithRequest:(GCFSListDocumentsRequest *)request handler:(void(^)(GCFSListDocumentsResponse *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Lists documents.
+ */
+- (GRPCProtoCall *)RPCToListDocumentsWithRequest:(GCFSListDocumentsRequest *)request handler:(void(^)(GCFSListDocumentsResponse *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark CreateDocument(CreateDocumentRequest) returns (Document)
+
+/**
+ * Creates a new document.
+ */
+- (void)createDocumentWithRequest:(GCFSCreateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Creates a new document.
+ */
+- (GRPCProtoCall *)RPCToCreateDocumentWithRequest:(GCFSCreateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark UpdateDocument(UpdateDocumentRequest) returns (Document)
+
+/**
+ * Updates or inserts a document.
+ */
+- (void)updateDocumentWithRequest:(GCFSUpdateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Updates or inserts a document.
+ */
+- (GRPCProtoCall *)RPCToUpdateDocumentWithRequest:(GCFSUpdateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark DeleteDocument(DeleteDocumentRequest) returns (Empty)
+
+/**
+ * Deletes a document.
+ */
+- (void)deleteDocumentWithRequest:(GCFSDeleteDocumentRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Deletes a document.
+ */
+- (GRPCProtoCall *)RPCToDeleteDocumentWithRequest:(GCFSDeleteDocumentRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse)
+
+/**
+ * Gets multiple documents.
+ *
+ * Documents returned by this method are not guaranteed to be returned in the
+ * same order that they were requested.
+ */
+- (void)batchGetDocumentsWithRequest:(GCFSBatchGetDocumentsRequest *)request eventHandler:(void(^)(BOOL done, GCFSBatchGetDocumentsResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+/**
+ * Gets multiple documents.
+ *
+ * Documents returned by this method are not guaranteed to be returned in the
+ * same order that they were requested.
+ */
+- (GRPCProtoCall *)RPCToBatchGetDocumentsWithRequest:(GCFSBatchGetDocumentsRequest *)request eventHandler:(void(^)(BOOL done, GCFSBatchGetDocumentsResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+
+#pragma mark BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse)
+
+/**
+ * Starts a new transaction.
+ */
+- (void)beginTransactionWithRequest:(GCFSBeginTransactionRequest *)request handler:(void(^)(GCFSBeginTransactionResponse *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Starts a new transaction.
+ */
+- (GRPCProtoCall *)RPCToBeginTransactionWithRequest:(GCFSBeginTransactionRequest *)request handler:(void(^)(GCFSBeginTransactionResponse *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark Commit(CommitRequest) returns (CommitResponse)
+
+/**
+ * Commits a transaction, while optionally updating documents.
+ */
+- (void)commitWithRequest:(GCFSCommitRequest *)request handler:(void(^)(GCFSCommitResponse *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Commits a transaction, while optionally updating documents.
+ */
+- (GRPCProtoCall *)RPCToCommitWithRequest:(GCFSCommitRequest *)request handler:(void(^)(GCFSCommitResponse *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark Rollback(RollbackRequest) returns (Empty)
+
+/**
+ * Rolls back a transaction.
+ */
+- (void)rollbackWithRequest:(GCFSRollbackRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Rolls back a transaction.
+ */
+- (GRPCProtoCall *)RPCToRollbackWithRequest:(GCFSRollbackRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler;
+
+
+#pragma mark RunQuery(RunQueryRequest) returns (stream RunQueryResponse)
+
+/**
+ * Runs a query.
+ */
+- (void)runQueryWithRequest:(GCFSRunQueryRequest *)request eventHandler:(void(^)(BOOL done, GCFSRunQueryResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+/**
+ * Runs a query.
+ */
+- (GRPCProtoCall *)RPCToRunQueryWithRequest:(GCFSRunQueryRequest *)request eventHandler:(void(^)(BOOL done, GCFSRunQueryResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+
+#pragma mark Write(stream WriteRequest) returns (stream WriteResponse)
+
+/**
+ * Streams batches of document updates and deletes, in order.
+ */
+- (void)writeWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSWriteResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+/**
+ * Streams batches of document updates and deletes, in order.
+ */
+- (GRPCProtoCall *)RPCToWriteWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSWriteResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+
+#pragma mark Listen(stream ListenRequest) returns (stream ListenResponse)
+
+/**
+ * Listens to changes.
+ */
+- (void)listenWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSListenResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+/**
+ * Listens to changes.
+ */
+- (GRPCProtoCall *)RPCToListenWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSListenResponse *_Nullable response, NSError *_Nullable error))eventHandler;
+
+
+#pragma mark ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse)
+
+/**
+ * Lists all the collection IDs underneath a document.
+ */
+- (void)listCollectionIdsWithRequest:(GCFSListCollectionIdsRequest *)request handler:(void(^)(GCFSListCollectionIdsResponse *_Nullable response, NSError *_Nullable error))handler;
+
+/**
+ * Lists all the collection IDs underneath a document.
+ */
+- (GRPCProtoCall *)RPCToListCollectionIdsWithRequest:(GCFSListCollectionIdsRequest *)request handler:(void(^)(GCFSListCollectionIdsResponse *_Nullable response, NSError *_Nullable error))handler;
+
+
+@end
+
+/**
+ * Basic service implementation, over gRPC, that only does
+ * marshalling and parsing.
+ */
+@interface GCFSFirestore : GRPCProtoService<GCFSFirestore>
+- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER;
++ (instancetype)serviceWithHost:(NSString *)host;
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m
new file mode 100644
index 0000000..a3e338d
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#import "Firestore.pbrpc.h"
+
+#import <ProtoRPC/ProtoRPC.h>
+#import <RxLibrary/GRXWriter+Immediate.h>
+
+@implementation GCFSFirestore
+
+// Designated initializer
+- (instancetype)initWithHost:(NSString *)host {
+ return (self = [super initWithHost:host packageName:@"google.firestore.v1beta1" serviceName:@"Firestore"]);
+}
+
+// Override superclass initializer to disallow different package and service names.
+- (instancetype)initWithHost:(NSString *)host
+ packageName:(NSString *)packageName
+ serviceName:(NSString *)serviceName {
+ return [self initWithHost:host];
+}
+
++ (instancetype)serviceWithHost:(NSString *)host {
+ return [[self alloc] initWithHost:host];
+}
+
+
+#pragma mark GetDocument(GetDocumentRequest) returns (Document)
+
+/**
+ * Gets a single document.
+ */
+- (void)getDocumentWithRequest:(GCFSGetDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToGetDocumentWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Gets a single document.
+ */
+- (GRPCProtoCall *)RPCToGetDocumentWithRequest:(GCFSGetDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"GetDocument"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSDocument class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse)
+
+/**
+ * Lists documents.
+ */
+- (void)listDocumentsWithRequest:(GCFSListDocumentsRequest *)request handler:(void(^)(GCFSListDocumentsResponse *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToListDocumentsWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Lists documents.
+ */
+- (GRPCProtoCall *)RPCToListDocumentsWithRequest:(GCFSListDocumentsRequest *)request handler:(void(^)(GCFSListDocumentsResponse *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"ListDocuments"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSListDocumentsResponse class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark CreateDocument(CreateDocumentRequest) returns (Document)
+
+/**
+ * Creates a new document.
+ */
+- (void)createDocumentWithRequest:(GCFSCreateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToCreateDocumentWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Creates a new document.
+ */
+- (GRPCProtoCall *)RPCToCreateDocumentWithRequest:(GCFSCreateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"CreateDocument"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSDocument class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark UpdateDocument(UpdateDocumentRequest) returns (Document)
+
+/**
+ * Updates or inserts a document.
+ */
+- (void)updateDocumentWithRequest:(GCFSUpdateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToUpdateDocumentWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Updates or inserts a document.
+ */
+- (GRPCProtoCall *)RPCToUpdateDocumentWithRequest:(GCFSUpdateDocumentRequest *)request handler:(void(^)(GCFSDocument *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"UpdateDocument"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSDocument class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark DeleteDocument(DeleteDocumentRequest) returns (Empty)
+
+/**
+ * Deletes a document.
+ */
+- (void)deleteDocumentWithRequest:(GCFSDeleteDocumentRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToDeleteDocumentWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Deletes a document.
+ */
+- (GRPCProtoCall *)RPCToDeleteDocumentWithRequest:(GCFSDeleteDocumentRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"DeleteDocument"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GPBEmpty class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse)
+
+/**
+ * Gets multiple documents.
+ *
+ * Documents returned by this method are not guaranteed to be returned in the
+ * same order that they were requested.
+ */
+- (void)batchGetDocumentsWithRequest:(GCFSBatchGetDocumentsRequest *)request eventHandler:(void(^)(BOOL done, GCFSBatchGetDocumentsResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ [[self RPCToBatchGetDocumentsWithRequest:request eventHandler:eventHandler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Gets multiple documents.
+ *
+ * Documents returned by this method are not guaranteed to be returned in the
+ * same order that they were requested.
+ */
+- (GRPCProtoCall *)RPCToBatchGetDocumentsWithRequest:(GCFSBatchGetDocumentsRequest *)request eventHandler:(void(^)(BOOL done, GCFSBatchGetDocumentsResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ return [self RPCToMethod:@"BatchGetDocuments"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSBatchGetDocumentsResponse class]
+ responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
+}
+#pragma mark BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse)
+
+/**
+ * Starts a new transaction.
+ */
+- (void)beginTransactionWithRequest:(GCFSBeginTransactionRequest *)request handler:(void(^)(GCFSBeginTransactionResponse *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToBeginTransactionWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Starts a new transaction.
+ */
+- (GRPCProtoCall *)RPCToBeginTransactionWithRequest:(GCFSBeginTransactionRequest *)request handler:(void(^)(GCFSBeginTransactionResponse *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"BeginTransaction"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSBeginTransactionResponse class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark Commit(CommitRequest) returns (CommitResponse)
+
+/**
+ * Commits a transaction, while optionally updating documents.
+ */
+- (void)commitWithRequest:(GCFSCommitRequest *)request handler:(void(^)(GCFSCommitResponse *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToCommitWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Commits a transaction, while optionally updating documents.
+ */
+- (GRPCProtoCall *)RPCToCommitWithRequest:(GCFSCommitRequest *)request handler:(void(^)(GCFSCommitResponse *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"Commit"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSCommitResponse class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark Rollback(RollbackRequest) returns (Empty)
+
+/**
+ * Rolls back a transaction.
+ */
+- (void)rollbackWithRequest:(GCFSRollbackRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToRollbackWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Rolls back a transaction.
+ */
+- (GRPCProtoCall *)RPCToRollbackWithRequest:(GCFSRollbackRequest *)request handler:(void(^)(GPBEmpty *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"Rollback"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GPBEmpty class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+#pragma mark RunQuery(RunQueryRequest) returns (stream RunQueryResponse)
+
+/**
+ * Runs a query.
+ */
+- (void)runQueryWithRequest:(GCFSRunQueryRequest *)request eventHandler:(void(^)(BOOL done, GCFSRunQueryResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ [[self RPCToRunQueryWithRequest:request eventHandler:eventHandler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Runs a query.
+ */
+- (GRPCProtoCall *)RPCToRunQueryWithRequest:(GCFSRunQueryRequest *)request eventHandler:(void(^)(BOOL done, GCFSRunQueryResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ return [self RPCToMethod:@"RunQuery"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSRunQueryResponse class]
+ responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
+}
+#pragma mark Write(stream WriteRequest) returns (stream WriteResponse)
+
+/**
+ * Streams batches of document updates and deletes, in order.
+ */
+- (void)writeWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSWriteResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ [[self RPCToWriteWithRequestsWriter:requestWriter eventHandler:eventHandler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Streams batches of document updates and deletes, in order.
+ */
+- (GRPCProtoCall *)RPCToWriteWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSWriteResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ return [self RPCToMethod:@"Write"
+ requestsWriter:requestWriter
+ responseClass:[GCFSWriteResponse class]
+ responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
+}
+#pragma mark Listen(stream ListenRequest) returns (stream ListenResponse)
+
+/**
+ * Listens to changes.
+ */
+- (void)listenWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSListenResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ [[self RPCToListenWithRequestsWriter:requestWriter eventHandler:eventHandler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Listens to changes.
+ */
+- (GRPCProtoCall *)RPCToListenWithRequestsWriter:(GRXWriter *)requestWriter eventHandler:(void(^)(BOOL done, GCFSListenResponse *_Nullable response, NSError *_Nullable error))eventHandler{
+ return [self RPCToMethod:@"Listen"
+ requestsWriter:requestWriter
+ responseClass:[GCFSListenResponse class]
+ responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
+}
+#pragma mark ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse)
+
+/**
+ * Lists all the collection IDs underneath a document.
+ */
+- (void)listCollectionIdsWithRequest:(GCFSListCollectionIdsRequest *)request handler:(void(^)(GCFSListCollectionIdsResponse *_Nullable response, NSError *_Nullable error))handler{
+ [[self RPCToListCollectionIdsWithRequest:request handler:handler] start];
+}
+// Returns a not-yet-started RPC object.
+/**
+ * Lists all the collection IDs underneath a document.
+ */
+- (GRPCProtoCall *)RPCToListCollectionIdsWithRequest:(GCFSListCollectionIdsRequest *)request handler:(void(^)(GCFSListCollectionIdsResponse *_Nullable response, NSError *_Nullable error))handler{
+ return [self RPCToMethod:@"ListCollectionIds"
+ requestsWriter:[GRXWriter writerWithValue:request]
+ responseClass:[GCFSListCollectionIdsResponse class]
+ responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
+}
+@end
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h
new file mode 100644
index 0000000..c2d80e7
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h
@@ -0,0 +1,579 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/query.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSCursor;
+@class GCFSStructuredQuery_CollectionSelector;
+@class GCFSStructuredQuery_CompositeFilter;
+@class GCFSStructuredQuery_FieldFilter;
+@class GCFSStructuredQuery_FieldReference;
+@class GCFSStructuredQuery_Filter;
+@class GCFSStructuredQuery_Order;
+@class GCFSStructuredQuery_Projection;
+@class GCFSStructuredQuery_UnaryFilter;
+@class GCFSValue;
+@class GPBInt32Value;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - Enum GCFSStructuredQuery_Direction
+
+/** A sort direction. */
+typedef GPB_ENUM(GCFSStructuredQuery_Direction) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSStructuredQuery_Direction_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** Unspecified. */
+ GCFSStructuredQuery_Direction_DirectionUnspecified = 0,
+
+ /** Ascending. */
+ GCFSStructuredQuery_Direction_Ascending = 1,
+
+ /** Descending. */
+ GCFSStructuredQuery_Direction_Descending = 2,
+};
+
+GPBEnumDescriptor *GCFSStructuredQuery_Direction_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSStructuredQuery_Direction_IsValidValue(int32_t value);
+
+#pragma mark - Enum GCFSStructuredQuery_CompositeFilter_Operator
+
+/** A composite filter operator. */
+typedef GPB_ENUM(GCFSStructuredQuery_CompositeFilter_Operator) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSStructuredQuery_CompositeFilter_Operator_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** Unspecified. This value must not be used. */
+ GCFSStructuredQuery_CompositeFilter_Operator_OperatorUnspecified = 0,
+
+ /** The results are required to satisfy each of the combined filters. */
+ GCFSStructuredQuery_CompositeFilter_Operator_And = 1,
+};
+
+GPBEnumDescriptor *GCFSStructuredQuery_CompositeFilter_Operator_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSStructuredQuery_CompositeFilter_Operator_IsValidValue(int32_t value);
+
+#pragma mark - Enum GCFSStructuredQuery_FieldFilter_Operator
+
+/** A field filter operator. */
+typedef GPB_ENUM(GCFSStructuredQuery_FieldFilter_Operator) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSStructuredQuery_FieldFilter_Operator_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** Unspecified. This value must not be used. */
+ GCFSStructuredQuery_FieldFilter_Operator_OperatorUnspecified = 0,
+
+ /** Less than. Requires that the field come first in `order_by`. */
+ GCFSStructuredQuery_FieldFilter_Operator_LessThan = 1,
+
+ /** Less than or equal. Requires that the field come first in `order_by`. */
+ GCFSStructuredQuery_FieldFilter_Operator_LessThanOrEqual = 2,
+
+ /** Greater than. Requires that the field come first in `order_by`. */
+ GCFSStructuredQuery_FieldFilter_Operator_GreaterThan = 3,
+
+ /**
+ * Greater than or equal. Requires that the field come first in
+ * `order_by`.
+ **/
+ GCFSStructuredQuery_FieldFilter_Operator_GreaterThanOrEqual = 4,
+
+ /** Equal. */
+ GCFSStructuredQuery_FieldFilter_Operator_Equal = 5,
+};
+
+GPBEnumDescriptor *GCFSStructuredQuery_FieldFilter_Operator_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSStructuredQuery_FieldFilter_Operator_IsValidValue(int32_t value);
+
+#pragma mark - Enum GCFSStructuredQuery_UnaryFilter_Operator
+
+/** A unary operator. */
+typedef GPB_ENUM(GCFSStructuredQuery_UnaryFilter_Operator) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSStructuredQuery_UnaryFilter_Operator_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** Unspecified. This value must not be used. */
+ GCFSStructuredQuery_UnaryFilter_Operator_OperatorUnspecified = 0,
+
+ /** Test if a field is equal to NaN. */
+ GCFSStructuredQuery_UnaryFilter_Operator_IsNan = 2,
+
+ /** Test if an exprestion evaluates to Null. */
+ GCFSStructuredQuery_UnaryFilter_Operator_IsNull = 3,
+};
+
+GPBEnumDescriptor *GCFSStructuredQuery_UnaryFilter_Operator_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSStructuredQuery_UnaryFilter_Operator_IsValidValue(int32_t value);
+
+#pragma mark - GCFSQueryRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GCFSQueryRoot : GPBRootObject
+@end
+
+#pragma mark - GCFSStructuredQuery
+
+typedef GPB_ENUM(GCFSStructuredQuery_FieldNumber) {
+ GCFSStructuredQuery_FieldNumber_Select = 1,
+ GCFSStructuredQuery_FieldNumber_FromArray = 2,
+ GCFSStructuredQuery_FieldNumber_Where = 3,
+ GCFSStructuredQuery_FieldNumber_OrderByArray = 4,
+ GCFSStructuredQuery_FieldNumber_Limit = 5,
+ GCFSStructuredQuery_FieldNumber_Offset = 6,
+ GCFSStructuredQuery_FieldNumber_StartAt = 7,
+ GCFSStructuredQuery_FieldNumber_EndAt = 8,
+};
+
+/**
+ * A Firestore query.
+ **/
+@interface GCFSStructuredQuery : GPBMessage
+
+/** The projection to return. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_Projection *select;
+/** Test to see if @c select has been set. */
+@property(nonatomic, readwrite) BOOL hasSelect;
+
+/** The collections to query. */
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSStructuredQuery_CollectionSelector*> *fromArray;
+/** The number of items in @c fromArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fromArray_Count;
+
+/** The filter to apply. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_Filter *where;
+/** Test to see if @c where has been set. */
+@property(nonatomic, readwrite) BOOL hasWhere;
+
+/**
+ * The order to apply to the query results.
+ *
+ * Firestore guarantees a stable ordering through the following rules:
+ *
+ * * Any field required to appear in `order_by`, that is not already
+ * specified in `order_by`, is appended to the order in field name order
+ * by default.
+ * * If an order on `__name__` is not specified, it is appended by default.
+ *
+ * Fields are appended with the same sort direction as the last order
+ * specified, or 'ASCENDING' if no order was specified. For example:
+ *
+ * * `SELECT * FROM Foo ORDER BY A` becomes
+ * `SELECT * FROM Foo ORDER BY A, __name__`
+ * * `SELECT * FROM Foo ORDER BY A DESC` becomes
+ * `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
+ * * `SELECT * FROM Foo WHERE A > 1` becomes
+ * `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSStructuredQuery_Order*> *orderByArray;
+/** The number of items in @c orderByArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger orderByArray_Count;
+
+/** A starting point for the query results. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSCursor *startAt;
+/** Test to see if @c startAt has been set. */
+@property(nonatomic, readwrite) BOOL hasStartAt;
+
+/** A end point for the query results. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSCursor *endAt;
+/** Test to see if @c endAt has been set. */
+@property(nonatomic, readwrite) BOOL hasEndAt;
+
+/**
+ * The number of results to skip.
+ *
+ * Applies before limit, but after all other constraints. Must be >= 0 if
+ * specified.
+ **/
+@property(nonatomic, readwrite) int32_t offset;
+
+/**
+ * The maximum number of results to return.
+ *
+ * Applies after all other constraints.
+ * Must be >= 0 if specified.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Value *limit;
+/** Test to see if @c limit has been set. */
+@property(nonatomic, readwrite) BOOL hasLimit;
+
+@end
+
+#pragma mark - GCFSStructuredQuery_CollectionSelector
+
+typedef GPB_ENUM(GCFSStructuredQuery_CollectionSelector_FieldNumber) {
+ GCFSStructuredQuery_CollectionSelector_FieldNumber_CollectionId = 2,
+ GCFSStructuredQuery_CollectionSelector_FieldNumber_AllDescendants = 3,
+};
+
+/**
+ * A selection of a collection, such as `messages as m1`.
+ **/
+@interface GCFSStructuredQuery_CollectionSelector : GPBMessage
+
+/**
+ * The collection ID.
+ * When set, selects only collections with this ID.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *collectionId;
+
+/**
+ * When false, selects only collections that are immediate children of
+ * the `parent` specified in the containing `RunQueryRequest`.
+ * When true, selects all descendant collections.
+ **/
+@property(nonatomic, readwrite) BOOL allDescendants;
+
+@end
+
+#pragma mark - GCFSStructuredQuery_Filter
+
+typedef GPB_ENUM(GCFSStructuredQuery_Filter_FieldNumber) {
+ GCFSStructuredQuery_Filter_FieldNumber_CompositeFilter = 1,
+ GCFSStructuredQuery_Filter_FieldNumber_FieldFilter = 2,
+ GCFSStructuredQuery_Filter_FieldNumber_UnaryFilter = 3,
+};
+
+typedef GPB_ENUM(GCFSStructuredQuery_Filter_FilterType_OneOfCase) {
+ GCFSStructuredQuery_Filter_FilterType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSStructuredQuery_Filter_FilterType_OneOfCase_CompositeFilter = 1,
+ GCFSStructuredQuery_Filter_FilterType_OneOfCase_FieldFilter = 2,
+ GCFSStructuredQuery_Filter_FilterType_OneOfCase_UnaryFilter = 3,
+};
+
+/**
+ * A filter.
+ **/
+@interface GCFSStructuredQuery_Filter : GPBMessage
+
+/** The type of filter. */
+@property(nonatomic, readonly) GCFSStructuredQuery_Filter_FilterType_OneOfCase filterTypeOneOfCase;
+
+/** A composite filter. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_CompositeFilter *compositeFilter;
+
+/** A filter on a document field. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_FieldFilter *fieldFilter;
+
+/** A filter that takes exactly one argument. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_UnaryFilter *unaryFilter;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'filterType'.
+ **/
+void GCFSStructuredQuery_Filter_ClearFilterTypeOneOfCase(GCFSStructuredQuery_Filter *message);
+
+#pragma mark - GCFSStructuredQuery_CompositeFilter
+
+typedef GPB_ENUM(GCFSStructuredQuery_CompositeFilter_FieldNumber) {
+ GCFSStructuredQuery_CompositeFilter_FieldNumber_Op = 1,
+ GCFSStructuredQuery_CompositeFilter_FieldNumber_FiltersArray = 2,
+};
+
+/**
+ * A filter that merges multiple other filters using the given operator.
+ **/
+@interface GCFSStructuredQuery_CompositeFilter : GPBMessage
+
+/** The operator for combining multiple filters. */
+@property(nonatomic, readwrite) GCFSStructuredQuery_CompositeFilter_Operator op;
+
+/**
+ * The list of filters to combine.
+ * Must contain at least one filter.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSStructuredQuery_Filter*> *filtersArray;
+/** The number of items in @c filtersArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger filtersArray_Count;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSStructuredQuery_CompositeFilter's @c op property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSStructuredQuery_CompositeFilter_Op_RawValue(GCFSStructuredQuery_CompositeFilter *message);
+/**
+ * Sets the raw value of an @c GCFSStructuredQuery_CompositeFilter's @c op property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSStructuredQuery_CompositeFilter_Op_RawValue(GCFSStructuredQuery_CompositeFilter *message, int32_t value);
+
+#pragma mark - GCFSStructuredQuery_FieldFilter
+
+typedef GPB_ENUM(GCFSStructuredQuery_FieldFilter_FieldNumber) {
+ GCFSStructuredQuery_FieldFilter_FieldNumber_Field = 1,
+ GCFSStructuredQuery_FieldFilter_FieldNumber_Op = 2,
+ GCFSStructuredQuery_FieldFilter_FieldNumber_Value = 3,
+};
+
+/**
+ * A filter on a specific field.
+ **/
+@interface GCFSStructuredQuery_FieldFilter : GPBMessage
+
+/** The field to filter by. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_FieldReference *field;
+/** Test to see if @c field has been set. */
+@property(nonatomic, readwrite) BOOL hasField;
+
+/** The operator to filter by. */
+@property(nonatomic, readwrite) GCFSStructuredQuery_FieldFilter_Operator op;
+
+/** The value to compare to. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSValue *value;
+/** Test to see if @c value has been set. */
+@property(nonatomic, readwrite) BOOL hasValue;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSStructuredQuery_FieldFilter's @c op property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSStructuredQuery_FieldFilter_Op_RawValue(GCFSStructuredQuery_FieldFilter *message);
+/**
+ * Sets the raw value of an @c GCFSStructuredQuery_FieldFilter's @c op property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSStructuredQuery_FieldFilter_Op_RawValue(GCFSStructuredQuery_FieldFilter *message, int32_t value);
+
+#pragma mark - GCFSStructuredQuery_UnaryFilter
+
+typedef GPB_ENUM(GCFSStructuredQuery_UnaryFilter_FieldNumber) {
+ GCFSStructuredQuery_UnaryFilter_FieldNumber_Op = 1,
+ GCFSStructuredQuery_UnaryFilter_FieldNumber_Field = 2,
+};
+
+typedef GPB_ENUM(GCFSStructuredQuery_UnaryFilter_OperandType_OneOfCase) {
+ GCFSStructuredQuery_UnaryFilter_OperandType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSStructuredQuery_UnaryFilter_OperandType_OneOfCase_Field = 2,
+};
+
+/**
+ * A filter with a single operand.
+ **/
+@interface GCFSStructuredQuery_UnaryFilter : GPBMessage
+
+/** The unary operator to apply. */
+@property(nonatomic, readwrite) GCFSStructuredQuery_UnaryFilter_Operator op;
+
+/** The argument to the filter. */
+@property(nonatomic, readonly) GCFSStructuredQuery_UnaryFilter_OperandType_OneOfCase operandTypeOneOfCase;
+
+/** The field to which to apply the operator. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_FieldReference *field;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSStructuredQuery_UnaryFilter's @c op property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSStructuredQuery_UnaryFilter_Op_RawValue(GCFSStructuredQuery_UnaryFilter *message);
+/**
+ * Sets the raw value of an @c GCFSStructuredQuery_UnaryFilter's @c op property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSStructuredQuery_UnaryFilter_Op_RawValue(GCFSStructuredQuery_UnaryFilter *message, int32_t value);
+
+/**
+ * Clears whatever value was set for the oneof 'operandType'.
+ **/
+void GCFSStructuredQuery_UnaryFilter_ClearOperandTypeOneOfCase(GCFSStructuredQuery_UnaryFilter *message);
+
+#pragma mark - GCFSStructuredQuery_Order
+
+typedef GPB_ENUM(GCFSStructuredQuery_Order_FieldNumber) {
+ GCFSStructuredQuery_Order_FieldNumber_Field = 1,
+ GCFSStructuredQuery_Order_FieldNumber_Direction = 2,
+};
+
+/**
+ * An order on a field.
+ **/
+@interface GCFSStructuredQuery_Order : GPBMessage
+
+/** The field to order by. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery_FieldReference *field;
+/** Test to see if @c field has been set. */
+@property(nonatomic, readwrite) BOOL hasField;
+
+/** The direction to order by. Defaults to `ASCENDING`. */
+@property(nonatomic, readwrite) GCFSStructuredQuery_Direction direction;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSStructuredQuery_Order's @c direction property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSStructuredQuery_Order_Direction_RawValue(GCFSStructuredQuery_Order *message);
+/**
+ * Sets the raw value of an @c GCFSStructuredQuery_Order's @c direction property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSStructuredQuery_Order_Direction_RawValue(GCFSStructuredQuery_Order *message, int32_t value);
+
+#pragma mark - GCFSStructuredQuery_FieldReference
+
+typedef GPB_ENUM(GCFSStructuredQuery_FieldReference_FieldNumber) {
+ GCFSStructuredQuery_FieldReference_FieldNumber_FieldPath = 2,
+};
+
+/**
+ * A reference to a field, such as `max(messages.time) as max_time`.
+ **/
+@interface GCFSStructuredQuery_FieldReference : GPBMessage
+
+@property(nonatomic, readwrite, copy, null_resettable) NSString *fieldPath;
+
+@end
+
+#pragma mark - GCFSStructuredQuery_Projection
+
+typedef GPB_ENUM(GCFSStructuredQuery_Projection_FieldNumber) {
+ GCFSStructuredQuery_Projection_FieldNumber_FieldsArray = 2,
+};
+
+/**
+ * The projection of document's fields to return.
+ **/
+@interface GCFSStructuredQuery_Projection : GPBMessage
+
+/**
+ * The fields to return.
+ *
+ * If empty, all fields are returned. To only return the name
+ * of the document, use `['__name__']`.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSStructuredQuery_FieldReference*> *fieldsArray;
+/** The number of items in @c fieldsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fieldsArray_Count;
+
+@end
+
+#pragma mark - GCFSCursor
+
+typedef GPB_ENUM(GCFSCursor_FieldNumber) {
+ GCFSCursor_FieldNumber_ValuesArray = 1,
+ GCFSCursor_FieldNumber_Before = 2,
+};
+
+/**
+ * A position in a query result set.
+ **/
+@interface GCFSCursor : GPBMessage
+
+/**
+ * The values that represent a position, in the order they appear in
+ * the order by clause of a query.
+ *
+ * Can contain fewer values than specified in the order by clause.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSValue*> *valuesArray;
+/** The number of items in @c valuesArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger valuesArray_Count;
+
+/**
+ * If the position is just before or just after the given values, relative
+ * to the sort order defined by the query.
+ **/
+@property(nonatomic, readwrite) BOOL before;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m
new file mode 100644
index 0000000..804a5d0
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.m
@@ -0,0 +1,907 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/query.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Wrappers.pbobjc.h>
+#else
+ #import "Wrappers.pbobjc.h"
+#endif
+
+ #import "Query.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+ #import "Document.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GCFSQueryRoot
+
+@implementation GCFSQueryRoot
+
+
+@end
+
+#pragma mark - GCFSQueryRoot_FileDescriptor
+
+static GPBFileDescriptor *GCFSQueryRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
+ objcPrefix:@"GCFS"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GCFSStructuredQuery
+
+@implementation GCFSStructuredQuery
+
+@dynamic hasSelect, select;
+@dynamic fromArray, fromArray_Count;
+@dynamic hasWhere, where;
+@dynamic orderByArray, orderByArray_Count;
+@dynamic hasStartAt, startAt;
+@dynamic hasEndAt, endAt;
+@dynamic offset;
+@dynamic hasLimit, limit;
+
+typedef struct GCFSStructuredQuery__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t offset;
+ GCFSStructuredQuery_Projection *select;
+ NSMutableArray *fromArray;
+ GCFSStructuredQuery_Filter *where;
+ NSMutableArray *orderByArray;
+ GPBInt32Value *limit;
+ GCFSCursor *startAt;
+ GCFSCursor *endAt;
+} GCFSStructuredQuery__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "select",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_Projection),
+ .number = GCFSStructuredQuery_FieldNumber_Select,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, select),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "fromArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_CollectionSelector),
+ .number = GCFSStructuredQuery_FieldNumber_FromArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, fromArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "where",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_Filter),
+ .number = GCFSStructuredQuery_FieldNumber_Where,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, where),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "orderByArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_Order),
+ .number = GCFSStructuredQuery_FieldNumber_OrderByArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, orderByArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "limit",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBInt32Value),
+ .number = GCFSStructuredQuery_FieldNumber_Limit,
+ .hasIndex = 5,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, limit),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "offset",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSStructuredQuery_FieldNumber_Offset,
+ .hasIndex = 4,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, offset),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "startAt",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSCursor),
+ .number = GCFSStructuredQuery_FieldNumber_StartAt,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, startAt),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "endAt",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSCursor),
+ .number = GCFSStructuredQuery_FieldNumber_EndAt,
+ .hasIndex = 3,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery__storage_, endAt),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - Enum GCFSStructuredQuery_Direction
+
+GPBEnumDescriptor *GCFSStructuredQuery_Direction_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "DirectionUnspecified\000Ascending\000Descendin"
+ "g\000";
+ static const int32_t values[] = {
+ GCFSStructuredQuery_Direction_DirectionUnspecified,
+ GCFSStructuredQuery_Direction_Ascending,
+ GCFSStructuredQuery_Direction_Descending,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSStructuredQuery_Direction)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSStructuredQuery_Direction_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSStructuredQuery_Direction_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSStructuredQuery_Direction_DirectionUnspecified:
+ case GCFSStructuredQuery_Direction_Ascending:
+ case GCFSStructuredQuery_Direction_Descending:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSStructuredQuery_CollectionSelector
+
+@implementation GCFSStructuredQuery_CollectionSelector
+
+@dynamic collectionId;
+@dynamic allDescendants;
+
+typedef struct GCFSStructuredQuery_CollectionSelector__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *collectionId;
+} GCFSStructuredQuery_CollectionSelector__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "collectionId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSStructuredQuery_CollectionSelector_FieldNumber_CollectionId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_CollectionSelector__storage_, collectionId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "allDescendants",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSStructuredQuery_CollectionSelector_FieldNumber_AllDescendants,
+ .hasIndex = 1,
+ .offset = 2, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_CollectionSelector class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_CollectionSelector__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSStructuredQuery_Filter
+
+@implementation GCFSStructuredQuery_Filter
+
+@dynamic filterTypeOneOfCase;
+@dynamic compositeFilter;
+@dynamic fieldFilter;
+@dynamic unaryFilter;
+
+typedef struct GCFSStructuredQuery_Filter__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSStructuredQuery_CompositeFilter *compositeFilter;
+ GCFSStructuredQuery_FieldFilter *fieldFilter;
+ GCFSStructuredQuery_UnaryFilter *unaryFilter;
+} GCFSStructuredQuery_Filter__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "compositeFilter",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_CompositeFilter),
+ .number = GCFSStructuredQuery_Filter_FieldNumber_CompositeFilter,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Filter__storage_, compositeFilter),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "fieldFilter",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_FieldFilter),
+ .number = GCFSStructuredQuery_Filter_FieldNumber_FieldFilter,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Filter__storage_, fieldFilter),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "unaryFilter",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_UnaryFilter),
+ .number = GCFSStructuredQuery_Filter_FieldNumber_UnaryFilter,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Filter__storage_, unaryFilter),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_Filter class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_Filter__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "filterType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSStructuredQuery_Filter_ClearFilterTypeOneOfCase(GCFSStructuredQuery_Filter *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSStructuredQuery_CompositeFilter
+
+@implementation GCFSStructuredQuery_CompositeFilter
+
+@dynamic op;
+@dynamic filtersArray, filtersArray_Count;
+
+typedef struct GCFSStructuredQuery_CompositeFilter__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSStructuredQuery_CompositeFilter_Operator op;
+ NSMutableArray *filtersArray;
+} GCFSStructuredQuery_CompositeFilter__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "op",
+ .dataTypeSpecific.enumDescFunc = GCFSStructuredQuery_CompositeFilter_Operator_EnumDescriptor,
+ .number = GCFSStructuredQuery_CompositeFilter_FieldNumber_Op,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_CompositeFilter__storage_, op),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ {
+ .name = "filtersArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_Filter),
+ .number = GCFSStructuredQuery_CompositeFilter_FieldNumber_FiltersArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_CompositeFilter__storage_, filtersArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_CompositeFilter class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_CompositeFilter__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSStructuredQuery_CompositeFilter_Op_RawValue(GCFSStructuredQuery_CompositeFilter *message) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_CompositeFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_CompositeFilter_FieldNumber_Op];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSStructuredQuery_CompositeFilter_Op_RawValue(GCFSStructuredQuery_CompositeFilter *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_CompositeFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_CompositeFilter_FieldNumber_Op];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+#pragma mark - Enum GCFSStructuredQuery_CompositeFilter_Operator
+
+GPBEnumDescriptor *GCFSStructuredQuery_CompositeFilter_Operator_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "OperatorUnspecified\000And\000";
+ static const int32_t values[] = {
+ GCFSStructuredQuery_CompositeFilter_Operator_OperatorUnspecified,
+ GCFSStructuredQuery_CompositeFilter_Operator_And,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSStructuredQuery_CompositeFilter_Operator)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSStructuredQuery_CompositeFilter_Operator_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSStructuredQuery_CompositeFilter_Operator_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSStructuredQuery_CompositeFilter_Operator_OperatorUnspecified:
+ case GCFSStructuredQuery_CompositeFilter_Operator_And:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSStructuredQuery_FieldFilter
+
+@implementation GCFSStructuredQuery_FieldFilter
+
+@dynamic hasField, field;
+@dynamic op;
+@dynamic hasValue, value;
+
+typedef struct GCFSStructuredQuery_FieldFilter__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSStructuredQuery_FieldFilter_Operator op;
+ GCFSStructuredQuery_FieldReference *field;
+ GCFSValue *value;
+} GCFSStructuredQuery_FieldFilter__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "field",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_FieldReference),
+ .number = GCFSStructuredQuery_FieldFilter_FieldNumber_Field,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_FieldFilter__storage_, field),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "op",
+ .dataTypeSpecific.enumDescFunc = GCFSStructuredQuery_FieldFilter_Operator_EnumDescriptor,
+ .number = GCFSStructuredQuery_FieldFilter_FieldNumber_Op,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_FieldFilter__storage_, op),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ {
+ .name = "value",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSStructuredQuery_FieldFilter_FieldNumber_Value,
+ .hasIndex = 2,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_FieldFilter__storage_, value),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_FieldFilter class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_FieldFilter__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSStructuredQuery_FieldFilter_Op_RawValue(GCFSStructuredQuery_FieldFilter *message) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_FieldFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_FieldFilter_FieldNumber_Op];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSStructuredQuery_FieldFilter_Op_RawValue(GCFSStructuredQuery_FieldFilter *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_FieldFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_FieldFilter_FieldNumber_Op];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+#pragma mark - Enum GCFSStructuredQuery_FieldFilter_Operator
+
+GPBEnumDescriptor *GCFSStructuredQuery_FieldFilter_Operator_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "OperatorUnspecified\000LessThan\000LessThanOrE"
+ "qual\000GreaterThan\000GreaterThanOrEqual\000Equa"
+ "l\000";
+ static const int32_t values[] = {
+ GCFSStructuredQuery_FieldFilter_Operator_OperatorUnspecified,
+ GCFSStructuredQuery_FieldFilter_Operator_LessThan,
+ GCFSStructuredQuery_FieldFilter_Operator_LessThanOrEqual,
+ GCFSStructuredQuery_FieldFilter_Operator_GreaterThan,
+ GCFSStructuredQuery_FieldFilter_Operator_GreaterThanOrEqual,
+ GCFSStructuredQuery_FieldFilter_Operator_Equal,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSStructuredQuery_FieldFilter_Operator)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSStructuredQuery_FieldFilter_Operator_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSStructuredQuery_FieldFilter_Operator_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSStructuredQuery_FieldFilter_Operator_OperatorUnspecified:
+ case GCFSStructuredQuery_FieldFilter_Operator_LessThan:
+ case GCFSStructuredQuery_FieldFilter_Operator_LessThanOrEqual:
+ case GCFSStructuredQuery_FieldFilter_Operator_GreaterThan:
+ case GCFSStructuredQuery_FieldFilter_Operator_GreaterThanOrEqual:
+ case GCFSStructuredQuery_FieldFilter_Operator_Equal:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSStructuredQuery_UnaryFilter
+
+@implementation GCFSStructuredQuery_UnaryFilter
+
+@dynamic operandTypeOneOfCase;
+@dynamic op;
+@dynamic field;
+
+typedef struct GCFSStructuredQuery_UnaryFilter__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSStructuredQuery_UnaryFilter_Operator op;
+ GCFSStructuredQuery_FieldReference *field;
+} GCFSStructuredQuery_UnaryFilter__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "op",
+ .dataTypeSpecific.enumDescFunc = GCFSStructuredQuery_UnaryFilter_Operator_EnumDescriptor,
+ .number = GCFSStructuredQuery_UnaryFilter_FieldNumber_Op,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_UnaryFilter__storage_, op),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ {
+ .name = "field",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_FieldReference),
+ .number = GCFSStructuredQuery_UnaryFilter_FieldNumber_Field,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_UnaryFilter__storage_, field),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_UnaryFilter class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_UnaryFilter__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "operandType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSStructuredQuery_UnaryFilter_Op_RawValue(GCFSStructuredQuery_UnaryFilter *message) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_UnaryFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_UnaryFilter_FieldNumber_Op];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSStructuredQuery_UnaryFilter_Op_RawValue(GCFSStructuredQuery_UnaryFilter *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_UnaryFilter descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_UnaryFilter_FieldNumber_Op];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+void GCFSStructuredQuery_UnaryFilter_ClearOperandTypeOneOfCase(GCFSStructuredQuery_UnaryFilter *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - Enum GCFSStructuredQuery_UnaryFilter_Operator
+
+GPBEnumDescriptor *GCFSStructuredQuery_UnaryFilter_Operator_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "OperatorUnspecified\000IsNan\000IsNull\000";
+ static const int32_t values[] = {
+ GCFSStructuredQuery_UnaryFilter_Operator_OperatorUnspecified,
+ GCFSStructuredQuery_UnaryFilter_Operator_IsNan,
+ GCFSStructuredQuery_UnaryFilter_Operator_IsNull,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSStructuredQuery_UnaryFilter_Operator)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSStructuredQuery_UnaryFilter_Operator_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSStructuredQuery_UnaryFilter_Operator_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSStructuredQuery_UnaryFilter_Operator_OperatorUnspecified:
+ case GCFSStructuredQuery_UnaryFilter_Operator_IsNan:
+ case GCFSStructuredQuery_UnaryFilter_Operator_IsNull:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSStructuredQuery_Order
+
+@implementation GCFSStructuredQuery_Order
+
+@dynamic hasField, field;
+@dynamic direction;
+
+typedef struct GCFSStructuredQuery_Order__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSStructuredQuery_Direction direction;
+ GCFSStructuredQuery_FieldReference *field;
+} GCFSStructuredQuery_Order__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "field",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_FieldReference),
+ .number = GCFSStructuredQuery_Order_FieldNumber_Field,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Order__storage_, field),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "direction",
+ .dataTypeSpecific.enumDescFunc = GCFSStructuredQuery_Direction_EnumDescriptor,
+ .number = GCFSStructuredQuery_Order_FieldNumber_Direction,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Order__storage_, direction),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_Order class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_Order__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSStructuredQuery_Order_Direction_RawValue(GCFSStructuredQuery_Order *message) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_Order descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_Order_FieldNumber_Direction];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSStructuredQuery_Order_Direction_RawValue(GCFSStructuredQuery_Order *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSStructuredQuery_Order descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSStructuredQuery_Order_FieldNumber_Direction];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+#pragma mark - GCFSStructuredQuery_FieldReference
+
+@implementation GCFSStructuredQuery_FieldReference
+
+@dynamic fieldPath;
+
+typedef struct GCFSStructuredQuery_FieldReference__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *fieldPath;
+} GCFSStructuredQuery_FieldReference__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "fieldPath",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSStructuredQuery_FieldReference_FieldNumber_FieldPath,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_FieldReference__storage_, fieldPath),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_FieldReference class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_FieldReference__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSStructuredQuery_Projection
+
+@implementation GCFSStructuredQuery_Projection
+
+@dynamic fieldsArray, fieldsArray_Count;
+
+typedef struct GCFSStructuredQuery_Projection__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *fieldsArray;
+} GCFSStructuredQuery_Projection__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "fieldsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSStructuredQuery_FieldReference),
+ .number = GCFSStructuredQuery_Projection_FieldNumber_FieldsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSStructuredQuery_Projection__storage_, fieldsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSStructuredQuery_Projection class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSStructuredQuery_Projection__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSStructuredQuery)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSCursor
+
+@implementation GCFSCursor
+
+@dynamic valuesArray, valuesArray_Count;
+@dynamic before;
+
+typedef struct GCFSCursor__storage_ {
+ uint32_t _has_storage_[1];
+ NSMutableArray *valuesArray;
+} GCFSCursor__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "valuesArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSCursor_FieldNumber_ValuesArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSCursor__storage_, valuesArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "before",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSCursor_FieldNumber_Before,
+ .hasIndex = 0,
+ .offset = 1, // Stored in _has_storage_ to save space.
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeBool,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSCursor class]
+ rootClass:[GCFSQueryRoot class]
+ file:GCFSQueryRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSCursor__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h
new file mode 100644
index 0000000..c3c4498
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h
@@ -0,0 +1,432 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/write.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GCFSDocument;
+@class GCFSDocumentMask;
+@class GCFSDocumentTransform;
+@class GCFSDocumentTransform_FieldTransform;
+@class GCFSPrecondition;
+@class GCFSValue;
+@class GPBTimestamp;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - Enum GCFSDocumentTransform_FieldTransform_ServerValue
+
+/** A value that is calculated by the server. */
+typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_ServerValue) {
+ /**
+ * Value used if any message's field encounters a value that is not defined
+ * by this enum. The message will also have C functions to get/set the rawValue
+ * of the field.
+ **/
+ GCFSDocumentTransform_FieldTransform_ServerValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
+ /** Unspecified. This value must not be used. */
+ GCFSDocumentTransform_FieldTransform_ServerValue_ServerValueUnspecified = 0,
+
+ /** The time at which the server processed the request. */
+ GCFSDocumentTransform_FieldTransform_ServerValue_RequestTime = 1,
+};
+
+GPBEnumDescriptor *GCFSDocumentTransform_FieldTransform_ServerValue_EnumDescriptor(void);
+
+/**
+ * Checks to see if the given value is defined by the enum or was not known at
+ * the time this source was generated.
+ **/
+BOOL GCFSDocumentTransform_FieldTransform_ServerValue_IsValidValue(int32_t value);
+
+#pragma mark - GCFSWriteRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GCFSWriteRoot : GPBRootObject
+@end
+
+#pragma mark - GCFSWrite
+
+typedef GPB_ENUM(GCFSWrite_FieldNumber) {
+ GCFSWrite_FieldNumber_Update = 1,
+ GCFSWrite_FieldNumber_Delete_p = 2,
+ GCFSWrite_FieldNumber_UpdateMask = 3,
+ GCFSWrite_FieldNumber_CurrentDocument = 4,
+ GCFSWrite_FieldNumber_Verify = 5,
+ GCFSWrite_FieldNumber_Transform = 6,
+};
+
+typedef GPB_ENUM(GCFSWrite_Operation_OneOfCase) {
+ GCFSWrite_Operation_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSWrite_Operation_OneOfCase_Update = 1,
+ GCFSWrite_Operation_OneOfCase_Delete_p = 2,
+ GCFSWrite_Operation_OneOfCase_Verify = 5,
+ GCFSWrite_Operation_OneOfCase_Transform = 6,
+};
+
+/**
+ * A write on a document.
+ **/
+@interface GCFSWrite : GPBMessage
+
+/** The operation to execute. */
+@property(nonatomic, readonly) GCFSWrite_Operation_OneOfCase operationOneOfCase;
+
+/** A document to write. */
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *update;
+
+/**
+ * A document name to delete. In the format:
+ * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *delete_p;
+
+/**
+ * The name of a document on which to verify the `current_document`
+ * precondition.
+ * This only requires read access to the document.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *verify;
+
+/**
+ * Applies a tranformation to a document.
+ * At most one `transform` per document is allowed in a given request.
+ * An `update` cannot follow a `transform` on the same document in a given
+ * request.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentTransform *transform;
+
+/**
+ * The fields to update in this write.
+ *
+ * This field can be set only when the operation is `update`.
+ * None of the field paths in the mask may contain a reserved name.
+ * If the document exists on the server and has fields not referenced in the
+ * mask, they are left unchanged.
+ * Fields referenced in the mask, but not present in the input document, are
+ * deleted from the document on the server.
+ * The field paths in this mask must not contain a reserved field name.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *updateMask;
+/** Test to see if @c updateMask has been set. */
+@property(nonatomic, readwrite) BOOL hasUpdateMask;
+
+/**
+ * An optional precondition on the document.
+ *
+ * The write will fail if this is set and not met by the target document.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument;
+/** Test to see if @c currentDocument has been set. */
+@property(nonatomic, readwrite) BOOL hasCurrentDocument;
+
+@end
+
+/**
+ * Clears whatever value was set for the oneof 'operation'.
+ **/
+void GCFSWrite_ClearOperationOneOfCase(GCFSWrite *message);
+
+#pragma mark - GCFSDocumentTransform
+
+typedef GPB_ENUM(GCFSDocumentTransform_FieldNumber) {
+ GCFSDocumentTransform_FieldNumber_Document = 1,
+ GCFSDocumentTransform_FieldNumber_FieldTransformsArray = 2,
+};
+
+/**
+ * A transformation of a document.
+ **/
+@interface GCFSDocumentTransform : GPBMessage
+
+/** The name of the document to transform. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *document;
+
+/**
+ * The list of transformations to apply to the fields of the document, in
+ * order.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSDocumentTransform_FieldTransform*> *fieldTransformsArray;
+/** The number of items in @c fieldTransformsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger fieldTransformsArray_Count;
+
+@end
+
+#pragma mark - GCFSDocumentTransform_FieldTransform
+
+typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_FieldNumber) {
+ GCFSDocumentTransform_FieldTransform_FieldNumber_FieldPath = 1,
+ GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue = 2,
+};
+
+typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) {
+ GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_GPBUnsetOneOfCase = 0,
+ GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_SetToServerValue = 2,
+};
+
+/**
+ * A transformation of a field of the document.
+ **/
+@interface GCFSDocumentTransform_FieldTransform : GPBMessage
+
+/**
+ * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+ * reference.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *fieldPath;
+
+/** The transformation to apply on the field. */
+@property(nonatomic, readonly) GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase transformTypeOneOfCase;
+
+/** Sets the field to the given server value. */
+@property(nonatomic, readwrite) GCFSDocumentTransform_FieldTransform_ServerValue setToServerValue;
+
+@end
+
+/**
+ * Fetches the raw value of a @c GCFSDocumentTransform_FieldTransform's @c setToServerValue property, even
+ * if the value was not defined by the enum at the time the code was generated.
+ **/
+int32_t GCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message);
+/**
+ * Sets the raw value of an @c GCFSDocumentTransform_FieldTransform's @c setToServerValue property, allowing
+ * it to be set to a value that was not defined by the enum at the time the code
+ * was generated.
+ **/
+void SetGCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message, int32_t value);
+
+/**
+ * Clears whatever value was set for the oneof 'transformType'.
+ **/
+void GCFSDocumentTransform_FieldTransform_ClearTransformTypeOneOfCase(GCFSDocumentTransform_FieldTransform *message);
+
+#pragma mark - GCFSWriteResult
+
+typedef GPB_ENUM(GCFSWriteResult_FieldNumber) {
+ GCFSWriteResult_FieldNumber_UpdateTime = 1,
+ GCFSWriteResult_FieldNumber_TransformResultsArray = 2,
+};
+
+/**
+ * The result of applying a write.
+ **/
+@interface GCFSWriteResult : GPBMessage
+
+/**
+ * The last update time of the document after applying the write. Not set
+ * after a `delete`.
+ *
+ * If the write did not actually change the document, this will be the
+ * previous update_time.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *updateTime;
+/** Test to see if @c updateTime has been set. */
+@property(nonatomic, readwrite) BOOL hasUpdateTime;
+
+/**
+ * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+ * same order.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSValue*> *transformResultsArray;
+/** The number of items in @c transformResultsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger transformResultsArray_Count;
+
+@end
+
+#pragma mark - GCFSDocumentChange
+
+typedef GPB_ENUM(GCFSDocumentChange_FieldNumber) {
+ GCFSDocumentChange_FieldNumber_Document = 1,
+ GCFSDocumentChange_FieldNumber_TargetIdsArray = 5,
+ GCFSDocumentChange_FieldNumber_RemovedTargetIdsArray = 6,
+};
+
+/**
+ * A [Document][google.firestore.v1beta1.Document] has changed.
+ *
+ * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
+ * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
+ *
+ * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
+ * change, if multiple targets are affected.
+ **/
+@interface GCFSDocumentChange : GPBMessage
+
+/**
+ * The new state of the [Document][google.firestore.v1beta1.Document].
+ *
+ * If `mask` is set, contains only fields that were updated or added.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
+/** Test to see if @c document has been set. */
+@property(nonatomic, readwrite) BOOL hasDocument;
+
+/** A set of target IDs of targets that match this document. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *targetIdsArray;
+/** The number of items in @c targetIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger targetIdsArray_Count;
+
+/** A set of target IDs for targets that no longer match this document. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
+/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;
+
+@end
+
+#pragma mark - GCFSDocumentDelete
+
+typedef GPB_ENUM(GCFSDocumentDelete_FieldNumber) {
+ GCFSDocumentDelete_FieldNumber_Document = 1,
+ GCFSDocumentDelete_FieldNumber_ReadTime = 4,
+ GCFSDocumentDelete_FieldNumber_RemovedTargetIdsArray = 6,
+};
+
+/**
+ * A [Document][google.firestore.v1beta1.Document] has been deleted.
+ *
+ * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
+ * last of which deleted the [Document][google.firestore.v1beta1.Document].
+ *
+ * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
+ * delete, if multiple targets are affected.
+ **/
+@interface GCFSDocumentDelete : GPBMessage
+
+/** The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *document;
+
+/** A set of target IDs for targets that previously matched this entity. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
+/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;
+
+/**
+ * The read timestamp at which the delete was observed.
+ *
+ * Greater or equal to the `commit_time` of the delete.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+@end
+
+#pragma mark - GCFSDocumentRemove
+
+typedef GPB_ENUM(GCFSDocumentRemove_FieldNumber) {
+ GCFSDocumentRemove_FieldNumber_Document = 1,
+ GCFSDocumentRemove_FieldNumber_RemovedTargetIdsArray = 2,
+ GCFSDocumentRemove_FieldNumber_ReadTime = 4,
+};
+
+/**
+ * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
+ *
+ * Sent if the document is no longer relevant to a target and is out of view.
+ * Can be sent instead of a DocumentDelete or a DocumentChange if the server
+ * can not send the new value of the document.
+ *
+ * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
+ * write or delete, if multiple targets are affected.
+ **/
+@interface GCFSDocumentRemove : GPBMessage
+
+/** The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. */
+@property(nonatomic, readwrite, copy, null_resettable) NSString *document;
+
+/** A set of target IDs for targets that previously matched this document. */
+@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
+/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;
+
+/**
+ * The read timestamp at which the remove was observed.
+ *
+ * Greater or equal to the `commit_time` of the change/delete/remove.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
+/** Test to see if @c readTime has been set. */
+@property(nonatomic, readwrite) BOOL hasReadTime;
+
+@end
+
+#pragma mark - GCFSExistenceFilter
+
+typedef GPB_ENUM(GCFSExistenceFilter_FieldNumber) {
+ GCFSExistenceFilter_FieldNumber_TargetId = 1,
+ GCFSExistenceFilter_FieldNumber_Count = 2,
+};
+
+/**
+ * A digest of all the documents that match a given target.
+ **/
+@interface GCFSExistenceFilter : GPBMessage
+
+/** The target ID to which this filter applies. */
+@property(nonatomic, readwrite) int32_t targetId;
+
+/**
+ * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+ *
+ * If different from the count of documents in the client that match, the
+ * client must manually determine which documents no longer match the target.
+ **/
+@property(nonatomic, readwrite) int32_t count;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m
new file mode 100644
index 0000000..e6fd0f4
--- /dev/null
+++ b/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.m
@@ -0,0 +1,653 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/firestore/v1beta1/write.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Timestamp.pbobjc.h>
+#else
+ #import "Timestamp.pbobjc.h"
+#endif
+
+ #import "Write.pbobjc.h"
+ #import "Annotations.pbobjc.h"
+ #import "Common.pbobjc.h"
+ #import "Document.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#pragma clang diagnostic ignored "-Wdirect-ivar-access"
+
+#pragma mark - GCFSWriteRoot
+
+@implementation GCFSWriteRoot
+
+
+@end
+
+#pragma mark - GCFSWriteRoot_FileDescriptor
+
+static GPBFileDescriptor *GCFSWriteRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
+ objcPrefix:@"GCFS"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GCFSWrite
+
+@implementation GCFSWrite
+
+@dynamic operationOneOfCase;
+@dynamic update;
+@dynamic delete_p;
+@dynamic verify;
+@dynamic transform;
+@dynamic hasUpdateMask, updateMask;
+@dynamic hasCurrentDocument, currentDocument;
+
+typedef struct GCFSWrite__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSDocument *update;
+ NSString *delete_p;
+ GCFSDocumentMask *updateMask;
+ GCFSPrecondition *currentDocument;
+ NSString *verify;
+ GCFSDocumentTransform *transform;
+} GCFSWrite__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "update",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSWrite_FieldNumber_Update,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, update),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "delete_p",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWrite_FieldNumber_Delete_p,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, delete_p),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "updateMask",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentMask),
+ .number = GCFSWrite_FieldNumber_UpdateMask,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, updateMask),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "currentDocument",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSPrecondition),
+ .number = GCFSWrite_FieldNumber_CurrentDocument,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, currentDocument),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "verify",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSWrite_FieldNumber_Verify,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, verify),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "transform",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentTransform),
+ .number = GCFSWrite_FieldNumber_Transform,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSWrite__storage_, transform),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSWrite class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSWrite__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "operation",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+void GCFSWrite_ClearOperationOneOfCase(GCFSWrite *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - GCFSDocumentTransform
+
+@implementation GCFSDocumentTransform
+
+@dynamic document;
+@dynamic fieldTransformsArray, fieldTransformsArray_Count;
+
+typedef struct GCFSDocumentTransform__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *document;
+ NSMutableArray *fieldTransformsArray;
+} GCFSDocumentTransform__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentTransform_FieldNumber_Document,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocumentTransform__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "fieldTransformsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocumentTransform_FieldTransform),
+ .number = GCFSDocumentTransform_FieldNumber_FieldTransformsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentTransform__storage_, fieldTransformsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentTransform class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentTransform__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSDocumentTransform_FieldTransform
+
+@implementation GCFSDocumentTransform_FieldTransform
+
+@dynamic transformTypeOneOfCase;
+@dynamic fieldPath;
+@dynamic setToServerValue;
+
+typedef struct GCFSDocumentTransform_FieldTransform__storage_ {
+ uint32_t _has_storage_[2];
+ GCFSDocumentTransform_FieldTransform_ServerValue setToServerValue;
+ NSString *fieldPath;
+} GCFSDocumentTransform_FieldTransform__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "fieldPath",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentTransform_FieldTransform_FieldNumber_FieldPath,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, fieldPath),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "setToServerValue",
+ .dataTypeSpecific.enumDescFunc = GCFSDocumentTransform_FieldTransform_ServerValue_EnumDescriptor,
+ .number = GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue,
+ .hasIndex = -1,
+ .offset = (uint32_t)offsetof(GCFSDocumentTransform_FieldTransform__storage_, setToServerValue),
+ .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
+ .dataType = GPBDataTypeEnum,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentTransform_FieldTransform class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentTransform_FieldTransform__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ static const char *oneofs[] = {
+ "transformType",
+ };
+ [localDescriptor setupOneofs:oneofs
+ count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
+ firstHasIndex:-1];
+ [localDescriptor setupContainingMessageClassName:GPBStringifySymbol(GCFSDocumentTransform)];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+int32_t GCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message) {
+ GPBDescriptor *descriptor = [GCFSDocumentTransform_FieldTransform descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue];
+ return GPBGetMessageInt32Field(message, field);
+}
+
+void SetGCFSDocumentTransform_FieldTransform_SetToServerValue_RawValue(GCFSDocumentTransform_FieldTransform *message, int32_t value) {
+ GPBDescriptor *descriptor = [GCFSDocumentTransform_FieldTransform descriptor];
+ GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue];
+ GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
+}
+
+void GCFSDocumentTransform_FieldTransform_ClearTransformTypeOneOfCase(GCFSDocumentTransform_FieldTransform *message) {
+ GPBDescriptor *descriptor = [message descriptor];
+ GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
+ GPBMaybeClearOneof(message, oneof, -1, 0);
+}
+#pragma mark - Enum GCFSDocumentTransform_FieldTransform_ServerValue
+
+GPBEnumDescriptor *GCFSDocumentTransform_FieldTransform_ServerValue_EnumDescriptor(void) {
+ static GPBEnumDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ static const char *valueNames =
+ "ServerValueUnspecified\000RequestTime\000";
+ static const int32_t values[] = {
+ GCFSDocumentTransform_FieldTransform_ServerValue_ServerValueUnspecified,
+ GCFSDocumentTransform_FieldTransform_ServerValue_RequestTime,
+ };
+ GPBEnumDescriptor *worker =
+ [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GCFSDocumentTransform_FieldTransform_ServerValue)
+ valueNames:valueNames
+ values:values
+ count:(uint32_t)(sizeof(values) / sizeof(int32_t))
+ enumVerifier:GCFSDocumentTransform_FieldTransform_ServerValue_IsValidValue];
+ if (!OSAtomicCompareAndSwapPtrBarrier(nil, worker, (void * volatile *)&descriptor)) {
+ [worker release];
+ }
+ }
+ return descriptor;
+}
+
+BOOL GCFSDocumentTransform_FieldTransform_ServerValue_IsValidValue(int32_t value__) {
+ switch (value__) {
+ case GCFSDocumentTransform_FieldTransform_ServerValue_ServerValueUnspecified:
+ case GCFSDocumentTransform_FieldTransform_ServerValue_RequestTime:
+ return YES;
+ default:
+ return NO;
+ }
+}
+
+#pragma mark - GCFSWriteResult
+
+@implementation GCFSWriteResult
+
+@dynamic hasUpdateTime, updateTime;
+@dynamic transformResultsArray, transformResultsArray_Count;
+
+typedef struct GCFSWriteResult__storage_ {
+ uint32_t _has_storage_[1];
+ GPBTimestamp *updateTime;
+ NSMutableArray *transformResultsArray;
+} GCFSWriteResult__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "updateTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSWriteResult_FieldNumber_UpdateTime,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSWriteResult__storage_, updateTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "transformResultsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
+ .number = GCFSWriteResult_FieldNumber_TransformResultsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSWriteResult__storage_, transformResultsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSWriteResult class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSWriteResult__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSDocumentChange
+
+@implementation GCFSDocumentChange
+
+@dynamic hasDocument, document;
+@dynamic targetIdsArray, targetIdsArray_Count;
+@dynamic removedTargetIdsArray, removedTargetIdsArray_Count;
+
+typedef struct GCFSDocumentChange__storage_ {
+ uint32_t _has_storage_[1];
+ GCFSDocument *document;
+ GPBInt32Array *targetIdsArray;
+ GPBInt32Array *removedTargetIdsArray;
+} GCFSDocumentChange__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = GPBStringifySymbol(GCFSDocument),
+ .number = GCFSDocumentChange_FieldNumber_Document,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocumentChange__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "targetIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentChange_FieldNumber_TargetIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentChange__storage_, targetIdsArray),
+ .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "removedTargetIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentChange_FieldNumber_RemovedTargetIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentChange__storage_, removedTargetIdsArray),
+ .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
+ .dataType = GPBDataTypeInt32,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentChange class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentChange__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSDocumentDelete
+
+@implementation GCFSDocumentDelete
+
+@dynamic document;
+@dynamic removedTargetIdsArray, removedTargetIdsArray_Count;
+@dynamic hasReadTime, readTime;
+
+typedef struct GCFSDocumentDelete__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *document;
+ GPBTimestamp *readTime;
+ GPBInt32Array *removedTargetIdsArray;
+} GCFSDocumentDelete__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentDelete_FieldNumber_Document,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocumentDelete__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSDocumentDelete_FieldNumber_ReadTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSDocumentDelete__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ {
+ .name = "removedTargetIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentDelete_FieldNumber_RemovedTargetIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentDelete__storage_, removedTargetIdsArray),
+ .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
+ .dataType = GPBDataTypeInt32,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentDelete class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentDelete__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSDocumentRemove
+
+@implementation GCFSDocumentRemove
+
+@dynamic document;
+@dynamic removedTargetIdsArray, removedTargetIdsArray_Count;
+@dynamic hasReadTime, readTime;
+
+typedef struct GCFSDocumentRemove__storage_ {
+ uint32_t _has_storage_[1];
+ NSString *document;
+ GPBInt32Array *removedTargetIdsArray;
+ GPBTimestamp *readTime;
+} GCFSDocumentRemove__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "document",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentRemove_FieldNumber_Document,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSDocumentRemove__storage_, document),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "removedTargetIdsArray",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSDocumentRemove_FieldNumber_RemovedTargetIdsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(GCFSDocumentRemove__storage_, removedTargetIdsArray),
+ .flags = (GPBFieldFlags)(GPBFieldRepeated | GPBFieldPacked),
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "readTime",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
+ .number = GCFSDocumentRemove_FieldNumber_ReadTime,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSDocumentRemove__storage_, readTime),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSDocumentRemove class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSDocumentRemove__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+#pragma mark - GCFSExistenceFilter
+
+@implementation GCFSExistenceFilter
+
+@dynamic targetId;
+@dynamic count;
+
+typedef struct GCFSExistenceFilter__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t targetId;
+ int32_t count;
+} GCFSExistenceFilter__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "targetId",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSExistenceFilter_FieldNumber_TargetId,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GCFSExistenceFilter__storage_, targetId),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "count",
+ .dataTypeSpecific.className = NULL,
+ .number = GCFSExistenceFilter_FieldNumber_Count,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GCFSExistenceFilter__storage_, count),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GCFSExistenceFilter class]
+ rootClass:[GCFSWriteRoot class]
+ file:GCFSWriteRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GCFSExistenceFilter__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/rpc/Status.pbobjc.h b/Firestore/Protos/objc/google/rpc/Status.pbobjc.h
new file mode 100644
index 0000000..86c21c7
--- /dev/null
+++ b/Firestore/Protos/objc/google/rpc/Status.pbobjc.h
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/rpc/status.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+@class GPBAny;
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - RPCStatusRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface RPCStatusRoot : GPBRootObject
+@end
+
+#pragma mark - RPCStatus
+
+typedef GPB_ENUM(RPCStatus_FieldNumber) {
+ RPCStatus_FieldNumber_Code = 1,
+ RPCStatus_FieldNumber_Message = 2,
+ RPCStatus_FieldNumber_DetailsArray = 3,
+};
+
+/**
+ * The `Status` type defines a logical error model that is suitable for different
+ * programming environments, including REST APIs and RPC APIs. It is used by
+ * [gRPC](https://github.com/grpc). The error model is designed to be:
+ *
+ * - Simple to use and understand for most users
+ * - Flexible enough to meet unexpected needs
+ *
+ * # Overview
+ *
+ * The `Status` message contains three pieces of data: error code, error message,
+ * and error details. The error code should be an enum value of
+ * [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
+ * error message should be a developer-facing English message that helps
+ * developers *understand* and *resolve* the error. If a localized user-facing
+ * error message is needed, put the localized message in the error details or
+ * localize it in the client. The optional error details may contain arbitrary
+ * information about the error. There is a predefined set of error detail types
+ * in the package `google.rpc` that can be used for common error conditions.
+ *
+ * # Language mapping
+ *
+ * The `Status` message is the logical representation of the error model, but it
+ * is not necessarily the actual wire format. When the `Status` message is
+ * exposed in different client libraries and different wire protocols, it can be
+ * mapped differently. For example, it will likely be mapped to some exceptions
+ * in Java, but more likely mapped to some error codes in C.
+ *
+ * # Other uses
+ *
+ * The error model and the `Status` message can be used in a variety of
+ * environments, either with or without APIs, to provide a
+ * consistent developer experience across different environments.
+ *
+ * Example uses of this error model include:
+ *
+ * - Partial errors. If a service needs to return partial errors to the client,
+ * it may embed the `Status` in the normal response to indicate the partial
+ * errors.
+ *
+ * - Workflow errors. A typical workflow has multiple steps. Each step may
+ * have a `Status` message for error reporting.
+ *
+ * - Batch operations. If a client uses batch request and batch response, the
+ * `Status` message should be used directly inside batch response, one for
+ * each error sub-response.
+ *
+ * - Asynchronous operations. If an API call embeds asynchronous operation
+ * results in its response, the status of those operations should be
+ * represented directly using the `Status` message.
+ *
+ * - Logging. If some API errors are stored in logs, the message `Status` could
+ * be used directly after any stripping needed for security/privacy reasons.
+ **/
+@interface RPCStatus : GPBMessage
+
+/** The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. */
+@property(nonatomic, readwrite) int32_t code;
+
+/**
+ * A developer-facing error message, which should be in English. Any
+ * user-facing error message should be localized and sent in the
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+ **/
+@property(nonatomic, readwrite, copy, null_resettable) NSString *message;
+
+/**
+ * A list of messages that carry the error details. There is a common set of
+ * message types for APIs to use.
+ **/
+@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBAny*> *detailsArray;
+/** The number of items in @c detailsArray without causing the array to be created. */
+@property(nonatomic, readonly) NSUInteger detailsArray_Count;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/rpc/Status.pbobjc.m b/Firestore/Protos/objc/google/rpc/Status.pbobjc.m
new file mode 100644
index 0000000..831073c
--- /dev/null
+++ b/Firestore/Protos/objc/google/rpc/Status.pbobjc.m
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/rpc/status.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/Any.pbobjc.h>
+#else
+ #import "Any.pbobjc.h"
+#endif
+
+ #import "Status.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma mark - RPCStatusRoot
+
+@implementation RPCStatusRoot
+
+// No extensions in the file and none of the imports (direct or indirect)
+// defined extensions, so no need to generate +extensionRegistry.
+
+@end
+
+#pragma mark - RPCStatusRoot_FileDescriptor
+
+static GPBFileDescriptor *RPCStatusRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.rpc"
+ objcPrefix:@"RPC"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - RPCStatus
+
+@implementation RPCStatus
+
+@dynamic code;
+@dynamic message;
+@dynamic detailsArray, detailsArray_Count;
+
+typedef struct RPCStatus__storage_ {
+ uint32_t _has_storage_[1];
+ int32_t code;
+ NSString *message;
+ NSMutableArray *detailsArray;
+} RPCStatus__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "code",
+ .dataTypeSpecific.className = NULL,
+ .number = RPCStatus_FieldNumber_Code,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(RPCStatus__storage_, code),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeInt32,
+ },
+ {
+ .name = "message",
+ .dataTypeSpecific.className = NULL,
+ .number = RPCStatus_FieldNumber_Message,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(RPCStatus__storage_, message),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeString,
+ },
+ {
+ .name = "detailsArray",
+ .dataTypeSpecific.className = GPBStringifySymbol(GPBAny),
+ .number = RPCStatus_FieldNumber_DetailsArray,
+ .hasIndex = GPBNoHasBit,
+ .offset = (uint32_t)offsetof(RPCStatus__storage_, detailsArray),
+ .flags = GPBFieldRepeated,
+ .dataType = GPBDataTypeMessage,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[RPCStatus class]
+ rootClass:[RPCStatusRoot class]
+ file:RPCStatusRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(RPCStatus__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/type/Latlng.pbobjc.h b/Firestore/Protos/objc/google/type/Latlng.pbobjc.h
new file mode 100644
index 0000000..0af137f
--- /dev/null
+++ b/Firestore/Protos/objc/google/type/Latlng.pbobjc.h
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/latlng.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers.h>
+#else
+ #import "GPBProtocolBuffers.h"
+#endif
+
+#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
+#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
+#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
+#endif
+
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+CF_EXTERN_C_BEGIN
+
+NS_ASSUME_NONNULL_BEGIN
+
+#pragma mark - GTPLatlngRoot
+
+/**
+ * Exposes the extension registry for this file.
+ *
+ * The base class provides:
+ * @code
+ * + (GPBExtensionRegistry *)extensionRegistry;
+ * @endcode
+ * which is a @c GPBExtensionRegistry that includes all the extensions defined by
+ * this file and all files that it depends on.
+ **/
+@interface GTPLatlngRoot : GPBRootObject
+@end
+
+#pragma mark - GTPLatLng
+
+typedef GPB_ENUM(GTPLatLng_FieldNumber) {
+ GTPLatLng_FieldNumber_Latitude = 1,
+ GTPLatLng_FieldNumber_Longitude = 2,
+};
+
+/**
+ * An object representing a latitude/longitude pair. This is expressed as a pair
+ * of doubles representing degrees latitude and degrees longitude. Unless
+ * specified otherwise, this must conform to the
+ * <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+ * standard</a>. Values must be within normalized ranges.
+ *
+ * Example of normalization code in Python:
+ *
+ * def NormalizeLongitude(longitude):
+ * """Wraps decimal degrees longitude to [-180.0, 180.0]."""
+ * q, r = divmod(longitude, 360.0)
+ * if r > 180.0 or (r == 180.0 and q <= -1.0):
+ * return r - 360.0
+ * return r
+ *
+ * def NormalizeLatLng(latitude, longitude):
+ * """Wraps decimal degrees latitude and longitude to
+ * [-90.0, 90.0] and [-180.0, 180.0], respectively."""
+ * r = latitude % 360.0
+ * if r <= 90.0:
+ * return r, NormalizeLongitude(longitude)
+ * elif r >= 270.0:
+ * return r - 360, NormalizeLongitude(longitude)
+ * else:
+ * return 180 - r, NormalizeLongitude(longitude + 180.0)
+ *
+ * assert 180.0 == NormalizeLongitude(180.0)
+ * assert -180.0 == NormalizeLongitude(-180.0)
+ * assert -179.0 == NormalizeLongitude(181.0)
+ * assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
+ * assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
+ * assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
+ * assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
+ * assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
+ * assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
+ * assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
+ * assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
+ * assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
+ * assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
+ **/
+@interface GTPLatLng : GPBMessage
+
+/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
+@property(nonatomic, readwrite) double latitude;
+
+/** The longitude in degrees. It must be in the range [-180.0, +180.0]. */
+@property(nonatomic, readwrite) double longitude;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+CF_EXTERN_C_END
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/objc/google/type/Latlng.pbobjc.m b/Firestore/Protos/objc/google/type/Latlng.pbobjc.m
new file mode 100644
index 0000000..9bb37ab
--- /dev/null
+++ b/Firestore/Protos/objc/google/type/Latlng.pbobjc.m
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2017 Google
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/type/latlng.proto
+
+// This CPP symbol can be defined to use imports that match up to the framework
+// imports needed when using CocoaPods.
+#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
+ #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
+#endif
+
+#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
+ #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
+#else
+ #import "GPBProtocolBuffers_RuntimeSupport.h"
+#endif
+
+ #import "Latlng.pbobjc.h"
+// @@protoc_insertion_point(imports)
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+
+#pragma mark - GTPLatlngRoot
+
+@implementation GTPLatlngRoot
+
+// No extensions in the file and no imports, so no need to generate
+// +extensionRegistry.
+
+@end
+
+#pragma mark - GTPLatlngRoot_FileDescriptor
+
+static GPBFileDescriptor *GTPLatlngRoot_FileDescriptor(void) {
+ // This is called by +initialize so there is no need to worry
+ // about thread safety of the singleton.
+ static GPBFileDescriptor *descriptor = NULL;
+ if (!descriptor) {
+ GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
+ descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.type"
+ objcPrefix:@"GTP"
+ syntax:GPBFileSyntaxProto3];
+ }
+ return descriptor;
+}
+
+#pragma mark - GTPLatLng
+
+@implementation GTPLatLng
+
+@dynamic latitude;
+@dynamic longitude;
+
+typedef struct GTPLatLng__storage_ {
+ uint32_t _has_storage_[1];
+ double latitude;
+ double longitude;
+} GTPLatLng__storage_;
+
+// This method is threadsafe because it is initially called
+// in +initialize for each subclass.
++ (GPBDescriptor *)descriptor {
+ static GPBDescriptor *descriptor = nil;
+ if (!descriptor) {
+ static GPBMessageFieldDescription fields[] = {
+ {
+ .name = "latitude",
+ .dataTypeSpecific.className = NULL,
+ .number = GTPLatLng_FieldNumber_Latitude,
+ .hasIndex = 0,
+ .offset = (uint32_t)offsetof(GTPLatLng__storage_, latitude),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeDouble,
+ },
+ {
+ .name = "longitude",
+ .dataTypeSpecific.className = NULL,
+ .number = GTPLatLng_FieldNumber_Longitude,
+ .hasIndex = 1,
+ .offset = (uint32_t)offsetof(GTPLatLng__storage_, longitude),
+ .flags = GPBFieldOptional,
+ .dataType = GPBDataTypeDouble,
+ },
+ };
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GTPLatLng class]
+ rootClass:[GTPLatlngRoot class]
+ file:GTPLatlngRoot_FileDescriptor()
+ fields:fields
+ fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
+ storageSize:sizeof(GTPLatLng__storage_)
+ flags:GPBDescriptorInitializationFlag_None];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
+ }
+ return descriptor;
+}
+
+@end
+
+
+#pragma clang diagnostic pop
+
+// @@protoc_insertion_point(global_scope)
diff --git a/Firestore/Protos/protos/firestore/local/maybe_document.proto b/Firestore/Protos/protos/firestore/local/maybe_document.proto
new file mode 100644
index 0000000..67d2f68
--- /dev/null
+++ b/Firestore/Protos/protos/firestore/local/maybe_document.proto
@@ -0,0 +1,33 @@
+syntax = "proto3";
+
+package firestore.client;
+
+option java_multiple_files = true;
+option java_package = "com.google.firebase.firestore.proto";
+
+option objc_class_prefix = "FSTPB";
+
+import "google/firestore/v1beta1/document.proto";
+import "google/protobuf/timestamp.proto";
+
+// A message indicating that the document is known to not exist.
+message NoDocument {
+ // The name of the document that does not exist, in the standard format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`
+ string name = 1;
+
+ // The time at which we observed that it does not exist.
+ google.protobuf.Timestamp read_time = 2;
+}
+
+// Represents either an existing document or the explicitly known absence of a
+// document.
+message MaybeDocument {
+ oneof document_type {
+ // Used if the document is known to not exist.
+ NoDocument no_document = 1;
+
+ // The document (if it exists).
+ google.firestore.v1beta1.Document document = 2;
+ }
+}
diff --git a/Firestore/Protos/protos/firestore/local/mutation.proto b/Firestore/Protos/protos/firestore/local/mutation.proto
new file mode 100644
index 0000000..6087f87
--- /dev/null
+++ b/Firestore/Protos/protos/firestore/local/mutation.proto
@@ -0,0 +1,44 @@
+syntax = "proto3";
+
+import "google/firestore/v1beta1/write.proto";
+import "google/protobuf/timestamp.proto";
+
+package firestore.client;
+
+option java_multiple_files = true;
+option java_package = "com.google.firebase.firestore.proto";
+
+option objc_class_prefix = "FSTPB";
+
+// Each user gets a single queue of WriteBatches to apply to the server.
+// MutationQueue tracks the metadata about the queue.
+message MutationQueue {
+ // An identifier for the highest numbered batch that has been acknowledged by
+ // the server. All WriteBatches in this queue with batch_ids less than or
+ // equal to this value are considered to have been acknowledged by the
+ // server.
+ int32 last_acknowledged_batch_id = 1;
+
+ // A stream token that was previously sent by the server.
+ //
+ // See StreamingWriteRequest in datastore.proto for more details about usage.
+ //
+ // After sending this token, earlier tokens may not be used anymore so only a
+ // single stream token is retained.
+ bytes last_stream_token = 2;
+}
+
+// Message containing a batch of user-level writes intended to be sent to
+// the server in a single call. Each user-level batch gets a separate
+// WriteBatch with a new batch_id.
+message WriteBatch {
+ // An identifier for this batch, allocated by the mutation queue in a
+ // monotonically increasing manner.
+ int32 batch_id = 1;
+
+ // A list of writes to apply. All writes will be applied atomically.
+ repeated google.firestore.v1beta1.Write writes = 2;
+
+ // The local time at which the write batch was initiated.
+ google.protobuf.Timestamp local_write_time = 3;
+}
diff --git a/Firestore/Protos/protos/firestore/local/target.proto b/Firestore/Protos/protos/firestore/local/target.proto
new file mode 100644
index 0000000..7f34515
--- /dev/null
+++ b/Firestore/Protos/protos/firestore/local/target.proto
@@ -0,0 +1,90 @@
+syntax = "proto3";
+
+package firestore.client;
+
+option java_multiple_files = true;
+option java_package = "com.google.firebase.firestore.proto";
+
+option objc_class_prefix = "FSTPB";
+
+import "google/firestore/v1beta1/firestore.proto";
+import "google/protobuf/timestamp.proto";
+
+// A Target is a long-lived data structure representing a resumable listen on a
+// particular user query. While the query describes what to listen to, the
+// Target records data about when the results were last updated and enough
+// information to be able to resume listening later.
+message Target {
+ // An auto-generated sequential numeric identifier for the target. This
+ // serves as the identity of the target, and once assigned never changes.
+ int32 target_id = 1;
+
+ // The last snapshot version received from the Watch Service for this target.
+ //
+ // This is the same value as TargetChange.read_time
+ google.protobuf.Timestamp snapshot_version = 2;
+
+ // An opaque, server-assigned token that allows watching a query to be
+ // resumed after disconnecting without retransmitting all the data that
+ // matches the query. The resume token essentially identifies a point in
+ // time from which the server should resume sending results.
+ //
+ // This is related to the snapshot_version in that the resume_token
+ // effectively also encodes that value, but the resume_token is opaque and
+ // sometimes encodes additional information.
+ //
+ // A consequence of this is that the resume_token should be used when asking
+ // the server to reason about where this client is in the watch stream, but
+ // the client should use the snapshot_version for its own purposes.
+ //
+ // This is the same value as TargetChange.resume_token
+ bytes resume_token = 3;
+
+ // A sequence number representing the last time this query was listened to,
+ // used for garbage collection purposes.
+ //
+ // Conventionally this would be a timestamp value, but device-local clocks
+ // are unreliable and they must be able to create new listens even while
+ // disconnected. Instead this should be a monotonically increasing number
+ // that's incremented on each listen call.
+ //
+ // This is different from the target_id since the target_id is an immutable
+ // identifier assigned to the Target on first use while
+ // last_listen_sequence_number is updated every time the query is listened
+ // to.
+ int64 last_listen_sequence_number = 4;
+
+ // The server-side type of target to listen to.
+ oneof target_type {
+ // A target specified by a query.
+ google.firestore.v1beta1.Target.QueryTarget query = 5;
+
+ // A target specified by a set of document names.
+ google.firestore.v1beta1.Target.DocumentsTarget documents = 6;
+ }
+}
+
+// Global state tracked across all Targets, tracked separately to avoid the
+// need for extra indexes.
+message TargetGlobal {
+ // The highest numbered target id across all Targets.
+ //
+ // See Target.target_id.
+ int32 highest_target_id = 1;
+
+ // The highest numbered last_listen_sequence_number across all Targets.
+ //
+ // See Target.last_listen_sequence_number.
+ int64 highest_listen_sequence_number = 2;
+
+ // A global snapshot version representing the last consistent snapshot we
+ // received from the backend. This is monotonically increasing and any
+ // snapshots received from the backend prior to this version (e.g. for
+ // targets resumed with a resume_token) should be suppressed (buffered) until
+ // the backend has caught up to this snapshot_version again. This prevents
+ // our cache from ever going backwards in time.
+ //
+ // This is updated whenever our we get a TargetChange with a read_time and
+ // empty target_ids.
+ google.protobuf.Timestamp last_remote_snapshot_version = 3;
+}
diff --git a/Firestore/Protos/protos/google/api/annotations.proto b/Firestore/Protos/protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/Firestore/Protos/protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/Firestore/Protos/protos/google/api/http.proto b/Firestore/Protos/protos/google/api/http.proto
new file mode 100644
index 0000000..5f8538a
--- /dev/null
+++ b/Firestore/Protos/protos/google/api/http.proto
@@ -0,0 +1,291 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+
+// Defines the HTTP configuration for a service. It contains a list of
+// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
+// to one or more HTTP REST API methods.
+message Http {
+ // A list of HTTP configuration rules that apply to individual API methods.
+ //
+ // **NOTE:** All service configuration rules follow "last one wins" order.
+ repeated HttpRule rules = 1;
+}
+
+// `HttpRule` defines the mapping of an RPC method to one or more HTTP
+// REST APIs. The mapping determines what portions of the request
+// message are populated from the path, query parameters, or body of
+// the HTTP request. The mapping is typically specified as an
+// `google.api.http` annotation, see "google/api/annotations.proto"
+// for details.
+//
+// The mapping consists of a field specifying the path template and
+// method kind. The path template can refer to fields in the request
+// message, as in the example below which describes a REST GET
+// operation on a resource collection of messages:
+//
+//
+// service Messaging {
+// rpc GetMessage(GetMessageRequest) returns (Message) {
+// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}";
+// }
+// }
+// message GetMessageRequest {
+// message SubMessage {
+// string subfield = 1;
+// }
+// string message_id = 1; // mapped to the URL
+// SubMessage sub = 2; // `sub.subfield` is url-mapped
+// }
+// message Message {
+// string text = 1; // content of the resource
+// }
+//
+// The same http annotation can alternatively be expressed inside the
+// `GRPC API Configuration` YAML file.
+//
+// http:
+// rules:
+// - selector: <proto_package_name>.Messaging.GetMessage
+// get: /v1/messages/{message_id}/{sub.subfield}
+//
+// This definition enables an automatic, bidrectional mapping of HTTP
+// JSON to RPC. Example:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))`
+//
+// In general, not only fields but also field paths can be referenced
+// from a path pattern. Fields mapped to the path pattern cannot be
+// repeated and must have a primitive (non-message) type.
+//
+// Any fields in the request message which are not bound by the path
+// pattern automatically become (optional) HTTP query
+// parameters. Assume the following definition of the request message:
+//
+//
+// message GetMessageRequest {
+// message SubMessage {
+// string subfield = 1;
+// }
+// string message_id = 1; // mapped to the URL
+// int64 revision = 2; // becomes a parameter
+// SubMessage sub = 3; // `sub.subfield` becomes a parameter
+// }
+//
+//
+// This enables a HTTP JSON to RPC mapping as below:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))`
+//
+// Note that fields which are mapped to HTTP parameters must have a
+// primitive type or a repeated primitive type. Message types are not
+// allowed. In the case of a repeated type, the parameter can be
+// repeated in the URL, as in `...?param=A&param=B`.
+//
+// For HTTP method kinds which allow a request body, the `body` field
+// specifies the mapping. Consider a REST update method on the
+// message resource collection:
+//
+//
+// service Messaging {
+// rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// put: "/v1/messages/{message_id}"
+// body: "message"
+// };
+// }
+// }
+// message UpdateMessageRequest {
+// string message_id = 1; // mapped to the URL
+// Message message = 2; // mapped to the body
+// }
+//
+//
+// The following HTTP JSON to RPC mapping is enabled, where the
+// representation of the JSON in the request body is determined by
+// protos JSON encoding:
+//
+// HTTP | RPC
+// -----|-----
+// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
+//
+// The special name `*` can be used in the body mapping to define that
+// every field not bound by the path template should be mapped to the
+// request body. This enables the following alternative definition of
+// the update method:
+//
+// service Messaging {
+// rpc UpdateMessage(Message) returns (Message) {
+// option (google.api.http) = {
+// put: "/v1/messages/{message_id}"
+// body: "*"
+// };
+// }
+// }
+// message Message {
+// string message_id = 1;
+// string text = 2;
+// }
+//
+//
+// The following HTTP JSON to RPC mapping is enabled:
+//
+// HTTP | RPC
+// -----|-----
+// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")`
+//
+// Note that when using `*` in the body mapping, it is not possible to
+// have HTTP parameters, as all fields not bound by the path end in
+// the body. This makes this option more rarely used in practice of
+// defining REST APIs. The common usage of `*` is in custom methods
+// which don't use the URL at all for transferring data.
+//
+// It is possible to define multiple HTTP methods for one RPC by using
+// the `additional_bindings` option. Example:
+//
+// service Messaging {
+// rpc GetMessage(GetMessageRequest) returns (Message) {
+// option (google.api.http) = {
+// get: "/v1/messages/{message_id}"
+// additional_bindings {
+// get: "/v1/users/{user_id}/messages/{message_id}"
+// }
+// };
+// }
+// }
+// message GetMessageRequest {
+// string message_id = 1;
+// string user_id = 2;
+// }
+//
+//
+// This enables the following two alternative HTTP JSON to RPC
+// mappings:
+//
+// HTTP | RPC
+// -----|-----
+// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
+// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")`
+//
+// # Rules for HTTP mapping
+//
+// The rules for mapping HTTP path, query parameters, and body fields
+// to the request message are as follows:
+//
+// 1. The `body` field specifies either `*` or a field path, or is
+// omitted. If omitted, it assumes there is no HTTP body.
+// 2. Leaf fields (recursive expansion of nested messages in the
+// request) can be classified into three types:
+// (a) Matched in the URL template.
+// (b) Covered by body (if body is `*`, everything except (a) fields;
+// else everything under the body field)
+// (c) All other fields.
+// 3. URL query parameters found in the HTTP request are mapped to (c) fields.
+// 4. Any body sent with an HTTP request can contain only (b) fields.
+//
+// The syntax of the path template is as follows:
+//
+// Template = "/" Segments [ Verb ] ;
+// Segments = Segment { "/" Segment } ;
+// Segment = "*" | "**" | LITERAL | Variable ;
+// Variable = "{" FieldPath [ "=" Segments ] "}" ;
+// FieldPath = IDENT { "." IDENT } ;
+// Verb = ":" LITERAL ;
+//
+// The syntax `*` matches a single path segment. It follows the semantics of
+// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
+// Expansion.
+//
+// The syntax `**` matches zero or more path segments. It follows the semantics
+// of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.3 Reserved
+// Expansion. NOTE: it must be the last segment in the path except the Verb.
+//
+// The syntax `LITERAL` matches literal text in the URL path.
+//
+// The syntax `Variable` matches the entire path as specified by its template;
+// this nested template must not contain further variables. If a variable
+// matches a single path segment, its template may be omitted, e.g. `{var}`
+// is equivalent to `{var=*}`.
+//
+// NOTE: the field paths in variables and in the `body` must not refer to
+// repeated fields or map fields.
+//
+// Use CustomHttpPattern to specify any HTTP method that is not included in the
+// `pattern` field, such as HEAD, or "*" to leave the HTTP method unspecified for
+// a given URL path rule. The wild-card rule is useful for services that provide
+// content to Web (HTML) clients.
+message HttpRule {
+ // Selects methods to which this rule applies.
+ //
+ // Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
+ string selector = 1;
+
+ // Determines the URL pattern is matched by this rules. This pattern can be
+ // used with any of the {get|put|post|delete|patch} methods. A custom method
+ // can be defined using the 'custom' field.
+ oneof pattern {
+ // Used for listing and getting information about resources.
+ string get = 2;
+
+ // Used for updating a resource.
+ string put = 3;
+
+ // Used for creating a resource.
+ string post = 4;
+
+ // Used for deleting a resource.
+ string delete = 5;
+
+ // Used for updating a resource.
+ string patch = 6;
+
+ // Custom pattern is used for defining custom verbs.
+ CustomHttpPattern custom = 8;
+ }
+
+ // The name of the request field whose value is mapped to the HTTP body, or
+ // `*` for mapping all fields not captured by the path pattern to the HTTP
+ // body. NOTE: the referred field must not be a repeated field and must be
+ // present at the top-level of request message type.
+ string body = 7;
+
+ // Additional HTTP bindings for the selector. Nested bindings must
+ // not contain an `additional_bindings` field themselves (that is,
+ // the nesting may only be one level deep).
+ repeated HttpRule additional_bindings = 11;
+}
+
+// A custom pattern is used for defining custom HTTP verb.
+message CustomHttpPattern {
+ // The name of this custom HTTP verb.
+ string kind = 1;
+
+ // The path matched by this custom verb.
+ string path = 2;
+}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/common.proto b/Firestore/Protos/protos/google/firestore/v1beta1/common.proto
new file mode 100644
index 0000000..e624323
--- /dev/null
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/common.proto
@@ -0,0 +1,82 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "CommonProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// A set of field paths on a document.
+// Used to restrict a get or update operation on a document to a subset of its
+// fields.
+// This is different from standard field masks, as this is always scoped to a
+// [Document][google.firestore.v1beta1.Document], and takes in account the dynamic nature of [Value][google.firestore.v1beta1.Value].
+message DocumentMask {
+ // The list of field paths in the mask. See [Document.fields][google.firestore.v1beta1.Document.fields] for a field
+ // path syntax reference.
+ repeated string field_paths = 1;
+}
+
+// A precondition on a document, used for conditional operations.
+message Precondition {
+ // The type of precondition.
+ oneof condition_type {
+ // When set to `true`, the target document must exist.
+ // When set to `false`, the target document must not exist.
+ bool exists = 1;
+
+ // When set, the target document must exist and have been last updated at
+ // that time.
+ google.protobuf.Timestamp update_time = 2;
+ }
+}
+
+// Options for creating a new transaction.
+message TransactionOptions {
+ // Options for a transaction that can be used to read and write documents.
+ message ReadWrite {
+ // An optional transaction to retry.
+ bytes retry_transaction = 1;
+ }
+
+ // Options for a transaction that can only be used to read documents.
+ message ReadOnly {
+ // The consistency mode for this transaction. If not set, defaults to strong
+ // consistency.
+ oneof consistency_selector {
+ // Reads documents at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 2;
+ }
+ }
+
+ // The mode of the transaction.
+ oneof mode {
+ // The transaction can only be used for read operations.
+ ReadOnly read_only = 2;
+
+ // The transaction can be used for both read and write operations.
+ ReadWrite read_write = 3;
+ }
+}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/document.proto b/Firestore/Protos/protos/google/firestore/v1beta1/document.proto
new file mode 100644
index 0000000..cf6001d
--- /dev/null
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/document.proto
@@ -0,0 +1,148 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/type/latlng.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "DocumentProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// A Firestore document.
+//
+// Must not exceed 1 MiB - 4 bytes.
+message Document {
+ // The resource name of the document, for example
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The document's fields.
+ //
+ // The map keys represent field names.
+ //
+ // A simple field name contains only characters `a` to `z`, `A` to `Z`,
+ // `0` to `9`, or `_`, and must not start with `0` to `9` or `_`. For example,
+ // `foo_bar_17`.
+ //
+ // Field names matching the regular expression `__.*__` are reserved. Reserved
+ // field names are forbidden except in certain documented contexts. The map
+ // keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be
+ // empty.
+ //
+ // Field paths may be used in other contexts to refer to structured fields
+ // defined here. For `map_value`, the field path is represented by the simple
+ // or quoted field names of the containing fields, delimited by `.`. For
+ // example, the structured field
+ // `"foo" : { map_value: { "x&y" : { string_value: "hello" }}}` would be
+ // represented by the field path `foo.x&y`.
+ //
+ // Within a field path, a quoted field name starts and ends with `` ` `` and
+ // may contain any character. Some characters, including `` ` ``, must be
+ // escaped using a `\`. For example, `` `x&y` `` represents `x&y` and
+ // `` `bak\`tik` `` represents `` bak`tik ``.
+ map<string, Value> fields = 2;
+
+ // Output only. The time at which the document was created.
+ //
+ // This value increases monotonically when a document is deleted then
+ // recreated. It can also be compared to values from other documents and
+ // the `read_time` of a query.
+ google.protobuf.Timestamp create_time = 3;
+
+ // Output only. The time at which the document was last changed.
+ //
+ // This value is initally set to the `create_time` then increases
+ // monotonically with each change to the document. It can also be
+ // compared to values from other documents and the `read_time` of a query.
+ google.protobuf.Timestamp update_time = 4;
+}
+
+// A message that can hold any of the supported value types.
+message Value {
+ // Must have a value set.
+ oneof value_type {
+ // A null value.
+ google.protobuf.NullValue null_value = 11;
+
+ // A boolean value.
+ bool boolean_value = 1;
+
+ // An integer value.
+ int64 integer_value = 2;
+
+ // A double value.
+ double double_value = 3;
+
+ // A timestamp value.
+ //
+ // Precise only to microseconds. When stored, any additional precision is
+ // rounded down.
+ google.protobuf.Timestamp timestamp_value = 10;
+
+ // A string value.
+ //
+ // The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes of the UTF-8 representation are considered by
+ // queries.
+ string string_value = 17;
+
+ // A bytes value.
+ //
+ // Must not exceed 1 MiB - 89 bytes.
+ // Only the first 1,500 bytes are considered by queries.
+ bytes bytes_value = 18;
+
+ // A reference to a document. For example:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string reference_value = 5;
+
+ // A geo point value representing a point on the surface of Earth.
+ google.type.LatLng geo_point_value = 8;
+
+ // An array value.
+ //
+ // Cannot contain another array value.
+ ArrayValue array_value = 9;
+
+ // A map value.
+ MapValue map_value = 6;
+ }
+}
+
+// An array value.
+message ArrayValue {
+ // Values in the array.
+ repeated Value values = 1;
+}
+
+// A map value.
+message MapValue {
+ // The map's fields.
+ //
+ // The map keys represent field names. Field names matching the regular
+ // expression `__.*__` are reserved. Reserved field names are forbidden except
+ // in certain documented contexts. The map keys, represented as UTF-8, must
+ // not exceed 1,500 bytes and cannot be empty.
+ map<string, Value> fields = 1;
+}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto
new file mode 100644
index 0000000..3939caa
--- /dev/null
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.proto
@@ -0,0 +1,719 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/firestore/v1beta1/common.proto";
+import "google/firestore/v1beta1/document.proto";
+import "google/firestore/v1beta1/query.proto";
+import "google/firestore/v1beta1/write.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/timestamp.proto";
+import "google/rpc/status.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "FirestoreProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+
+// Specification of the Firestore API.
+
+
+
+// The Cloud Firestore service.
+//
+// This service exposes several types of comparable timestamps:
+//
+// * `create_time` - The time at which a document was created. Changes only
+// when a document is deleted, then re-created. Increases in a strict
+// monotonic fashion.
+// * `update_time` - The time at which a document was last updated. Changes
+// every time a document is modified. Does not change when a write results
+// in no modifications. Increases in a strict monotonic fashion.
+// * `read_time` - The time at which a particular state was observed. Used
+// to denote a consistent snapshot of the database or the time at which a
+// Document was observed to not exist.
+// * `commit_time` - The time at which the writes in a transaction were
+// committed. Any read with an equal or greater `read_time` is guaranteed
+// to see the effects of the transaction.
+service Firestore {
+ // Gets a single document.
+ rpc GetDocument(GetDocumentRequest) returns (Document) {
+ option (google.api.http) = { get: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" };
+ }
+
+ // Lists documents.
+ rpc ListDocuments(ListDocumentsRequest) returns (ListDocumentsResponse) {
+ option (google.api.http) = { get: "/v1beta1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}" };
+ }
+
+ // Creates a new document.
+ rpc CreateDocument(CreateDocumentRequest) returns (Document) {
+ option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents/**}/{collection_id}" body: "document" };
+ }
+
+ // Updates or inserts a document.
+ rpc UpdateDocument(UpdateDocumentRequest) returns (Document) {
+ option (google.api.http) = { patch: "/v1beta1/{document.name=projects/*/databases/*/documents/*/**}" body: "document" };
+ }
+
+ // Deletes a document.
+ rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = { delete: "/v1beta1/{name=projects/*/databases/*/documents/*/**}" };
+ }
+
+ // Gets multiple documents.
+ //
+ // Documents returned by this method are not guaranteed to be returned in the
+ // same order that they were requested.
+ rpc BatchGetDocuments(BatchGetDocumentsRequest) returns (stream BatchGetDocumentsResponse) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:batchGet" body: "*" };
+ }
+
+ // Starts a new transaction.
+ rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:beginTransaction" body: "*" };
+ }
+
+ // Commits a transaction, while optionally updating documents.
+ rpc Commit(CommitRequest) returns (CommitResponse) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:commit" body: "*" };
+ }
+
+ // Rolls back a transaction.
+ rpc Rollback(RollbackRequest) returns (google.protobuf.Empty) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:rollback" body: "*" };
+ }
+
+ // Runs a query.
+ rpc RunQuery(RunQueryRequest) returns (stream RunQueryResponse) {
+ option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:runQuery" body: "*" };
+ }
+
+ // Streams batches of document updates and deletes, in order.
+ rpc Write(stream WriteRequest) returns (stream WriteResponse) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:write" body: "*" };
+ }
+
+ // Listens to changes.
+ rpc Listen(stream ListenRequest) returns (stream ListenResponse) {
+ option (google.api.http) = { post: "/v1beta1/{database=projects/*/databases/*}/documents:listen" body: "*" };
+ }
+
+ // Lists all the collection IDs underneath a document.
+ rpc ListCollectionIds(ListCollectionIdsRequest) returns (ListCollectionIdsResponse) {
+ option (google.api.http) = { post: "/v1beta1/{parent=projects/*/databases/*/documents}:listCollectionIds" body: "*" };
+ }
+}
+
+// The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
+message GetDocumentRequest {
+ // The resource name of the Document to get. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 2;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads the document in a transaction.
+ bytes transaction = 3;
+
+ // Reads the version of the document at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 5;
+ }
+}
+
+// The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+message ListDocumentsRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`
+ // or `messages`.
+ string collection_id = 2;
+
+ // The maximum number of documents to return.
+ int32 page_size = 3;
+
+ // The `next_page_token` value returned from a previous List request, if any.
+ string page_token = 4;
+
+ // The order to sort results by. For example: `priority desc, name`.
+ string order_by = 6;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 7;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 8;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 10;
+ }
+
+ // If the list should show missing documents. A missing document is a
+ // document that does not exist but has sub-documents. These documents will
+ // be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
+ // or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
+ //
+ // Requests with `show_missing` may not specify `where` or
+ // `order_by`.
+ bool show_missing = 12;
+}
+
+// The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
+message ListDocumentsResponse {
+ // The Documents found.
+ repeated Document documents = 1;
+
+ // The next page token.
+ string next_page_token = 2;
+}
+
+// The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
+message CreateDocumentRequest {
+ // The parent resource. For example:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
+ string parent = 1;
+
+ // The collection ID, relative to `parent`, to list. For example: `chatrooms`.
+ string collection_id = 2;
+
+ // The client-assigned document ID to use for this document.
+ //
+ // Optional. If not specified, an ID will be assigned by the service.
+ string document_id = 3;
+
+ // The document to create. `name` must not be set.
+ Document document = 4;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 5;
+}
+
+// The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
+message UpdateDocumentRequest {
+ // The updated document.
+ // Creates the document if it does not already exist.
+ Document document = 1;
+
+ // The fields to update.
+ // None of the field paths in the mask may contain a reserved name.
+ //
+ // If the document exists on the server and has fields not referenced in the
+ // mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ DocumentMask update_mask = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If the document has a field that is not present in this mask, that field
+ // will not be returned in the response.
+ DocumentMask mask = 3;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
+message DeleteDocumentRequest {
+ // The resource name of the Document to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string name = 1;
+
+ // An optional precondition on the document.
+ // The request will fail if this is set and not met by the target document.
+ Precondition current_document = 2;
+}
+
+// The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of the
+ // given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+
+ // The fields to return. If not set, returns all fields.
+ //
+ // If a document has a field that is not present in this mask, that field will
+ // not be returned in the response.
+ DocumentMask mask = 3;
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 4;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 5;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
+message BatchGetDocumentsResponse {
+ // A single result.
+ // This can be empty if the server is just returning a transaction.
+ oneof result {
+ // A document that was requested.
+ Document found = 1;
+
+ // A document name that was requested but does not exist. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string missing = 2;
+ }
+
+ // The transaction that was started as part of this request.
+ // Will only be set in the first response, and only if
+ // [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
+ bytes transaction = 3;
+
+ // The time at which the document was read.
+ // This may be monotically increasing, in this case the previous documents in
+ // the result stream are guaranteed not to have changed between their
+ // read_time and this one.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+message BeginTransactionRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The options for the transaction.
+ // Defaults to a read-write transaction.
+ TransactionOptions options = 2;
+}
+
+// The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
+message BeginTransactionResponse {
+ // The transaction that was started.
+ bytes transaction = 1;
+}
+
+// The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+message CommitRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ repeated Write writes = 2;
+
+ // If non-empty, applies all writes in this transaction, and commits it.
+ // Otherwise, applies the writes as if they were in their own transaction.
+ bytes transaction = 3;
+}
+
+// The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
+message CommitResponse {
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 1;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 2;
+}
+
+// The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
+message RollbackRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The transaction to roll back.
+ bytes transaction = 2;
+}
+
+// The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+message RunQueryRequest {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+
+ // The consistency mode for this transaction.
+ // If not set, defaults to strong consistency.
+ oneof consistency_selector {
+ // Reads documents in a transaction.
+ bytes transaction = 5;
+
+ // Starts a new transaction and reads the documents.
+ // Defaults to a read-only transaction.
+ // The new transaction ID will be returned as the first response in the
+ // stream.
+ TransactionOptions new_transaction = 6;
+
+ // Reads documents as they were at the given time.
+ // This may not be older than 60 seconds.
+ google.protobuf.Timestamp read_time = 7;
+ }
+}
+
+// The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
+message RunQueryResponse {
+ // The transaction that was started as part of this request.
+ // Can only be set in the first response, and only if
+ // [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
+ // If set, no other fields will be set in this response.
+ bytes transaction = 2;
+
+ // A query result.
+ // Not set when reporting partial progress.
+ Document document = 1;
+
+ // The time at which the document was read. This may be monotonically
+ // increasing; in this case, the previous documents in the result stream are
+ // guaranteed not to have changed between their `read_time` and this one.
+ //
+ // If the query returns no results, a response with `read_time` and no
+ // `document` will be sent, and this represents the time at which the query
+ // was run.
+ google.protobuf.Timestamp read_time = 3;
+
+ // The number of results that have been skipped due to an offset between
+ // the last response and the current response.
+ int32 skipped_results = 4;
+}
+
+// The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+//
+// The first request creates a stream, or resumes an existing one from a token.
+//
+// When creating a new stream, the server replies with a response containing
+// only an ID and a token, to use in the next request.
+//
+// When resuming a stream, the server first streams any responses later than the
+// given token, then a response containing only an up-to-date token, to use in
+// the next request.
+message WriteRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ // This is only required in the first message.
+ string database = 1;
+
+ // The ID of the write stream to resume.
+ // This may only be set in the first message. When left empty, a new write
+ // stream will be created.
+ string stream_id = 2;
+
+ // The writes to apply.
+ //
+ // Always executed atomically and in order.
+ // This must be empty on the first request.
+ // This may be empty on the last request.
+ // This must not be empty on all other requests.
+ repeated Write writes = 3;
+
+ // A stream token that was previously sent by the server.
+ //
+ // The client should set this field to the token from the most recent
+ // [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
+ // received responses up to this token. After sending this token, earlier
+ // tokens may not be used anymore.
+ //
+ // The server may close the stream if there are too many unacknowledged
+ // responses.
+ //
+ // Leave this field unset when creating a new stream. To resume a stream at
+ // a specific point, set this field and the `stream_id` field.
+ //
+ // Leave this field unset when creating a new stream.
+ bytes stream_token = 4;
+
+ // Labels associated with this write request.
+ map<string, string> labels = 5;
+}
+
+// The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
+message WriteResponse {
+ // The ID of the stream.
+ // Only set on the first message, when a new stream was created.
+ string stream_id = 1;
+
+ // A token that represents the position of this response in the stream.
+ // This can be used by a client to resume the stream at this point.
+ //
+ // This field is always set.
+ bytes stream_token = 2;
+
+ // The result of applying the writes.
+ //
+ // This i-th write result corresponds to the i-th write in the
+ // request.
+ repeated WriteResult write_results = 3;
+
+ // The time at which the commit occurred.
+ google.protobuf.Timestamp commit_time = 4;
+}
+
+// A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]
+message ListenRequest {
+ // The database name. In the format:
+ // `projects/{project_id}/databases/{database_id}`.
+ string database = 1;
+
+ // The supported target changes.
+ oneof target_change {
+ // A target to add to this stream.
+ Target add_target = 2;
+
+ // The ID of a target to remove from this stream.
+ int32 remove_target = 3;
+ }
+
+ // Labels associated with this target change.
+ map<string, string> labels = 4;
+}
+
+// The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
+message ListenResponse {
+ // The supported responses.
+ oneof response_type {
+ // Targets have changed.
+ TargetChange target_change = 2;
+
+ // A [Document][google.firestore.v1beta1.Document] has changed.
+ DocumentChange document_change = 3;
+
+ // A [Document][google.firestore.v1beta1.Document] has been deleted.
+ DocumentDelete document_delete = 4;
+
+ // A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
+ // relevant to that target).
+ DocumentRemove document_remove = 6;
+
+ // A filter to apply to the set of documents previously returned for the
+ // given target.
+ //
+ // Returned when documents may have been removed from the given target, but
+ // the exact documents are unknown.
+ ExistenceFilter filter = 5;
+ }
+}
+
+// A specification of a set of documents to listen to.
+message Target {
+ // A target specified by a set of documents names.
+ message DocumentsTarget {
+ // The names of the documents to retrieve. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // The request will fail if any of the document is not a child resource of
+ // the given `database`. Duplicate names will be elided.
+ repeated string documents = 2;
+ }
+
+ // A target specified by a query.
+ message QueryTarget {
+ // The parent resource name. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents` or
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents` or
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The query to run.
+ oneof query_type {
+ // A structured query.
+ StructuredQuery structured_query = 2;
+ }
+ }
+
+ // The type of target to listen to.
+ oneof target_type {
+ // A target specified by a query.
+ QueryTarget query = 2;
+
+ // A target specified by a set of document names.
+ DocumentsTarget documents = 3;
+ }
+
+ // When to start listening.
+ //
+ // If not specified, all matching Documents are returned before any
+ // subsequent changes.
+ oneof resume_type {
+ // A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
+ //
+ // Using a resume token with a different target is unsupported and may fail.
+ bytes resume_token = 4;
+
+ // Start listening after a specific `read_time`.
+ //
+ // The client must know the state of matching documents at this time.
+ google.protobuf.Timestamp read_time = 11;
+ }
+
+ // A client provided target ID.
+ //
+ // If not set, the server will assign an ID for the target.
+ //
+ // Used for resuming a target without changing IDs. The IDs can either be
+ // client-assigned or be server-assigned in a previous stream. All targets
+ // with client provided IDs must be added before adding a target that needs
+ // a server-assigned id.
+ int32 target_id = 5;
+
+ // If the target should be removed once it is current and consistent.
+ bool once = 6;
+}
+
+// Targets being watched have changed.
+message TargetChange {
+ // The type of change.
+ enum TargetChangeType {
+ // No change has occurred. Used only to send an updated `resume_token`.
+ NO_CHANGE = 0;
+
+ // The targets have been added.
+ ADD = 1;
+
+ // The targets have been removed.
+ REMOVE = 2;
+
+ // The targets reflect all changes committed before the targets were added
+ // to the stream.
+ //
+ // This will be sent after or with a `read_time` that is greater than or
+ // equal to the time at which the targets were added.
+ //
+ // Listeners can wait for this change if read-after-write semantics
+ // are desired.
+ CURRENT = 3;
+
+ // The targets have been reset, and a new initial state for the targets
+ // will be returned in subsequent changes.
+ //
+ // After the initial state is complete, `CURRENT` will be returned even
+ // if the target was previously indicated to be `CURRENT`.
+ RESET = 4;
+ }
+
+ // The type of change that occurred.
+ TargetChangeType target_change_type = 1;
+
+ // The target IDs of targets that have changed.
+ //
+ // If empty, the change applies to all targets.
+ //
+ // For `target_change_type=ADD`, the order of the target IDs matches the order
+ // of the requests to add the targets. This allows clients to unambiguously
+ // associate server-assigned target IDs with added targets.
+ //
+ // For other states, the order of the target IDs is not defined.
+ repeated int32 target_ids = 2;
+
+ // The error that resulted in this change, if applicable.
+ google.rpc.Status cause = 3;
+
+ // A token that can be used to resume the stream for the given `target_ids`,
+ // or all targets if `target_ids` is empty.
+ //
+ // Not set on every target change.
+ bytes resume_token = 4;
+
+ // The consistent `read_time` for the given `target_ids` (omitted when the
+ // target_ids are not at a consistent snapshot).
+ //
+ // The stream is guaranteed to send a `read_time` with `target_ids` empty
+ // whenever the entire stream reaches a new consistent snapshot. ADD,
+ // CURRENT, and RESET messages are guaranteed to (eventually) result in a
+ // new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
+ //
+ // For a given stream, `read_time` is guaranteed to be monotonically
+ // increasing.
+ google.protobuf.Timestamp read_time = 6;
+}
+
+// The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+message ListCollectionIdsRequest {
+ // The parent document. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ // For example:
+ // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
+ string parent = 1;
+
+ // The maximum number of results to return.
+ int32 page_size = 2;
+
+ // A page token. Must be a value from
+ // [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse].
+ string page_token = 3;
+}
+
+// The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
+message ListCollectionIdsResponse {
+ // The collection ids.
+ repeated string collection_ids = 1;
+
+ // A page token that may be used to continue the list.
+ string next_page_token = 2;
+}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/query.proto b/Firestore/Protos/protos/google/firestore/v1beta1/query.proto
new file mode 100644
index 0000000..d19b022
--- /dev/null
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/query.proto
@@ -0,0 +1,231 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/firestore/v1beta1/document.proto";
+import "google/protobuf/wrappers.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "QueryProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// A Firestore query.
+message StructuredQuery {
+ // A selection of a collection, such as `messages as m1`.
+ message CollectionSelector {
+ // The collection ID.
+ // When set, selects only collections with this ID.
+ string collection_id = 2;
+
+ // When false, selects only collections that are immediate children of
+ // the `parent` specified in the containing `RunQueryRequest`.
+ // When true, selects all descendant collections.
+ bool all_descendants = 3;
+ }
+
+ // A filter.
+ message Filter {
+ // The type of filter.
+ oneof filter_type {
+ // A composite filter.
+ CompositeFilter composite_filter = 1;
+
+ // A filter on a document field.
+ FieldFilter field_filter = 2;
+
+ // A filter that takes exactly one argument.
+ UnaryFilter unary_filter = 3;
+ }
+ }
+
+ // A filter that merges multiple other filters using the given operator.
+ message CompositeFilter {
+ // A composite filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // The results are required to satisfy each of the combined filters.
+ AND = 1;
+ }
+
+ // The operator for combining multiple filters.
+ Operator op = 1;
+
+ // The list of filters to combine.
+ // Must contain at least one filter.
+ repeated Filter filters = 2;
+ }
+
+ // A filter on a specific field.
+ message FieldFilter {
+ // A field filter operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Less than. Requires that the field come first in `order_by`.
+ LESS_THAN = 1;
+
+ // Less than or equal. Requires that the field come first in `order_by`.
+ LESS_THAN_OR_EQUAL = 2;
+
+ // Greater than. Requires that the field come first in `order_by`.
+ GREATER_THAN = 3;
+
+ // Greater than or equal. Requires that the field come first in
+ // `order_by`.
+ GREATER_THAN_OR_EQUAL = 4;
+
+ // Equal.
+ EQUAL = 5;
+ }
+
+ // The field to filter by.
+ FieldReference field = 1;
+
+ // The operator to filter by.
+ Operator op = 2;
+
+ // The value to compare to.
+ Value value = 3;
+ }
+
+ // A filter with a single operand.
+ message UnaryFilter {
+ // A unary operator.
+ enum Operator {
+ // Unspecified. This value must not be used.
+ OPERATOR_UNSPECIFIED = 0;
+
+ // Test if a field is equal to NaN.
+ IS_NAN = 2;
+
+ // Test if an exprestion evaluates to Null.
+ IS_NULL = 3;
+ }
+
+ // The unary operator to apply.
+ Operator op = 1;
+
+ // The argument to the filter.
+ oneof operand_type {
+ // The field to which to apply the operator.
+ FieldReference field = 2;
+ }
+ }
+
+ // An order on a field.
+ message Order {
+ // The field to order by.
+ FieldReference field = 1;
+
+ // The direction to order by. Defaults to `ASCENDING`.
+ Direction direction = 2;
+ }
+
+ // A reference to a field, such as `max(messages.time) as max_time`.
+ message FieldReference {
+ string field_path = 2;
+ }
+
+ // The projection of document's fields to return.
+ message Projection {
+ // The fields to return.
+ //
+ // If empty, all fields are returned. To only return the name
+ // of the document, use `['__name__']`.
+ repeated FieldReference fields = 2;
+ }
+
+ // A sort direction.
+ enum Direction {
+ // Unspecified.
+ DIRECTION_UNSPECIFIED = 0;
+
+ // Ascending.
+ ASCENDING = 1;
+
+ // Descending.
+ DESCENDING = 2;
+ }
+
+ // The projection to return.
+ Projection select = 1;
+
+ // The collections to query.
+ repeated CollectionSelector from = 2;
+
+ // The filter to apply.
+ Filter where = 3;
+
+ // The order to apply to the query results.
+ //
+ // Firestore guarantees a stable ordering through the following rules:
+ //
+ // * Any field required to appear in `order_by`, that is not already
+ // specified in `order_by`, is appended to the order in field name order
+ // by default.
+ // * If an order on `__name__` is not specified, it is appended by default.
+ //
+ // Fields are appended with the same sort direction as the last order
+ // specified, or 'ASCENDING' if no order was specified. For example:
+ //
+ // * `SELECT * FROM Foo ORDER BY A` becomes
+ // `SELECT * FROM Foo ORDER BY A, __name__`
+ // * `SELECT * FROM Foo ORDER BY A DESC` becomes
+ // `SELECT * FROM Foo ORDER BY A DESC, __name__ DESC`
+ // * `SELECT * FROM Foo WHERE A > 1` becomes
+ // `SELECT * FROM Foo WHERE A > 1 ORDER BY A, __name__`
+ repeated Order order_by = 4;
+
+ // A starting point for the query results.
+ Cursor start_at = 7;
+
+ // A end point for the query results.
+ Cursor end_at = 8;
+
+ // The number of results to skip.
+ //
+ // Applies before limit, but after all other constraints. Must be >= 0 if
+ // specified.
+ int32 offset = 6;
+
+ // The maximum number of results to return.
+ //
+ // Applies after all other constraints.
+ // Must be >= 0 if specified.
+ google.protobuf.Int32Value limit = 5;
+}
+
+// A position in a query result set.
+message Cursor {
+ // The values that represent a position, in the order they appear in
+ // the order by clause of a query.
+ //
+ // Can contain fewer values than specified in the order by clause.
+ repeated Value values = 1;
+
+ // If the position is just before or just after the given values, relative
+ // to the sort order defined by the query.
+ bool before = 2;
+}
diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/write.proto b/Firestore/Protos/protos/google/firestore/v1beta1/write.proto
new file mode 100644
index 0000000..b6e9d5f
--- /dev/null
+++ b/Firestore/Protos/protos/google/firestore/v1beta1/write.proto
@@ -0,0 +1,189 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.firestore.v1beta1;
+
+import "google/api/annotations.proto";
+import "google/firestore/v1beta1/common.proto";
+import "google/firestore/v1beta1/document.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Firestore.V1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/firestore/v1beta1;firestore";
+option java_multiple_files = true;
+option java_outer_classname = "WriteProto";
+option java_package = "com.google.firestore.v1beta1";
+option objc_class_prefix = "GCFS";
+
+
+// A write on a document.
+message Write {
+ // The operation to execute.
+ oneof operation {
+ // A document to write.
+ Document update = 1;
+
+ // A document name to delete. In the format:
+ // `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
+ string delete = 2;
+
+ // The name of a document on which to verify the `current_document`
+ // precondition.
+ // This only requires read access to the document.
+ string verify = 5;
+
+ // Applies a tranformation to a document.
+ // At most one `transform` per document is allowed in a given request.
+ // An `update` cannot follow a `transform` on the same document in a given
+ // request.
+ DocumentTransform transform = 6;
+ }
+
+ // The fields to update in this write.
+ //
+ // This field can be set only when the operation is `update`.
+ // None of the field paths in the mask may contain a reserved name.
+ // If the document exists on the server and has fields not referenced in the
+ // mask, they are left unchanged.
+ // Fields referenced in the mask, but not present in the input document, are
+ // deleted from the document on the server.
+ // The field paths in this mask must not contain a reserved field name.
+ DocumentMask update_mask = 3;
+
+ // An optional precondition on the document.
+ //
+ // The write will fail if this is set and not met by the target document.
+ Precondition current_document = 4;
+}
+
+// A transformation of a document.
+message DocumentTransform {
+ // A transformation of a field of the document.
+ message FieldTransform {
+ // A value that is calculated by the server.
+ enum ServerValue {
+ // Unspecified. This value must not be used.
+ SERVER_VALUE_UNSPECIFIED = 0;
+
+ // The time at which the server processed the request.
+ REQUEST_TIME = 1;
+ }
+
+ // The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
+ // reference.
+ string field_path = 1;
+
+ // The transformation to apply on the field.
+ oneof transform_type {
+ // Sets the field to the given server value.
+ ServerValue set_to_server_value = 2;
+ }
+ }
+
+ // The name of the document to transform.
+ string document = 1;
+
+ // The list of transformations to apply to the fields of the document, in
+ // order.
+ repeated FieldTransform field_transforms = 2;
+}
+
+// The result of applying a write.
+message WriteResult {
+ // The last update time of the document after applying the write. Not set
+ // after a `delete`.
+ //
+ // If the write did not actually change the document, this will be the
+ // previous update_time.
+ google.protobuf.Timestamp update_time = 1;
+
+ // The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
+ // same order.
+ repeated Value transform_results = 2;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has changed.
+//
+// May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
+// ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
+//
+// Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
+// change, if multiple targets are affected.
+message DocumentChange {
+ // The new state of the [Document][google.firestore.v1beta1.Document].
+ //
+ // If `mask` is set, contains only fields that were updated or added.
+ Document document = 1;
+
+ // A set of target IDs of targets that match this document.
+ repeated int32 target_ids = 5;
+
+ // A set of target IDs for targets that no longer match this document.
+ repeated int32 removed_target_ids = 6;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has been deleted.
+//
+// May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
+// last of which deleted the [Document][google.firestore.v1beta1.Document].
+//
+// Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
+// delete, if multiple targets are affected.
+message DocumentDelete {
+ // The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this entity.
+ repeated int32 removed_target_ids = 6;
+
+ // The read timestamp at which the delete was observed.
+ //
+ // Greater or equal to the `commit_time` of the delete.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
+//
+// Sent if the document is no longer relevant to a target and is out of view.
+// Can be sent instead of a DocumentDelete or a DocumentChange if the server
+// can not send the new value of the document.
+//
+// Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
+// write or delete, if multiple targets are affected.
+message DocumentRemove {
+ // The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view.
+ string document = 1;
+
+ // A set of target IDs for targets that previously matched this document.
+ repeated int32 removed_target_ids = 2;
+
+ // The read timestamp at which the remove was observed.
+ //
+ // Greater or equal to the `commit_time` of the change/delete/remove.
+ google.protobuf.Timestamp read_time = 4;
+}
+
+// A digest of all the documents that match a given target.
+message ExistenceFilter {
+ // The target ID to which this filter applies.
+ int32 target_id = 1;
+
+ // The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
+ //
+ // If different from the count of documents in the client that match, the
+ // client must manually determine which documents no longer match the target.
+ int32 count = 2;
+}
diff --git a/Firestore/Protos/protos/google/rpc/status.proto b/Firestore/Protos/protos/google/rpc/status.proto
new file mode 100644
index 0000000..0839ee9
--- /dev/null
+++ b/Firestore/Protos/protos/google/rpc/status.proto
@@ -0,0 +1,92 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.rpc;
+
+import "google/protobuf/any.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
+option java_multiple_files = true;
+option java_outer_classname = "StatusProto";
+option java_package = "com.google.rpc";
+option objc_class_prefix = "RPC";
+
+
+// The `Status` type defines a logical error model that is suitable for different
+// programming environments, including REST APIs and RPC APIs. It is used by
+// [gRPC](https://github.com/grpc). The error model is designed to be:
+//
+// - Simple to use and understand for most users
+// - Flexible enough to meet unexpected needs
+//
+// # Overview
+//
+// The `Status` message contains three pieces of data: error code, error message,
+// and error details. The error code should be an enum value of
+// [google.rpc.Code][google.rpc.Code], but it may accept additional error codes if needed. The
+// error message should be a developer-facing English message that helps
+// developers *understand* and *resolve* the error. If a localized user-facing
+// error message is needed, put the localized message in the error details or
+// localize it in the client. The optional error details may contain arbitrary
+// information about the error. There is a predefined set of error detail types
+// in the package `google.rpc` that can be used for common error conditions.
+//
+// # Language mapping
+//
+// The `Status` message is the logical representation of the error model, but it
+// is not necessarily the actual wire format. When the `Status` message is
+// exposed in different client libraries and different wire protocols, it can be
+// mapped differently. For example, it will likely be mapped to some exceptions
+// in Java, but more likely mapped to some error codes in C.
+//
+// # Other uses
+//
+// The error model and the `Status` message can be used in a variety of
+// environments, either with or without APIs, to provide a
+// consistent developer experience across different environments.
+//
+// Example uses of this error model include:
+//
+// - Partial errors. If a service needs to return partial errors to the client,
+// it may embed the `Status` in the normal response to indicate the partial
+// errors.
+//
+// - Workflow errors. A typical workflow has multiple steps. Each step may
+// have a `Status` message for error reporting.
+//
+// - Batch operations. If a client uses batch request and batch response, the
+// `Status` message should be used directly inside batch response, one for
+// each error sub-response.
+//
+// - Asynchronous operations. If an API call embeds asynchronous operation
+// results in its response, the status of those operations should be
+// represented directly using the `Status` message.
+//
+// - Logging. If some API errors are stored in logs, the message `Status` could
+// be used directly after any stripping needed for security/privacy reasons.
+message Status {
+ // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
+ int32 code = 1;
+
+ // A developer-facing error message, which should be in English. Any
+ // user-facing error message should be localized and sent in the
+ // [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
+ string message = 2;
+
+ // A list of messages that carry the error details. There is a common set of
+ // message types for APIs to use.
+ repeated google.protobuf.Any details = 3;
+}
diff --git a/Firestore/Protos/protos/google/type/latlng.proto b/Firestore/Protos/protos/google/type/latlng.proto
new file mode 100644
index 0000000..4e8c65d
--- /dev/null
+++ b/Firestore/Protos/protos/google/type/latlng.proto
@@ -0,0 +1,71 @@
+// Copyright 2016 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.type;
+
+option go_package = "google.golang.org/genproto/googleapis/type/latlng;latlng";
+option java_multiple_files = true;
+option java_outer_classname = "LatLngProto";
+option java_package = "com.google.type";
+option objc_class_prefix = "GTP";
+
+
+// An object representing a latitude/longitude pair. This is expressed as a pair
+// of doubles representing degrees latitude and degrees longitude. Unless
+// specified otherwise, this must conform to the
+// <a href="http://www.unoosa.org/pdf/icg/2012/template/WGS_84.pdf">WGS84
+// standard</a>. Values must be within normalized ranges.
+//
+// Example of normalization code in Python:
+//
+// def NormalizeLongitude(longitude):
+// """Wraps decimal degrees longitude to [-180.0, 180.0]."""
+// q, r = divmod(longitude, 360.0)
+// if r > 180.0 or (r == 180.0 and q <= -1.0):
+// return r - 360.0
+// return r
+//
+// def NormalizeLatLng(latitude, longitude):
+// """Wraps decimal degrees latitude and longitude to
+// [-90.0, 90.0] and [-180.0, 180.0], respectively."""
+// r = latitude % 360.0
+// if r <= 90.0:
+// return r, NormalizeLongitude(longitude)
+// elif r >= 270.0:
+// return r - 360, NormalizeLongitude(longitude)
+// else:
+// return 180 - r, NormalizeLongitude(longitude + 180.0)
+//
+// assert 180.0 == NormalizeLongitude(180.0)
+// assert -180.0 == NormalizeLongitude(-180.0)
+// assert -179.0 == NormalizeLongitude(181.0)
+// assert (0.0, 0.0) == NormalizeLatLng(360.0, 0.0)
+// assert (0.0, 0.0) == NormalizeLatLng(-360.0, 0.0)
+// assert (85.0, 180.0) == NormalizeLatLng(95.0, 0.0)
+// assert (-85.0, -170.0) == NormalizeLatLng(-95.0, 10.0)
+// assert (90.0, 10.0) == NormalizeLatLng(90.0, 10.0)
+// assert (-90.0, -10.0) == NormalizeLatLng(-90.0, -10.0)
+// assert (0.0, -170.0) == NormalizeLatLng(-180.0, 10.0)
+// assert (0.0, -170.0) == NormalizeLatLng(180.0, 10.0)
+// assert (-90.0, 10.0) == NormalizeLatLng(270.0, 10.0)
+// assert (90.0, 10.0) == NormalizeLatLng(-270.0, 10.0)
+message LatLng {
+ // The latitude in degrees. It must be in the range [-90.0, +90.0].
+ double latitude = 1;
+
+ // The longitude in degrees. It must be in the range [-180.0, +180.0].
+ double longitude = 2;
+}
diff --git a/Firestore/Protos/strip-registry.py b/Firestore/Protos/strip-registry.py
new file mode 100755
index 0000000..cd48784
--- /dev/null
+++ b/Firestore/Protos/strip-registry.py
@@ -0,0 +1,36 @@
+#!/usr/bin/python
+
+# Copyright 2017 Google
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""strip-registry.py removes extensionRegistry functions from objc protos.
+"""
+
+import sys
+
+filename = sys.argv[1]
+
+with open(filename) as input:
+ content = [x.strip('\n') for x in input.readlines()]
+
+if '+ (GPBExtensionRegistry*)extensionRegistry {' in content:
+ new_content = []
+ skip = False
+ for line in content:
+ if '+ (GPBExtensionRegistry*)extensionRegistry {' in line:
+ skip = True
+ if not skip:
+ new_content.append(line)
+ elif line == '}':
+ skip = False
+
+ with open(filename, "w") as output:
+ output.write('\n'.join(new_content) + '\n')