diff --git a/dev/protos/firestore_v1_proto_api.d.ts b/dev/protos/firestore_v1_proto_api.d.ts index 56b3627cc..cd6285e91 100644 --- a/dev/protos/firestore_v1_proto_api.d.ts +++ b/dev/protos/firestore_v1_proto_api.d.ts @@ -5727,6 +5727,9 @@ export namespace google { /** Write delete */ "delete"?: (string|null); + /** Write verify */ + verify?: (string|null); + /** Write transform */ transform?: (google.firestore.v1.IDocumentTransform|null); @@ -5755,6 +5758,9 @@ export namespace google { /** Write delete. */ public delete?: (string|null); + /** Write verify. */ + public verify?: (string|null); + /** Write transform. */ public transform?: (google.firestore.v1.IDocumentTransform|null); @@ -5768,7 +5774,7 @@ export namespace google { public currentDocument?: (google.firestore.v1.IPrecondition|null); /** Write operation. */ - public operation?: ("update"|"delete"|"transform"); + public operation?: ("update"|"delete"|"verify"|"transform"); /** * Creates a Write message from a plain object. Also converts values to their respective internal types. diff --git a/dev/protos/firestore_v1_proto_api.js b/dev/protos/firestore_v1_proto_api.js index 9eb210403..59278994b 100644 --- a/dev/protos/firestore_v1_proto_api.js +++ b/dev/protos/firestore_v1_proto_api.js @@ -28,21 +28,21 @@ // Common aliases var $util = $protobuf.util; - + // Exported root namespace var $root = $protobuf.roots.firestore_v1 || ($protobuf.roots.firestore_v1 = {}); - + $root.firestore = (function() { - + /** * Namespace firestore. * @exports firestore * @namespace */ var firestore = {}; - + firestore.BundledQuery = (function() { - + /** * Properties of a BundledQuery. * @memberof firestore @@ -51,7 +51,7 @@ * @property {google.firestore.v1.IStructuredQuery|null} [structuredQuery] BundledQuery structuredQuery * @property {firestore.BundledQuery.LimitType|null} [limitType] BundledQuery limitType */ - + /** * Constructs a new BundledQuery. * @memberof firestore @@ -66,7 +66,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BundledQuery parent. * @member {string} parent @@ -74,7 +74,7 @@ * @instance */ BundledQuery.prototype.parent = ""; - + /** * BundledQuery structuredQuery. * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery @@ -82,7 +82,7 @@ * @instance */ BundledQuery.prototype.structuredQuery = null; - + /** * BundledQuery limitType. * @member {firestore.BundledQuery.LimitType} limitType @@ -90,10 +90,10 @@ * @instance */ BundledQuery.prototype.limitType = 0; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * BundledQuery queryType. * @member {"structuredQuery"|undefined} queryType @@ -104,7 +104,7 @@ get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a BundledQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -136,7 +136,7 @@ } return message; }; - + /** * Creates a plain object from a BundledQuery message. Also converts values to other types if specified. * @function toObject @@ -165,7 +165,7 @@ object.limitType = options.enums === String ? $root.firestore.BundledQuery.LimitType[message.limitType] : message.limitType; return object; }; - + /** * Converts this BundledQuery to JSON. * @function toJSON @@ -176,7 +176,7 @@ BundledQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * LimitType enum. * @name firestore.BundledQuery.LimitType @@ -190,12 +190,12 @@ values[valuesById[1] = "LAST"] = "LAST"; return values; })(); - + return BundledQuery; })(); - + firestore.NamedQuery = (function() { - + /** * Properties of a NamedQuery. * @memberof firestore @@ -204,7 +204,7 @@ * @property {firestore.IBundledQuery|null} [bundledQuery] NamedQuery bundledQuery * @property {google.protobuf.ITimestamp|null} [readTime] NamedQuery readTime */ - + /** * Constructs a new NamedQuery. * @memberof firestore @@ -219,7 +219,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * NamedQuery name. * @member {string} name @@ -227,7 +227,7 @@ * @instance */ NamedQuery.prototype.name = ""; - + /** * NamedQuery bundledQuery. * @member {firestore.IBundledQuery|null|undefined} bundledQuery @@ -235,7 +235,7 @@ * @instance */ NamedQuery.prototype.bundledQuery = null; - + /** * NamedQuery readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -243,7 +243,7 @@ * @instance */ NamedQuery.prototype.readTime = null; - + /** * Creates a NamedQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -270,7 +270,7 @@ } return message; }; - + /** * Creates a plain object from a NamedQuery message. Also converts values to other types if specified. * @function toObject @@ -297,7 +297,7 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; - + /** * Converts this NamedQuery to JSON. * @function toJSON @@ -308,12 +308,12 @@ NamedQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return NamedQuery; })(); - + firestore.BundledDocumentMetadata = (function() { - + /** * Properties of a BundledDocumentMetadata. * @memberof firestore @@ -323,7 +323,7 @@ * @property {boolean|null} [exists] BundledDocumentMetadata exists * @property {Array.|null} [queries] BundledDocumentMetadata queries */ - + /** * Constructs a new BundledDocumentMetadata. * @memberof firestore @@ -339,7 +339,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BundledDocumentMetadata name. * @member {string} name @@ -347,7 +347,7 @@ * @instance */ BundledDocumentMetadata.prototype.name = ""; - + /** * BundledDocumentMetadata readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -355,7 +355,7 @@ * @instance */ BundledDocumentMetadata.prototype.readTime = null; - + /** * BundledDocumentMetadata exists. * @member {boolean} exists @@ -363,7 +363,7 @@ * @instance */ BundledDocumentMetadata.prototype.exists = false; - + /** * BundledDocumentMetadata queries. * @member {Array.} queries @@ -371,7 +371,7 @@ * @instance */ BundledDocumentMetadata.prototype.queries = $util.emptyArray; - + /** * Creates a BundledDocumentMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -402,7 +402,7 @@ } return message; }; - + /** * Creates a plain object from a BundledDocumentMetadata message. Also converts values to other types if specified. * @function toObject @@ -436,7 +436,7 @@ } return object; }; - + /** * Converts this BundledDocumentMetadata to JSON. * @function toJSON @@ -447,12 +447,12 @@ BundledDocumentMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BundledDocumentMetadata; })(); - + firestore.BundleMetadata = (function() { - + /** * Properties of a BundleMetadata. * @memberof firestore @@ -463,7 +463,7 @@ * @property {number|null} [totalDocuments] BundleMetadata totalDocuments * @property {number|string|null} [totalBytes] BundleMetadata totalBytes */ - + /** * Constructs a new BundleMetadata. * @memberof firestore @@ -478,7 +478,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BundleMetadata id. * @member {string} id @@ -486,7 +486,7 @@ * @instance */ BundleMetadata.prototype.id = ""; - + /** * BundleMetadata createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime @@ -494,7 +494,7 @@ * @instance */ BundleMetadata.prototype.createTime = null; - + /** * BundleMetadata version. * @member {number} version @@ -502,7 +502,7 @@ * @instance */ BundleMetadata.prototype.version = 0; - + /** * BundleMetadata totalDocuments. * @member {number} totalDocuments @@ -510,7 +510,7 @@ * @instance */ BundleMetadata.prototype.totalDocuments = 0; - + /** * BundleMetadata totalBytes. * @member {number|string} totalBytes @@ -518,7 +518,7 @@ * @instance */ BundleMetadata.prototype.totalBytes = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - + /** * Creates a BundleMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -553,7 +553,7 @@ message.totalBytes = new $util.LongBits(object.totalBytes.low >>> 0, object.totalBytes.high >>> 0).toNumber(true); return message; }; - + /** * Creates a plain object from a BundleMetadata message. Also converts values to other types if specified. * @function toObject @@ -593,7 +593,7 @@ object.totalBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalBytes) : options.longs === Number ? new $util.LongBits(message.totalBytes.low >>> 0, message.totalBytes.high >>> 0).toNumber(true) : message.totalBytes; return object; }; - + /** * Converts this BundleMetadata to JSON. * @function toJSON @@ -604,12 +604,12 @@ BundleMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BundleMetadata; })(); - + firestore.BundleElement = (function() { - + /** * Properties of a BundleElement. * @memberof firestore @@ -619,7 +619,7 @@ * @property {firestore.IBundledDocumentMetadata|null} [documentMetadata] BundleElement documentMetadata * @property {google.firestore.v1.IDocument|null} [document] BundleElement document */ - + /** * Constructs a new BundleElement. * @memberof firestore @@ -634,7 +634,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BundleElement metadata. * @member {firestore.IBundleMetadata|null|undefined} metadata @@ -642,7 +642,7 @@ * @instance */ BundleElement.prototype.metadata = null; - + /** * BundleElement namedQuery. * @member {firestore.INamedQuery|null|undefined} namedQuery @@ -650,7 +650,7 @@ * @instance */ BundleElement.prototype.namedQuery = null; - + /** * BundleElement documentMetadata. * @member {firestore.IBundledDocumentMetadata|null|undefined} documentMetadata @@ -658,7 +658,7 @@ * @instance */ BundleElement.prototype.documentMetadata = null; - + /** * BundleElement document. * @member {google.firestore.v1.IDocument|null|undefined} document @@ -666,10 +666,10 @@ * @instance */ BundleElement.prototype.document = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * BundleElement elementType. * @member {"metadata"|"namedQuery"|"documentMetadata"|"document"|undefined} elementType @@ -680,7 +680,7 @@ get: $util.oneOfGetter($oneOfFields = ["metadata", "namedQuery", "documentMetadata", "document"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a BundleElement message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -715,7 +715,7 @@ } return message; }; - + /** * Creates a plain object from a BundleElement message. Also converts values to other types if specified. * @function toObject @@ -751,7 +751,7 @@ } return object; }; - + /** * Converts this BundleElement to JSON. * @function toJSON @@ -762,33 +762,33 @@ BundleElement.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BundleElement; })(); - + return firestore; })(); - + $root.google = (function() { - + /** * Namespace google. * @exports google * @namespace */ var google = {}; - + google.protobuf = (function() { - + /** * Namespace protobuf. * @memberof google * @namespace */ var protobuf = {}; - + protobuf.Timestamp = (function() { - + /** * Properties of a Timestamp. * @memberof google.protobuf @@ -796,7 +796,7 @@ * @property {number|string|null} [seconds] Timestamp seconds * @property {number|null} [nanos] Timestamp nanos */ - + /** * Constructs a new Timestamp. * @memberof google.protobuf @@ -811,7 +811,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Timestamp seconds. * @member {number|string} seconds @@ -819,7 +819,7 @@ * @instance */ Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - + /** * Timestamp nanos. * @member {number} nanos @@ -827,7 +827,7 @@ * @instance */ Timestamp.prototype.nanos = 0; - + /** * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -853,7 +853,7 @@ message.nanos = object.nanos | 0; return message; }; - + /** * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject @@ -884,7 +884,7 @@ object.nanos = message.nanos; return object; }; - + /** * Converts this Timestamp to JSON. * @function toJSON @@ -895,19 +895,19 @@ Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Timestamp; })(); - + protobuf.FileDescriptorSet = (function() { - + /** * Properties of a FileDescriptorSet. * @memberof google.protobuf * @interface IFileDescriptorSet * @property {Array.|null} [file] FileDescriptorSet file */ - + /** * Constructs a new FileDescriptorSet. * @memberof google.protobuf @@ -923,7 +923,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FileDescriptorSet file. * @member {Array.} file @@ -931,7 +931,7 @@ * @instance */ FileDescriptorSet.prototype.file = $util.emptyArray; - + /** * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -956,7 +956,7 @@ } return message; }; - + /** * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject @@ -979,7 +979,7 @@ } return object; }; - + /** * Converts this FileDescriptorSet to JSON. * @function toJSON @@ -990,12 +990,12 @@ FileDescriptorSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return FileDescriptorSet; })(); - + protobuf.FileDescriptorProto = (function() { - + /** * Properties of a FileDescriptorProto. * @memberof google.protobuf @@ -1013,7 +1013,7 @@ * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax */ - + /** * Constructs a new FileDescriptorProto. * @memberof google.protobuf @@ -1035,7 +1035,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FileDescriptorProto name. * @member {string} name @@ -1043,7 +1043,7 @@ * @instance */ FileDescriptorProto.prototype.name = ""; - + /** * FileDescriptorProto package. * @member {string} package @@ -1051,7 +1051,7 @@ * @instance */ FileDescriptorProto.prototype["package"] = ""; - + /** * FileDescriptorProto dependency. * @member {Array.} dependency @@ -1059,7 +1059,7 @@ * @instance */ FileDescriptorProto.prototype.dependency = $util.emptyArray; - + /** * FileDescriptorProto publicDependency. * @member {Array.} publicDependency @@ -1067,7 +1067,7 @@ * @instance */ FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - + /** * FileDescriptorProto weakDependency. * @member {Array.} weakDependency @@ -1075,7 +1075,7 @@ * @instance */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -1083,7 +1083,7 @@ * @instance */ FileDescriptorProto.prototype.messageType = $util.emptyArray; - + /** * FileDescriptorProto enumType. * @member {Array.} enumType @@ -1091,7 +1091,7 @@ * @instance */ FileDescriptorProto.prototype.enumType = $util.emptyArray; - + /** * FileDescriptorProto service. * @member {Array.} service @@ -1099,7 +1099,7 @@ * @instance */ FileDescriptorProto.prototype.service = $util.emptyArray; - + /** * FileDescriptorProto extension. * @member {Array.} extension @@ -1107,7 +1107,7 @@ * @instance */ FileDescriptorProto.prototype.extension = $util.emptyArray; - + /** * FileDescriptorProto options. * @member {google.protobuf.IFileOptions|null|undefined} options @@ -1115,7 +1115,7 @@ * @instance */ FileDescriptorProto.prototype.options = null; - + /** * FileDescriptorProto sourceCodeInfo. * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo @@ -1123,7 +1123,7 @@ * @instance */ FileDescriptorProto.prototype.sourceCodeInfo = null; - + /** * FileDescriptorProto syntax. * @member {string} syntax @@ -1131,7 +1131,7 @@ * @instance */ FileDescriptorProto.prototype.syntax = ""; - + /** * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -1223,7 +1223,7 @@ message.syntax = String(object.syntax); return message; }; - + /** * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -1300,7 +1300,7 @@ object.syntax = message.syntax; return object; }; - + /** * Converts this FileDescriptorProto to JSON. * @function toJSON @@ -1311,12 +1311,12 @@ FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return FileDescriptorProto; })(); - + protobuf.DescriptorProto = (function() { - + /** * Properties of a DescriptorProto. * @memberof google.protobuf @@ -1332,7 +1332,7 @@ * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName */ - + /** * Constructs a new DescriptorProto. * @memberof google.protobuf @@ -1355,7 +1355,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DescriptorProto name. * @member {string} name @@ -1363,7 +1363,7 @@ * @instance */ DescriptorProto.prototype.name = ""; - + /** * DescriptorProto field. * @member {Array.} field @@ -1371,7 +1371,7 @@ * @instance */ DescriptorProto.prototype.field = $util.emptyArray; - + /** * DescriptorProto extension. * @member {Array.} extension @@ -1379,7 +1379,7 @@ * @instance */ DescriptorProto.prototype.extension = $util.emptyArray; - + /** * DescriptorProto nestedType. * @member {Array.} nestedType @@ -1387,7 +1387,7 @@ * @instance */ DescriptorProto.prototype.nestedType = $util.emptyArray; - + /** * DescriptorProto enumType. * @member {Array.} enumType @@ -1395,7 +1395,7 @@ * @instance */ DescriptorProto.prototype.enumType = $util.emptyArray; - + /** * DescriptorProto extensionRange. * @member {Array.} extensionRange @@ -1403,7 +1403,7 @@ * @instance */ DescriptorProto.prototype.extensionRange = $util.emptyArray; - + /** * DescriptorProto oneofDecl. * @member {Array.} oneofDecl @@ -1411,7 +1411,7 @@ * @instance */ DescriptorProto.prototype.oneofDecl = $util.emptyArray; - + /** * DescriptorProto options. * @member {google.protobuf.IMessageOptions|null|undefined} options @@ -1419,7 +1419,7 @@ * @instance */ DescriptorProto.prototype.options = null; - + /** * DescriptorProto reservedRange. * @member {Array.} reservedRange @@ -1427,7 +1427,7 @@ * @instance */ DescriptorProto.prototype.reservedRange = $util.emptyArray; - + /** * DescriptorProto reservedName. * @member {Array.} reservedName @@ -1435,7 +1435,7 @@ * @instance */ DescriptorProto.prototype.reservedName = $util.emptyArray; - + /** * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -1534,7 +1534,7 @@ } return message; }; - + /** * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -1608,7 +1608,7 @@ } return object; }; - + /** * Converts this DescriptorProto to JSON. * @function toJSON @@ -1619,9 +1619,9 @@ DescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + DescriptorProto.ExtensionRange = (function() { - + /** * Properties of an ExtensionRange. * @memberof google.protobuf.DescriptorProto @@ -1629,7 +1629,7 @@ * @property {number|null} [start] ExtensionRange start * @property {number|null} [end] ExtensionRange end */ - + /** * Constructs a new ExtensionRange. * @memberof google.protobuf.DescriptorProto @@ -1644,7 +1644,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ExtensionRange start. * @member {number} start @@ -1652,7 +1652,7 @@ * @instance */ ExtensionRange.prototype.start = 0; - + /** * ExtensionRange end. * @member {number} end @@ -1660,7 +1660,7 @@ * @instance */ ExtensionRange.prototype.end = 0; - + /** * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -1679,7 +1679,7 @@ message.end = object.end | 0; return message; }; - + /** * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. * @function toObject @@ -1703,7 +1703,7 @@ object.end = message.end; return object; }; - + /** * Converts this ExtensionRange to JSON. * @function toJSON @@ -1714,12 +1714,12 @@ ExtensionRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ExtensionRange; })(); - + DescriptorProto.ReservedRange = (function() { - + /** * Properties of a ReservedRange. * @memberof google.protobuf.DescriptorProto @@ -1727,7 +1727,7 @@ * @property {number|null} [start] ReservedRange start * @property {number|null} [end] ReservedRange end */ - + /** * Constructs a new ReservedRange. * @memberof google.protobuf.DescriptorProto @@ -1742,7 +1742,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ReservedRange start. * @member {number} start @@ -1750,7 +1750,7 @@ * @instance */ ReservedRange.prototype.start = 0; - + /** * ReservedRange end. * @member {number} end @@ -1758,7 +1758,7 @@ * @instance */ ReservedRange.prototype.end = 0; - + /** * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -1777,7 +1777,7 @@ message.end = object.end | 0; return message; }; - + /** * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. * @function toObject @@ -1801,7 +1801,7 @@ object.end = message.end; return object; }; - + /** * Converts this ReservedRange to JSON. * @function toJSON @@ -1812,15 +1812,15 @@ ReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ReservedRange; })(); - + return DescriptorProto; })(); - + protobuf.FieldDescriptorProto = (function() { - + /** * Properties of a FieldDescriptorProto. * @memberof google.protobuf @@ -1836,7 +1836,7 @@ * @property {string|null} [jsonName] FieldDescriptorProto jsonName * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options */ - + /** * Constructs a new FieldDescriptorProto. * @memberof google.protobuf @@ -1851,7 +1851,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldDescriptorProto name. * @member {string} name @@ -1859,7 +1859,7 @@ * @instance */ FieldDescriptorProto.prototype.name = ""; - + /** * FieldDescriptorProto number. * @member {number} number @@ -1867,7 +1867,7 @@ * @instance */ FieldDescriptorProto.prototype.number = 0; - + /** * FieldDescriptorProto label. * @member {google.protobuf.FieldDescriptorProto.Label} label @@ -1875,7 +1875,7 @@ * @instance */ FieldDescriptorProto.prototype.label = 1; - + /** * FieldDescriptorProto type. * @member {google.protobuf.FieldDescriptorProto.Type} type @@ -1883,7 +1883,7 @@ * @instance */ FieldDescriptorProto.prototype.type = 1; - + /** * FieldDescriptorProto typeName. * @member {string} typeName @@ -1891,7 +1891,7 @@ * @instance */ FieldDescriptorProto.prototype.typeName = ""; - + /** * FieldDescriptorProto extendee. * @member {string} extendee @@ -1899,7 +1899,7 @@ * @instance */ FieldDescriptorProto.prototype.extendee = ""; - + /** * FieldDescriptorProto defaultValue. * @member {string} defaultValue @@ -1907,7 +1907,7 @@ * @instance */ FieldDescriptorProto.prototype.defaultValue = ""; - + /** * FieldDescriptorProto oneofIndex. * @member {number} oneofIndex @@ -1915,7 +1915,7 @@ * @instance */ FieldDescriptorProto.prototype.oneofIndex = 0; - + /** * FieldDescriptorProto jsonName. * @member {string} jsonName @@ -1923,7 +1923,7 @@ * @instance */ FieldDescriptorProto.prototype.jsonName = ""; - + /** * FieldDescriptorProto options. * @member {google.protobuf.IFieldOptions|null|undefined} options @@ -1931,7 +1931,7 @@ * @instance */ FieldDescriptorProto.prototype.options = null; - + /** * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2053,7 +2053,7 @@ } return message; }; - + /** * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2101,7 +2101,7 @@ object.jsonName = message.jsonName; return object; }; - + /** * Converts this FieldDescriptorProto to JSON. * @function toJSON @@ -2112,7 +2112,7 @@ FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -2158,7 +2158,7 @@ values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; return values; })(); - + /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label @@ -2174,12 +2174,12 @@ values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; return values; })(); - + return FieldDescriptorProto; })(); - + protobuf.OneofDescriptorProto = (function() { - + /** * Properties of an OneofDescriptorProto. * @memberof google.protobuf @@ -2187,7 +2187,7 @@ * @property {string|null} [name] OneofDescriptorProto name * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ - + /** * Constructs a new OneofDescriptorProto. * @memberof google.protobuf @@ -2202,7 +2202,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * OneofDescriptorProto name. * @member {string} name @@ -2210,7 +2210,7 @@ * @instance */ OneofDescriptorProto.prototype.name = ""; - + /** * OneofDescriptorProto options. * @member {google.protobuf.IOneofOptions|null|undefined} options @@ -2218,7 +2218,7 @@ * @instance */ OneofDescriptorProto.prototype.options = null; - + /** * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2240,7 +2240,7 @@ } return message; }; - + /** * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2264,7 +2264,7 @@ object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; - + /** * Converts this OneofDescriptorProto to JSON. * @function toJSON @@ -2275,12 +2275,12 @@ OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return OneofDescriptorProto; })(); - + protobuf.EnumDescriptorProto = (function() { - + /** * Properties of an EnumDescriptorProto. * @memberof google.protobuf @@ -2289,7 +2289,7 @@ * @property {Array.|null} [value] EnumDescriptorProto value * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options */ - + /** * Constructs a new EnumDescriptorProto. * @memberof google.protobuf @@ -2305,7 +2305,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * EnumDescriptorProto name. * @member {string} name @@ -2313,7 +2313,7 @@ * @instance */ EnumDescriptorProto.prototype.name = ""; - + /** * EnumDescriptorProto value. * @member {Array.} value @@ -2321,7 +2321,7 @@ * @instance */ EnumDescriptorProto.prototype.value = $util.emptyArray; - + /** * EnumDescriptorProto options. * @member {google.protobuf.IEnumOptions|null|undefined} options @@ -2329,7 +2329,7 @@ * @instance */ EnumDescriptorProto.prototype.options = null; - + /** * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2361,7 +2361,7 @@ } return message; }; - + /** * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2392,7 +2392,7 @@ object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); return object; }; - + /** * Converts this EnumDescriptorProto to JSON. * @function toJSON @@ -2403,12 +2403,12 @@ EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return EnumDescriptorProto; })(); - + protobuf.EnumValueDescriptorProto = (function() { - + /** * Properties of an EnumValueDescriptorProto. * @memberof google.protobuf @@ -2417,7 +2417,7 @@ * @property {number|null} [number] EnumValueDescriptorProto number * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options */ - + /** * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf @@ -2432,7 +2432,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * EnumValueDescriptorProto name. * @member {string} name @@ -2440,7 +2440,7 @@ * @instance */ EnumValueDescriptorProto.prototype.name = ""; - + /** * EnumValueDescriptorProto number. * @member {number} number @@ -2448,7 +2448,7 @@ * @instance */ EnumValueDescriptorProto.prototype.number = 0; - + /** * EnumValueDescriptorProto options. * @member {google.protobuf.IEnumValueOptions|null|undefined} options @@ -2456,7 +2456,7 @@ * @instance */ EnumValueDescriptorProto.prototype.options = null; - + /** * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2480,7 +2480,7 @@ } return message; }; - + /** * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2507,7 +2507,7 @@ object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; - + /** * Converts this EnumValueDescriptorProto to JSON. * @function toJSON @@ -2518,12 +2518,12 @@ EnumValueDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return EnumValueDescriptorProto; })(); - + protobuf.ServiceDescriptorProto = (function() { - + /** * Properties of a ServiceDescriptorProto. * @memberof google.protobuf @@ -2532,7 +2532,7 @@ * @property {Array.|null} [method] ServiceDescriptorProto method * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options */ - + /** * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf @@ -2548,7 +2548,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ServiceDescriptorProto name. * @member {string} name @@ -2556,7 +2556,7 @@ * @instance */ ServiceDescriptorProto.prototype.name = ""; - + /** * ServiceDescriptorProto method. * @member {Array.} method @@ -2564,7 +2564,7 @@ * @instance */ ServiceDescriptorProto.prototype.method = $util.emptyArray; - + /** * ServiceDescriptorProto options. * @member {google.protobuf.IServiceOptions|null|undefined} options @@ -2572,7 +2572,7 @@ * @instance */ ServiceDescriptorProto.prototype.options = null; - + /** * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2604,7 +2604,7 @@ } return message; }; - + /** * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2635,7 +2635,7 @@ object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; - + /** * Converts this ServiceDescriptorProto to JSON. * @function toJSON @@ -2646,12 +2646,12 @@ ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ServiceDescriptorProto; })(); - + protobuf.MethodDescriptorProto = (function() { - + /** * Properties of a MethodDescriptorProto. * @memberof google.protobuf @@ -2663,7 +2663,7 @@ * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming */ - + /** * Constructs a new MethodDescriptorProto. * @memberof google.protobuf @@ -2678,7 +2678,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * MethodDescriptorProto name. * @member {string} name @@ -2686,7 +2686,7 @@ * @instance */ MethodDescriptorProto.prototype.name = ""; - + /** * MethodDescriptorProto inputType. * @member {string} inputType @@ -2694,7 +2694,7 @@ * @instance */ MethodDescriptorProto.prototype.inputType = ""; - + /** * MethodDescriptorProto outputType. * @member {string} outputType @@ -2702,7 +2702,7 @@ * @instance */ MethodDescriptorProto.prototype.outputType = ""; - + /** * MethodDescriptorProto options. * @member {google.protobuf.IMethodOptions|null|undefined} options @@ -2710,7 +2710,7 @@ * @instance */ MethodDescriptorProto.prototype.options = null; - + /** * MethodDescriptorProto clientStreaming. * @member {boolean} clientStreaming @@ -2718,7 +2718,7 @@ * @instance */ MethodDescriptorProto.prototype.clientStreaming = false; - + /** * MethodDescriptorProto serverStreaming. * @member {boolean} serverStreaming @@ -2726,7 +2726,7 @@ * @instance */ MethodDescriptorProto.prototype.serverStreaming = false; - + /** * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -2756,7 +2756,7 @@ message.serverStreaming = Boolean(object.serverStreaming); return message; }; - + /** * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject @@ -2792,7 +2792,7 @@ object.serverStreaming = message.serverStreaming; return object; }; - + /** * Converts this MethodDescriptorProto to JSON. * @function toJSON @@ -2803,12 +2803,12 @@ MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return MethodDescriptorProto; })(); - + protobuf.FileOptions = (function() { - + /** * Properties of a FileOptions. * @memberof google.protobuf @@ -2830,7 +2830,7 @@ * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ - + /** * Constructs a new FileOptions. * @memberof google.protobuf @@ -2847,7 +2847,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FileOptions javaPackage. * @member {string} javaPackage @@ -2855,7 +2855,7 @@ * @instance */ FileOptions.prototype.javaPackage = ""; - + /** * FileOptions javaOuterClassname. * @member {string} javaOuterClassname @@ -2863,7 +2863,7 @@ * @instance */ FileOptions.prototype.javaOuterClassname = ""; - + /** * FileOptions javaMultipleFiles. * @member {boolean} javaMultipleFiles @@ -2871,7 +2871,7 @@ * @instance */ FileOptions.prototype.javaMultipleFiles = false; - + /** * FileOptions javaGenerateEqualsAndHash. * @member {boolean} javaGenerateEqualsAndHash @@ -2879,7 +2879,7 @@ * @instance */ FileOptions.prototype.javaGenerateEqualsAndHash = false; - + /** * FileOptions javaStringCheckUtf8. * @member {boolean} javaStringCheckUtf8 @@ -2887,7 +2887,7 @@ * @instance */ FileOptions.prototype.javaStringCheckUtf8 = false; - + /** * FileOptions optimizeFor. * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor @@ -2895,7 +2895,7 @@ * @instance */ FileOptions.prototype.optimizeFor = 1; - + /** * FileOptions goPackage. * @member {string} goPackage @@ -2903,7 +2903,7 @@ * @instance */ FileOptions.prototype.goPackage = ""; - + /** * FileOptions ccGenericServices. * @member {boolean} ccGenericServices @@ -2911,7 +2911,7 @@ * @instance */ FileOptions.prototype.ccGenericServices = false; - + /** * FileOptions javaGenericServices. * @member {boolean} javaGenericServices @@ -2919,7 +2919,7 @@ * @instance */ FileOptions.prototype.javaGenericServices = false; - + /** * FileOptions pyGenericServices. * @member {boolean} pyGenericServices @@ -2927,7 +2927,7 @@ * @instance */ FileOptions.prototype.pyGenericServices = false; - + /** * FileOptions deprecated. * @member {boolean} deprecated @@ -2935,7 +2935,7 @@ * @instance */ FileOptions.prototype.deprecated = false; - + /** * FileOptions ccEnableArenas. * @member {boolean} ccEnableArenas @@ -2943,7 +2943,7 @@ * @instance */ FileOptions.prototype.ccEnableArenas = false; - + /** * FileOptions objcClassPrefix. * @member {string} objcClassPrefix @@ -2951,7 +2951,7 @@ * @instance */ FileOptions.prototype.objcClassPrefix = ""; - + /** * FileOptions csharpNamespace. * @member {string} csharpNamespace @@ -2959,7 +2959,7 @@ * @instance */ FileOptions.prototype.csharpNamespace = ""; - + /** * FileOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -2967,7 +2967,7 @@ * @instance */ FileOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * FileOptions .google.api.resourceDefinition. * @member {Array.} .google.api.resourceDefinition @@ -2975,7 +2975,7 @@ * @instance */ FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - + /** * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3050,7 +3050,7 @@ } return message; }; - + /** * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject @@ -3124,7 +3124,7 @@ } return object; }; - + /** * Converts this FileOptions to JSON. * @function toJSON @@ -3135,7 +3135,7 @@ FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -3151,12 +3151,12 @@ values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; return values; })(); - + return FileOptions; })(); - + protobuf.MessageOptions = (function() { - + /** * Properties of a MessageOptions. * @memberof google.protobuf @@ -3168,7 +3168,7 @@ * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ - + /** * Constructs a new MessageOptions. * @memberof google.protobuf @@ -3184,7 +3184,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * MessageOptions messageSetWireFormat. * @member {boolean} messageSetWireFormat @@ -3192,7 +3192,7 @@ * @instance */ MessageOptions.prototype.messageSetWireFormat = false; - + /** * MessageOptions noStandardDescriptorAccessor. * @member {boolean} noStandardDescriptorAccessor @@ -3200,7 +3200,7 @@ * @instance */ MessageOptions.prototype.noStandardDescriptorAccessor = false; - + /** * MessageOptions deprecated. * @member {boolean} deprecated @@ -3208,7 +3208,7 @@ * @instance */ MessageOptions.prototype.deprecated = false; - + /** * MessageOptions mapEntry. * @member {boolean} mapEntry @@ -3216,7 +3216,7 @@ * @instance */ MessageOptions.prototype.mapEntry = false; - + /** * MessageOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -3224,7 +3224,7 @@ * @instance */ MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * MessageOptions .google.api.resource. * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource @@ -3232,7 +3232,7 @@ * @instance */ MessageOptions.prototype[".google.api.resource"] = null; - + /** * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3270,7 +3270,7 @@ } return message; }; - + /** * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject @@ -3310,7 +3310,7 @@ object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; - + /** * Converts this MessageOptions to JSON. * @function toJSON @@ -3321,12 +3321,12 @@ MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return MessageOptions; })(); - + protobuf.FieldOptions = (function() { - + /** * Properties of a FieldOptions. * @memberof google.protobuf @@ -3341,7 +3341,7 @@ * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ - + /** * Constructs a new FieldOptions. * @memberof google.protobuf @@ -3358,7 +3358,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldOptions ctype. * @member {google.protobuf.FieldOptions.CType} ctype @@ -3366,7 +3366,7 @@ * @instance */ FieldOptions.prototype.ctype = 0; - + /** * FieldOptions packed. * @member {boolean} packed @@ -3374,7 +3374,7 @@ * @instance */ FieldOptions.prototype.packed = false; - + /** * FieldOptions jstype. * @member {google.protobuf.FieldOptions.JSType} jstype @@ -3382,7 +3382,7 @@ * @instance */ FieldOptions.prototype.jstype = 0; - + /** * FieldOptions lazy. * @member {boolean} lazy @@ -3390,7 +3390,7 @@ * @instance */ FieldOptions.prototype.lazy = false; - + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -3398,7 +3398,7 @@ * @instance */ FieldOptions.prototype.deprecated = false; - + /** * FieldOptions weak. * @member {boolean} weak @@ -3406,7 +3406,7 @@ * @instance */ FieldOptions.prototype.weak = false; - + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -3414,7 +3414,7 @@ * @instance */ FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * FieldOptions .google.api.fieldBehavior. * @member {Array.} .google.api.fieldBehavior @@ -3422,7 +3422,7 @@ * @instance */ FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - + /** * FieldOptions .google.api.resourceReference. * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference @@ -3430,7 +3430,7 @@ * @instance */ FieldOptions.prototype[".google.api.resourceReference"] = null; - + /** * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3537,7 +3537,7 @@ } return message; }; - + /** * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject @@ -3590,7 +3590,7 @@ object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; - + /** * Converts this FieldOptions to JSON. * @function toJSON @@ -3601,7 +3601,7 @@ FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -3617,7 +3617,7 @@ values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; return values; })(); - + /** * JSType enum. * @name google.protobuf.FieldOptions.JSType @@ -3633,19 +3633,19 @@ values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; return values; })(); - + return FieldOptions; })(); - + protobuf.OneofOptions = (function() { - + /** * Properties of an OneofOptions. * @memberof google.protobuf * @interface IOneofOptions * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ - + /** * Constructs a new OneofOptions. * @memberof google.protobuf @@ -3661,7 +3661,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * OneofOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -3669,7 +3669,7 @@ * @instance */ OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3694,7 +3694,7 @@ } return message; }; - + /** * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject @@ -3717,7 +3717,7 @@ } return object; }; - + /** * Converts this OneofOptions to JSON. * @function toJSON @@ -3728,12 +3728,12 @@ OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return OneofOptions; })(); - + protobuf.EnumOptions = (function() { - + /** * Properties of an EnumOptions. * @memberof google.protobuf @@ -3742,7 +3742,7 @@ * @property {boolean|null} [deprecated] EnumOptions deprecated * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ - + /** * Constructs a new EnumOptions. * @memberof google.protobuf @@ -3758,7 +3758,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * EnumOptions allowAlias. * @member {boolean} allowAlias @@ -3766,7 +3766,7 @@ * @instance */ EnumOptions.prototype.allowAlias = false; - + /** * EnumOptions deprecated. * @member {boolean} deprecated @@ -3774,7 +3774,7 @@ * @instance */ EnumOptions.prototype.deprecated = false; - + /** * EnumOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -3782,7 +3782,7 @@ * @instance */ EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3811,7 +3811,7 @@ } return message; }; - + /** * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject @@ -3842,7 +3842,7 @@ } return object; }; - + /** * Converts this EnumOptions to JSON. * @function toJSON @@ -3853,12 +3853,12 @@ EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return EnumOptions; })(); - + protobuf.EnumValueOptions = (function() { - + /** * Properties of an EnumValueOptions. * @memberof google.protobuf @@ -3866,7 +3866,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ - + /** * Constructs a new EnumValueOptions. * @memberof google.protobuf @@ -3882,7 +3882,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * EnumValueOptions deprecated. * @member {boolean} deprecated @@ -3890,7 +3890,7 @@ * @instance */ EnumValueOptions.prototype.deprecated = false; - + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -3898,7 +3898,7 @@ * @instance */ EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -3925,7 +3925,7 @@ } return message; }; - + /** * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject @@ -3952,7 +3952,7 @@ } return object; }; - + /** * Converts this EnumValueOptions to JSON. * @function toJSON @@ -3963,12 +3963,12 @@ EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return EnumValueOptions; })(); - + protobuf.ServiceOptions = (function() { - + /** * Properties of a ServiceOptions. * @memberof google.protobuf @@ -3978,7 +3978,7 @@ * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ - + /** * Constructs a new ServiceOptions. * @memberof google.protobuf @@ -3994,7 +3994,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ServiceOptions deprecated. * @member {boolean} deprecated @@ -4002,7 +4002,7 @@ * @instance */ ServiceOptions.prototype.deprecated = false; - + /** * ServiceOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -4010,7 +4010,7 @@ * @instance */ ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * ServiceOptions .google.api.defaultHost. * @member {string} .google.api.defaultHost @@ -4018,7 +4018,7 @@ * @instance */ ServiceOptions.prototype[".google.api.defaultHost"] = ""; - + /** * ServiceOptions .google.api.oauthScopes. * @member {string} .google.api.oauthScopes @@ -4026,7 +4026,7 @@ * @instance */ ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - + /** * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4057,7 +4057,7 @@ message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; - + /** * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject @@ -4091,7 +4091,7 @@ object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; - + /** * Converts this ServiceOptions to JSON. * @function toJSON @@ -4102,12 +4102,12 @@ ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ServiceOptions; })(); - + protobuf.MethodOptions = (function() { - + /** * Properties of a MethodOptions. * @memberof google.protobuf @@ -4118,7 +4118,7 @@ * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ - + /** * Constructs a new MethodOptions. * @memberof google.protobuf @@ -4135,7 +4135,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * MethodOptions deprecated. * @member {boolean} deprecated @@ -4143,7 +4143,7 @@ * @instance */ MethodOptions.prototype.deprecated = false; - + /** * MethodOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -4151,7 +4151,7 @@ * @instance */ MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - + /** * MethodOptions .google.api.http. * @member {google.api.IHttpRule|null|undefined} .google.api.http @@ -4159,7 +4159,7 @@ * @instance */ MethodOptions.prototype[".google.api.http"] = null; - + /** * MethodOptions .google.api.methodSignature. * @member {Array.} .google.api.methodSignature @@ -4167,7 +4167,7 @@ * @instance */ MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - + /** * MethodOptions .google.longrunning.operationInfo. * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo @@ -4175,7 +4175,7 @@ * @instance */ MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - + /** * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4219,7 +4219,7 @@ } return message; }; - + /** * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject @@ -4260,7 +4260,7 @@ object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; - + /** * Converts this MethodOptions to JSON. * @function toJSON @@ -4271,12 +4271,12 @@ MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return MethodOptions; })(); - + protobuf.UninterpretedOption = (function() { - + /** * Properties of an UninterpretedOption. * @memberof google.protobuf @@ -4289,7 +4289,7 @@ * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ - + /** * Constructs a new UninterpretedOption. * @memberof google.protobuf @@ -4305,7 +4305,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * UninterpretedOption name. * @member {Array.} name @@ -4313,7 +4313,7 @@ * @instance */ UninterpretedOption.prototype.name = $util.emptyArray; - + /** * UninterpretedOption identifierValue. * @member {string} identifierValue @@ -4321,7 +4321,7 @@ * @instance */ UninterpretedOption.prototype.identifierValue = ""; - + /** * UninterpretedOption positiveIntValue. * @member {number|string} positiveIntValue @@ -4329,7 +4329,7 @@ * @instance */ UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - + /** * UninterpretedOption negativeIntValue. * @member {number|string} negativeIntValue @@ -4337,7 +4337,7 @@ * @instance */ UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - + /** * UninterpretedOption doubleValue. * @member {number} doubleValue @@ -4345,7 +4345,7 @@ * @instance */ UninterpretedOption.prototype.doubleValue = 0; - + /** * UninterpretedOption stringValue. * @member {Uint8Array} stringValue @@ -4353,7 +4353,7 @@ * @instance */ UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - + /** * UninterpretedOption aggregateValue. * @member {string} aggregateValue @@ -4361,7 +4361,7 @@ * @instance */ UninterpretedOption.prototype.aggregateValue = ""; - + /** * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4415,7 +4415,7 @@ message.aggregateValue = String(object.aggregateValue); return message; }; - + /** * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject @@ -4478,7 +4478,7 @@ object.aggregateValue = message.aggregateValue; return object; }; - + /** * Converts this UninterpretedOption to JSON. * @function toJSON @@ -4489,9 +4489,9 @@ UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + UninterpretedOption.NamePart = (function() { - + /** * Properties of a NamePart. * @memberof google.protobuf.UninterpretedOption @@ -4499,7 +4499,7 @@ * @property {string} namePart NamePart namePart * @property {boolean} isExtension NamePart isExtension */ - + /** * Constructs a new NamePart. * @memberof google.protobuf.UninterpretedOption @@ -4514,7 +4514,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * NamePart namePart. * @member {string} namePart @@ -4522,7 +4522,7 @@ * @instance */ NamePart.prototype.namePart = ""; - + /** * NamePart isExtension. * @member {boolean} isExtension @@ -4530,7 +4530,7 @@ * @instance */ NamePart.prototype.isExtension = false; - + /** * Creates a NamePart message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4549,7 +4549,7 @@ message.isExtension = Boolean(object.isExtension); return message; }; - + /** * Creates a plain object from a NamePart message. Also converts values to other types if specified. * @function toObject @@ -4573,7 +4573,7 @@ object.isExtension = message.isExtension; return object; }; - + /** * Converts this NamePart to JSON. * @function toJSON @@ -4584,22 +4584,22 @@ NamePart.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return NamePart; })(); - + return UninterpretedOption; })(); - + protobuf.SourceCodeInfo = (function() { - + /** * Properties of a SourceCodeInfo. * @memberof google.protobuf * @interface ISourceCodeInfo * @property {Array.|null} [location] SourceCodeInfo location */ - + /** * Constructs a new SourceCodeInfo. * @memberof google.protobuf @@ -4615,7 +4615,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * SourceCodeInfo location. * @member {Array.} location @@ -4623,7 +4623,7 @@ * @instance */ SourceCodeInfo.prototype.location = $util.emptyArray; - + /** * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4648,7 +4648,7 @@ } return message; }; - + /** * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject @@ -4671,7 +4671,7 @@ } return object; }; - + /** * Converts this SourceCodeInfo to JSON. * @function toJSON @@ -4682,9 +4682,9 @@ SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + SourceCodeInfo.Location = (function() { - + /** * Properties of a Location. * @memberof google.protobuf.SourceCodeInfo @@ -4695,7 +4695,7 @@ * @property {string|null} [trailingComments] Location trailingComments * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments */ - + /** * Constructs a new Location. * @memberof google.protobuf.SourceCodeInfo @@ -4713,7 +4713,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Location path. * @member {Array.} path @@ -4721,7 +4721,7 @@ * @instance */ Location.prototype.path = $util.emptyArray; - + /** * Location span. * @member {Array.} span @@ -4729,7 +4729,7 @@ * @instance */ Location.prototype.span = $util.emptyArray; - + /** * Location leadingComments. * @member {string} leadingComments @@ -4737,7 +4737,7 @@ * @instance */ Location.prototype.leadingComments = ""; - + /** * Location trailingComments. * @member {string} trailingComments @@ -4745,7 +4745,7 @@ * @instance */ Location.prototype.trailingComments = ""; - + /** * Location leadingDetachedComments. * @member {Array.} leadingDetachedComments @@ -4753,7 +4753,7 @@ * @instance */ Location.prototype.leadingDetachedComments = $util.emptyArray; - + /** * Creates a Location message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4793,7 +4793,7 @@ } return message; }; - + /** * Creates a plain object from a Location message. Also converts values to other types if specified. * @function toObject @@ -4837,7 +4837,7 @@ } return object; }; - + /** * Converts this Location to JSON. * @function toJSON @@ -4848,22 +4848,22 @@ Location.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Location; })(); - + return SourceCodeInfo; })(); - + protobuf.GeneratedCodeInfo = (function() { - + /** * Properties of a GeneratedCodeInfo. * @memberof google.protobuf * @interface IGeneratedCodeInfo * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ - + /** * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf @@ -4879,7 +4879,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * GeneratedCodeInfo annotation. * @member {Array.} annotation @@ -4887,7 +4887,7 @@ * @instance */ GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - + /** * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -4912,7 +4912,7 @@ } return message; }; - + /** * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject @@ -4935,7 +4935,7 @@ } return object; }; - + /** * Converts this GeneratedCodeInfo to JSON. * @function toJSON @@ -4946,9 +4946,9 @@ GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + GeneratedCodeInfo.Annotation = (function() { - + /** * Properties of an Annotation. * @memberof google.protobuf.GeneratedCodeInfo @@ -4958,7 +4958,7 @@ * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end */ - + /** * Constructs a new Annotation. * @memberof google.protobuf.GeneratedCodeInfo @@ -4974,7 +4974,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Annotation path. * @member {Array.} path @@ -4982,7 +4982,7 @@ * @instance */ Annotation.prototype.path = $util.emptyArray; - + /** * Annotation sourceFile. * @member {string} sourceFile @@ -4990,7 +4990,7 @@ * @instance */ Annotation.prototype.sourceFile = ""; - + /** * Annotation begin. * @member {number} begin @@ -4998,7 +4998,7 @@ * @instance */ Annotation.prototype.begin = 0; - + /** * Annotation end. * @member {number} end @@ -5006,7 +5006,7 @@ * @instance */ Annotation.prototype.end = 0; - + /** * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5034,7 +5034,7 @@ message.end = object.end | 0; return message; }; - + /** * Creates a plain object from an Annotation message. Also converts values to other types if specified. * @function toObject @@ -5068,7 +5068,7 @@ object.end = message.end; return object; }; - + /** * Converts this Annotation to JSON. * @function toJSON @@ -5079,22 +5079,22 @@ Annotation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Annotation; })(); - + return GeneratedCodeInfo; })(); - + protobuf.Struct = (function() { - + /** * Properties of a Struct. * @memberof google.protobuf * @interface IStruct * @property {Object.|null} [fields] Struct fields */ - + /** * Constructs a new Struct. * @memberof google.protobuf @@ -5110,7 +5110,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Struct fields. * @member {Object.} fields @@ -5118,7 +5118,7 @@ * @instance */ Struct.prototype.fields = $util.emptyObject; - + /** * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5143,7 +5143,7 @@ } return message; }; - + /** * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject @@ -5167,7 +5167,7 @@ } return object; }; - + /** * Converts this Struct to JSON. * @function toJSON @@ -5178,12 +5178,12 @@ Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Struct; })(); - + protobuf.Value = (function() { - + /** * Properties of a Value. * @memberof google.protobuf @@ -5195,7 +5195,7 @@ * @property {google.protobuf.IStruct|null} [structValue] Value structValue * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ - + /** * Constructs a new Value. * @memberof google.protobuf @@ -5210,7 +5210,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Value nullValue. * @member {google.protobuf.NullValue|null|undefined} nullValue @@ -5218,7 +5218,7 @@ * @instance */ Value.prototype.nullValue = null; - + /** * Value numberValue. * @member {number|null|undefined} numberValue @@ -5226,7 +5226,7 @@ * @instance */ Value.prototype.numberValue = null; - + /** * Value stringValue. * @member {string|null|undefined} stringValue @@ -5234,7 +5234,7 @@ * @instance */ Value.prototype.stringValue = null; - + /** * Value boolValue. * @member {boolean|null|undefined} boolValue @@ -5242,7 +5242,7 @@ * @instance */ Value.prototype.boolValue = null; - + /** * Value structValue. * @member {google.protobuf.IStruct|null|undefined} structValue @@ -5250,7 +5250,7 @@ * @instance */ Value.prototype.structValue = null; - + /** * Value listValue. * @member {google.protobuf.IListValue|null|undefined} listValue @@ -5258,10 +5258,10 @@ * @instance */ Value.prototype.listValue = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Value kind. * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind @@ -5272,7 +5272,7 @@ get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5309,7 +5309,7 @@ } return message; }; - + /** * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject @@ -5355,7 +5355,7 @@ } return object; }; - + /** * Converts this Value to JSON. * @function toJSON @@ -5366,10 +5366,10 @@ Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Value; })(); - + /** * NullValue enum. * @name google.protobuf.NullValue @@ -5381,16 +5381,16 @@ values[valuesById[0] = "NULL_VALUE"] = "NULL_VALUE"; return values; })(); - + protobuf.ListValue = (function() { - + /** * Properties of a ListValue. * @memberof google.protobuf * @interface IListValue * @property {Array.|null} [values] ListValue values */ - + /** * Constructs a new ListValue. * @memberof google.protobuf @@ -5406,7 +5406,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListValue values. * @member {Array.} values @@ -5414,7 +5414,7 @@ * @instance */ ListValue.prototype.values = $util.emptyArray; - + /** * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5439,7 +5439,7 @@ } return message; }; - + /** * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject @@ -5462,7 +5462,7 @@ } return object; }; - + /** * Converts this ListValue to JSON. * @function toJSON @@ -5473,18 +5473,18 @@ ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListValue; })(); - + protobuf.Empty = (function() { - + /** * Properties of an Empty. * @memberof google.protobuf * @interface IEmpty */ - + /** * Constructs a new Empty. * @memberof google.protobuf @@ -5499,7 +5499,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5513,7 +5513,7 @@ return object; return new $root.google.protobuf.Empty(); }; - + /** * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject @@ -5526,7 +5526,7 @@ Empty.toObject = function toObject() { return {}; }; - + /** * Converts this Empty to JSON. * @function toJSON @@ -5537,19 +5537,19 @@ Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Empty; })(); - + protobuf.DoubleValue = (function() { - + /** * Properties of a DoubleValue. * @memberof google.protobuf * @interface IDoubleValue * @property {number|null} [value] DoubleValue value */ - + /** * Constructs a new DoubleValue. * @memberof google.protobuf @@ -5564,7 +5564,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DoubleValue value. * @member {number} value @@ -5572,7 +5572,7 @@ * @instance */ DoubleValue.prototype.value = 0; - + /** * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5589,7 +5589,7 @@ message.value = Number(object.value); return message; }; - + /** * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. * @function toObject @@ -5609,7 +5609,7 @@ object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; - + /** * Converts this DoubleValue to JSON. * @function toJSON @@ -5620,19 +5620,19 @@ DoubleValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DoubleValue; })(); - + protobuf.FloatValue = (function() { - + /** * Properties of a FloatValue. * @memberof google.protobuf * @interface IFloatValue * @property {number|null} [value] FloatValue value */ - + /** * Constructs a new FloatValue. * @memberof google.protobuf @@ -5647,7 +5647,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FloatValue value. * @member {number} value @@ -5655,7 +5655,7 @@ * @instance */ FloatValue.prototype.value = 0; - + /** * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5672,7 +5672,7 @@ message.value = Number(object.value); return message; }; - + /** * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject @@ -5692,7 +5692,7 @@ object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; - + /** * Converts this FloatValue to JSON. * @function toJSON @@ -5703,19 +5703,19 @@ FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return FloatValue; })(); - + protobuf.Int64Value = (function() { - + /** * Properties of an Int64Value. * @memberof google.protobuf * @interface IInt64Value * @property {number|string|null} [value] Int64Value value */ - + /** * Constructs a new Int64Value. * @memberof google.protobuf @@ -5730,7 +5730,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Int64Value value. * @member {number|string} value @@ -5738,7 +5738,7 @@ * @instance */ Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - + /** * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5762,7 +5762,7 @@ message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; - + /** * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject @@ -5789,7 +5789,7 @@ object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; - + /** * Converts this Int64Value to JSON. * @function toJSON @@ -5800,19 +5800,19 @@ Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Int64Value; })(); - + protobuf.UInt64Value = (function() { - + /** * Properties of a UInt64Value. * @memberof google.protobuf * @interface IUInt64Value * @property {number|string|null} [value] UInt64Value value */ - + /** * Constructs a new UInt64Value. * @memberof google.protobuf @@ -5827,7 +5827,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * UInt64Value value. * @member {number|string} value @@ -5835,7 +5835,7 @@ * @instance */ UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - + /** * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5859,7 +5859,7 @@ message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; - + /** * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject @@ -5886,7 +5886,7 @@ object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; - + /** * Converts this UInt64Value to JSON. * @function toJSON @@ -5897,19 +5897,19 @@ UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return UInt64Value; })(); - + protobuf.Int32Value = (function() { - + /** * Properties of an Int32Value. * @memberof google.protobuf * @interface IInt32Value * @property {number|null} [value] Int32Value value */ - + /** * Constructs a new Int32Value. * @memberof google.protobuf @@ -5924,7 +5924,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Int32Value value. * @member {number} value @@ -5932,7 +5932,7 @@ * @instance */ Int32Value.prototype.value = 0; - + /** * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -5949,7 +5949,7 @@ message.value = object.value | 0; return message; }; - + /** * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject @@ -5969,7 +5969,7 @@ object.value = message.value; return object; }; - + /** * Converts this Int32Value to JSON. * @function toJSON @@ -5980,19 +5980,19 @@ Int32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Int32Value; })(); - + protobuf.UInt32Value = (function() { - + /** * Properties of a UInt32Value. * @memberof google.protobuf * @interface IUInt32Value * @property {number|null} [value] UInt32Value value */ - + /** * Constructs a new UInt32Value. * @memberof google.protobuf @@ -6007,7 +6007,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * UInt32Value value. * @member {number} value @@ -6015,7 +6015,7 @@ * @instance */ UInt32Value.prototype.value = 0; - + /** * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6032,7 +6032,7 @@ message.value = object.value >>> 0; return message; }; - + /** * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. * @function toObject @@ -6052,7 +6052,7 @@ object.value = message.value; return object; }; - + /** * Converts this UInt32Value to JSON. * @function toJSON @@ -6063,19 +6063,19 @@ UInt32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return UInt32Value; })(); - + protobuf.BoolValue = (function() { - + /** * Properties of a BoolValue. * @memberof google.protobuf * @interface IBoolValue * @property {boolean|null} [value] BoolValue value */ - + /** * Constructs a new BoolValue. * @memberof google.protobuf @@ -6090,7 +6090,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BoolValue value. * @member {boolean} value @@ -6098,7 +6098,7 @@ * @instance */ BoolValue.prototype.value = false; - + /** * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6115,7 +6115,7 @@ message.value = Boolean(object.value); return message; }; - + /** * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject @@ -6135,7 +6135,7 @@ object.value = message.value; return object; }; - + /** * Converts this BoolValue to JSON. * @function toJSON @@ -6146,19 +6146,19 @@ BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BoolValue; })(); - + protobuf.StringValue = (function() { - + /** * Properties of a StringValue. * @memberof google.protobuf * @interface IStringValue * @property {string|null} [value] StringValue value */ - + /** * Constructs a new StringValue. * @memberof google.protobuf @@ -6173,7 +6173,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * StringValue value. * @member {string} value @@ -6181,7 +6181,7 @@ * @instance */ StringValue.prototype.value = ""; - + /** * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6198,7 +6198,7 @@ message.value = String(object.value); return message; }; - + /** * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject @@ -6218,7 +6218,7 @@ object.value = message.value; return object; }; - + /** * Converts this StringValue to JSON. * @function toJSON @@ -6229,19 +6229,19 @@ StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return StringValue; })(); - + protobuf.BytesValue = (function() { - + /** * Properties of a BytesValue. * @memberof google.protobuf * @interface IBytesValue * @property {Uint8Array|null} [value] BytesValue value */ - + /** * Constructs a new BytesValue. * @memberof google.protobuf @@ -6256,7 +6256,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BytesValue value. * @member {Uint8Array} value @@ -6264,7 +6264,7 @@ * @instance */ BytesValue.prototype.value = $util.newBuffer([]); - + /** * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6284,7 +6284,7 @@ message.value = object.value; return message; }; - + /** * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject @@ -6310,7 +6310,7 @@ object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; - + /** * Converts this BytesValue to JSON. * @function toJSON @@ -6321,12 +6321,12 @@ BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BytesValue; })(); - + protobuf.Any = (function() { - + /** * Properties of an Any. * @memberof google.protobuf @@ -6334,7 +6334,7 @@ * @property {string|null} [type_url] Any type_url * @property {Uint8Array|null} [value] Any value */ - + /** * Constructs a new Any. * @memberof google.protobuf @@ -6349,7 +6349,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Any type_url. * @member {string} type_url @@ -6357,7 +6357,7 @@ * @instance */ Any.prototype.type_url = ""; - + /** * Any value. * @member {Uint8Array} value @@ -6365,7 +6365,7 @@ * @instance */ Any.prototype.value = $util.newBuffer([]); - + /** * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6387,7 +6387,7 @@ message.value = object.value; return message; }; - + /** * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject @@ -6417,7 +6417,7 @@ object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; - + /** * Converts this Any to JSON. * @function toJSON @@ -6428,19 +6428,19 @@ Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Any; })(); - + protobuf.FieldMask = (function() { - + /** * Properties of a FieldMask. * @memberof google.protobuf * @interface IFieldMask * @property {Array.|null} [paths] FieldMask paths */ - + /** * Constructs a new FieldMask. * @memberof google.protobuf @@ -6456,7 +6456,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldMask paths. * @member {Array.} paths @@ -6464,7 +6464,7 @@ * @instance */ FieldMask.prototype.paths = $util.emptyArray; - + /** * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6486,7 +6486,7 @@ } return message; }; - + /** * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject @@ -6509,7 +6509,7 @@ } return object; }; - + /** * Converts this FieldMask to JSON. * @function toJSON @@ -6520,12 +6520,12 @@ FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return FieldMask; })(); - + protobuf.Duration = (function() { - + /** * Properties of a Duration. * @memberof google.protobuf @@ -6533,7 +6533,7 @@ * @property {number|string|null} [seconds] Duration seconds * @property {number|null} [nanos] Duration nanos */ - + /** * Constructs a new Duration. * @memberof google.protobuf @@ -6548,7 +6548,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Duration seconds. * @member {number|string} seconds @@ -6556,7 +6556,7 @@ * @instance */ Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - + /** * Duration nanos. * @member {number} nanos @@ -6564,7 +6564,7 @@ * @instance */ Duration.prototype.nanos = 0; - + /** * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6590,7 +6590,7 @@ message.nanos = object.nanos | 0; return message; }; - + /** * Creates a plain object from a Duration message. Also converts values to other types if specified. * @function toObject @@ -6621,7 +6621,7 @@ object.nanos = message.nanos; return object; }; - + /** * Converts this Duration to JSON. * @function toJSON @@ -6632,40 +6632,40 @@ Duration.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Duration; })(); - + return protobuf; })(); - + google.firestore = (function() { - + /** * Namespace firestore. * @memberof google * @namespace */ var firestore = {}; - + firestore.v1 = (function() { - + /** * Namespace v1. * @memberof google.firestore * @namespace */ var v1 = {}; - + v1.DocumentMask = (function() { - + /** * Properties of a DocumentMask. * @memberof google.firestore.v1 * @interface IDocumentMask * @property {Array.|null} [fieldPaths] DocumentMask fieldPaths */ - + /** * Constructs a new DocumentMask. * @memberof google.firestore.v1 @@ -6681,7 +6681,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentMask fieldPaths. * @member {Array.} fieldPaths @@ -6689,7 +6689,7 @@ * @instance */ DocumentMask.prototype.fieldPaths = $util.emptyArray; - + /** * Creates a DocumentMask message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6711,7 +6711,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentMask message. Also converts values to other types if specified. * @function toObject @@ -6734,7 +6734,7 @@ } return object; }; - + /** * Converts this DocumentMask to JSON. * @function toJSON @@ -6745,12 +6745,12 @@ DocumentMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DocumentMask; })(); - + v1.Precondition = (function() { - + /** * Properties of a Precondition. * @memberof google.firestore.v1 @@ -6758,7 +6758,7 @@ * @property {boolean|null} [exists] Precondition exists * @property {google.protobuf.ITimestamp|null} [updateTime] Precondition updateTime */ - + /** * Constructs a new Precondition. * @memberof google.firestore.v1 @@ -6773,7 +6773,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Precondition exists. * @member {boolean|null|undefined} exists @@ -6781,7 +6781,7 @@ * @instance */ Precondition.prototype.exists = null; - + /** * Precondition updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime @@ -6789,10 +6789,10 @@ * @instance */ Precondition.prototype.updateTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Precondition conditionType. * @member {"exists"|"updateTime"|undefined} conditionType @@ -6803,7 +6803,7 @@ get: $util.oneOfGetter($oneOfFields = ["exists", "updateTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Precondition message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6825,7 +6825,7 @@ } return message; }; - + /** * Creates a plain object from a Precondition message. Also converts values to other types if specified. * @function toObject @@ -6851,7 +6851,7 @@ } return object; }; - + /** * Converts this Precondition to JSON. * @function toJSON @@ -6862,12 +6862,12 @@ Precondition.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Precondition; })(); - + v1.TransactionOptions = (function() { - + /** * Properties of a TransactionOptions. * @memberof google.firestore.v1 @@ -6875,7 +6875,7 @@ * @property {google.firestore.v1.TransactionOptions.IReadOnly|null} [readOnly] TransactionOptions readOnly * @property {google.firestore.v1.TransactionOptions.IReadWrite|null} [readWrite] TransactionOptions readWrite */ - + /** * Constructs a new TransactionOptions. * @memberof google.firestore.v1 @@ -6890,7 +6890,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * TransactionOptions readOnly. * @member {google.firestore.v1.TransactionOptions.IReadOnly|null|undefined} readOnly @@ -6898,7 +6898,7 @@ * @instance */ TransactionOptions.prototype.readOnly = null; - + /** * TransactionOptions readWrite. * @member {google.firestore.v1.TransactionOptions.IReadWrite|null|undefined} readWrite @@ -6906,10 +6906,10 @@ * @instance */ TransactionOptions.prototype.readWrite = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * TransactionOptions mode. * @member {"readOnly"|"readWrite"|undefined} mode @@ -6920,7 +6920,7 @@ get: $util.oneOfGetter($oneOfFields = ["readOnly", "readWrite"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -6945,7 +6945,7 @@ } return message; }; - + /** * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified. * @function toObject @@ -6971,7 +6971,7 @@ } return object; }; - + /** * Converts this TransactionOptions to JSON. * @function toJSON @@ -6982,16 +6982,16 @@ TransactionOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + TransactionOptions.ReadWrite = (function() { - + /** * Properties of a ReadWrite. * @memberof google.firestore.v1.TransactionOptions * @interface IReadWrite * @property {Uint8Array|null} [retryTransaction] ReadWrite retryTransaction */ - + /** * Constructs a new ReadWrite. * @memberof google.firestore.v1.TransactionOptions @@ -7006,7 +7006,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ReadWrite retryTransaction. * @member {Uint8Array} retryTransaction @@ -7014,7 +7014,7 @@ * @instance */ ReadWrite.prototype.retryTransaction = $util.newBuffer([]); - + /** * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7034,7 +7034,7 @@ message.retryTransaction = object.retryTransaction; return message; }; - + /** * Creates a plain object from a ReadWrite message. Also converts values to other types if specified. * @function toObject @@ -7060,7 +7060,7 @@ object.retryTransaction = options.bytes === String ? $util.base64.encode(message.retryTransaction, 0, message.retryTransaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.retryTransaction) : message.retryTransaction; return object; }; - + /** * Converts this ReadWrite to JSON. * @function toJSON @@ -7071,19 +7071,19 @@ ReadWrite.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ReadWrite; })(); - + TransactionOptions.ReadOnly = (function() { - + /** * Properties of a ReadOnly. * @memberof google.firestore.v1.TransactionOptions * @interface IReadOnly * @property {google.protobuf.ITimestamp|null} [readTime] ReadOnly readTime */ - + /** * Constructs a new ReadOnly. * @memberof google.firestore.v1.TransactionOptions @@ -7098,7 +7098,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ReadOnly readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -7106,10 +7106,10 @@ * @instance */ ReadOnly.prototype.readTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * ReadOnly consistencySelector. * @member {"readTime"|undefined} consistencySelector @@ -7120,7 +7120,7 @@ get: $util.oneOfGetter($oneOfFields = ["readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7140,7 +7140,7 @@ } return message; }; - + /** * Creates a plain object from a ReadOnly message. Also converts values to other types if specified. * @function toObject @@ -7161,7 +7161,7 @@ } return object; }; - + /** * Converts this ReadOnly to JSON. * @function toJSON @@ -7172,15 +7172,15 @@ ReadOnly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ReadOnly; })(); - + return TransactionOptions; })(); - + v1.Document = (function() { - + /** * Properties of a Document. * @memberof google.firestore.v1 @@ -7190,7 +7190,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Document createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Document updateTime */ - + /** * Constructs a new Document. * @memberof google.firestore.v1 @@ -7206,7 +7206,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Document name. * @member {string} name @@ -7214,7 +7214,7 @@ * @instance */ Document.prototype.name = ""; - + /** * Document fields. * @member {Object.} fields @@ -7222,7 +7222,7 @@ * @instance */ Document.prototype.fields = $util.emptyObject; - + /** * Document createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime @@ -7230,7 +7230,7 @@ * @instance */ Document.prototype.createTime = null; - + /** * Document updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime @@ -7238,7 +7238,7 @@ * @instance */ Document.prototype.updateTime = null; - + /** * Creates a Document message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7275,7 +7275,7 @@ } return message; }; - + /** * Creates a plain object from a Document message. Also converts values to other types if specified. * @function toObject @@ -7310,7 +7310,7 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; - + /** * Converts this Document to JSON. * @function toJSON @@ -7321,12 +7321,12 @@ Document.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Document; })(); - + v1.Value = (function() { - + /** * Properties of a Value. * @memberof google.firestore.v1 @@ -7343,7 +7343,7 @@ * @property {google.firestore.v1.IArrayValue|null} [arrayValue] Value arrayValue * @property {google.firestore.v1.IMapValue|null} [mapValue] Value mapValue */ - + /** * Constructs a new Value. * @memberof google.firestore.v1 @@ -7358,7 +7358,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Value nullValue. * @member {google.protobuf.NullValue|null|undefined} nullValue @@ -7366,7 +7366,7 @@ * @instance */ Value.prototype.nullValue = null; - + /** * Value booleanValue. * @member {boolean|null|undefined} booleanValue @@ -7374,7 +7374,7 @@ * @instance */ Value.prototype.booleanValue = null; - + /** * Value integerValue. * @member {number|string|null|undefined} integerValue @@ -7382,7 +7382,7 @@ * @instance */ Value.prototype.integerValue = null; - + /** * Value doubleValue. * @member {number|null|undefined} doubleValue @@ -7390,7 +7390,7 @@ * @instance */ Value.prototype.doubleValue = null; - + /** * Value timestampValue. * @member {google.protobuf.ITimestamp|null|undefined} timestampValue @@ -7398,7 +7398,7 @@ * @instance */ Value.prototype.timestampValue = null; - + /** * Value stringValue. * @member {string|null|undefined} stringValue @@ -7406,7 +7406,7 @@ * @instance */ Value.prototype.stringValue = null; - + /** * Value bytesValue. * @member {Uint8Array|null|undefined} bytesValue @@ -7414,7 +7414,7 @@ * @instance */ Value.prototype.bytesValue = null; - + /** * Value referenceValue. * @member {string|null|undefined} referenceValue @@ -7422,7 +7422,7 @@ * @instance */ Value.prototype.referenceValue = null; - + /** * Value geoPointValue. * @member {google.type.ILatLng|null|undefined} geoPointValue @@ -7430,7 +7430,7 @@ * @instance */ Value.prototype.geoPointValue = null; - + /** * Value arrayValue. * @member {google.firestore.v1.IArrayValue|null|undefined} arrayValue @@ -7438,7 +7438,7 @@ * @instance */ Value.prototype.arrayValue = null; - + /** * Value mapValue. * @member {google.firestore.v1.IMapValue|null|undefined} mapValue @@ -7446,10 +7446,10 @@ * @instance */ Value.prototype.mapValue = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Value valueType. * @member {"nullValue"|"booleanValue"|"integerValue"|"doubleValue"|"timestampValue"|"stringValue"|"bytesValue"|"referenceValue"|"geoPointValue"|"arrayValue"|"mapValue"|undefined} valueType @@ -7460,7 +7460,7 @@ get: $util.oneOfGetter($oneOfFields = ["nullValue", "booleanValue", "integerValue", "doubleValue", "timestampValue", "stringValue", "bytesValue", "referenceValue", "geoPointValue", "arrayValue", "mapValue"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7523,7 +7523,7 @@ } return message; }; - + /** * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject @@ -7597,7 +7597,7 @@ } return object; }; - + /** * Converts this Value to JSON. * @function toJSON @@ -7608,19 +7608,19 @@ Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Value; })(); - + v1.ArrayValue = (function() { - + /** * Properties of an ArrayValue. * @memberof google.firestore.v1 * @interface IArrayValue * @property {Array.|null} [values] ArrayValue values */ - + /** * Constructs a new ArrayValue. * @memberof google.firestore.v1 @@ -7636,7 +7636,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ArrayValue values. * @member {Array.} values @@ -7644,7 +7644,7 @@ * @instance */ ArrayValue.prototype.values = $util.emptyArray; - + /** * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7669,7 +7669,7 @@ } return message; }; - + /** * Creates a plain object from an ArrayValue message. Also converts values to other types if specified. * @function toObject @@ -7692,7 +7692,7 @@ } return object; }; - + /** * Converts this ArrayValue to JSON. * @function toJSON @@ -7703,19 +7703,19 @@ ArrayValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ArrayValue; })(); - + v1.MapValue = (function() { - + /** * Properties of a MapValue. * @memberof google.firestore.v1 * @interface IMapValue * @property {Object.|null} [fields] MapValue fields */ - + /** * Constructs a new MapValue. * @memberof google.firestore.v1 @@ -7731,7 +7731,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * MapValue fields. * @member {Object.} fields @@ -7739,7 +7739,7 @@ * @instance */ MapValue.prototype.fields = $util.emptyObject; - + /** * Creates a MapValue message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -7764,7 +7764,7 @@ } return message; }; - + /** * Creates a plain object from a MapValue message. Also converts values to other types if specified. * @function toObject @@ -7788,7 +7788,7 @@ } return object; }; - + /** * Converts this MapValue to JSON. * @function toJSON @@ -7799,12 +7799,12 @@ MapValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return MapValue; })(); - + v1.Firestore = (function() { - + /** * Constructs a new Firestore service. * @memberof google.firestore.v1 @@ -7818,9 +7818,9 @@ function Firestore(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - + (Firestore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Firestore; - + /** * Callback as used by {@link google.firestore.v1.Firestore#getDocument}. * @memberof google.firestore.v1.Firestore @@ -7829,7 +7829,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.Document} [response] Document */ - + /** * Calls GetDocument. * @function getDocument @@ -7843,7 +7843,7 @@ Object.defineProperty(Firestore.prototype.getDocument = function getDocument(request, callback) { return this.rpcCall(getDocument, $root.google.firestore.v1.GetDocumentRequest, $root.google.firestore.v1.Document, request, callback); }, "name", { value: "GetDocument" }); - + /** * Calls GetDocument. * @function getDocument @@ -7853,7 +7853,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#listDocuments}. * @memberof google.firestore.v1.Firestore @@ -7862,7 +7862,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.ListDocumentsResponse} [response] ListDocumentsResponse */ - + /** * Calls ListDocuments. * @function listDocuments @@ -7876,7 +7876,7 @@ Object.defineProperty(Firestore.prototype.listDocuments = function listDocuments(request, callback) { return this.rpcCall(listDocuments, $root.google.firestore.v1.ListDocumentsRequest, $root.google.firestore.v1.ListDocumentsResponse, request, callback); }, "name", { value: "ListDocuments" }); - + /** * Calls ListDocuments. * @function listDocuments @@ -7886,7 +7886,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#updateDocument}. * @memberof google.firestore.v1.Firestore @@ -7895,7 +7895,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.Document} [response] Document */ - + /** * Calls UpdateDocument. * @function updateDocument @@ -7909,7 +7909,7 @@ Object.defineProperty(Firestore.prototype.updateDocument = function updateDocument(request, callback) { return this.rpcCall(updateDocument, $root.google.firestore.v1.UpdateDocumentRequest, $root.google.firestore.v1.Document, request, callback); }, "name", { value: "UpdateDocument" }); - + /** * Calls UpdateDocument. * @function updateDocument @@ -7919,7 +7919,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#deleteDocument}. * @memberof google.firestore.v1.Firestore @@ -7928,7 +7928,7 @@ * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ - + /** * Calls DeleteDocument. * @function deleteDocument @@ -7942,7 +7942,7 @@ Object.defineProperty(Firestore.prototype.deleteDocument = function deleteDocument(request, callback) { return this.rpcCall(deleteDocument, $root.google.firestore.v1.DeleteDocumentRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteDocument" }); - + /** * Calls DeleteDocument. * @function deleteDocument @@ -7952,7 +7952,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#batchGetDocuments}. * @memberof google.firestore.v1.Firestore @@ -7961,7 +7961,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.BatchGetDocumentsResponse} [response] BatchGetDocumentsResponse */ - + /** * Calls BatchGetDocuments. * @function batchGetDocuments @@ -7975,7 +7975,7 @@ Object.defineProperty(Firestore.prototype.batchGetDocuments = function batchGetDocuments(request, callback) { return this.rpcCall(batchGetDocuments, $root.google.firestore.v1.BatchGetDocumentsRequest, $root.google.firestore.v1.BatchGetDocumentsResponse, request, callback); }, "name", { value: "BatchGetDocuments" }); - + /** * Calls BatchGetDocuments. * @function batchGetDocuments @@ -7985,7 +7985,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#beginTransaction}. * @memberof google.firestore.v1.Firestore @@ -7994,7 +7994,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.BeginTransactionResponse} [response] BeginTransactionResponse */ - + /** * Calls BeginTransaction. * @function beginTransaction @@ -8008,7 +8008,7 @@ Object.defineProperty(Firestore.prototype.beginTransaction = function beginTransaction(request, callback) { return this.rpcCall(beginTransaction, $root.google.firestore.v1.BeginTransactionRequest, $root.google.firestore.v1.BeginTransactionResponse, request, callback); }, "name", { value: "BeginTransaction" }); - + /** * Calls BeginTransaction. * @function beginTransaction @@ -8018,7 +8018,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#commit}. * @memberof google.firestore.v1.Firestore @@ -8027,7 +8027,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.CommitResponse} [response] CommitResponse */ - + /** * Calls Commit. * @function commit @@ -8041,7 +8041,7 @@ Object.defineProperty(Firestore.prototype.commit = function commit(request, callback) { return this.rpcCall(commit, $root.google.firestore.v1.CommitRequest, $root.google.firestore.v1.CommitResponse, request, callback); }, "name", { value: "Commit" }); - + /** * Calls Commit. * @function commit @@ -8051,7 +8051,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#rollback}. * @memberof google.firestore.v1.Firestore @@ -8060,7 +8060,7 @@ * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ - + /** * Calls Rollback. * @function rollback @@ -8074,7 +8074,7 @@ Object.defineProperty(Firestore.prototype.rollback = function rollback(request, callback) { return this.rpcCall(rollback, $root.google.firestore.v1.RollbackRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "Rollback" }); - + /** * Calls Rollback. * @function rollback @@ -8084,7 +8084,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#runQuery}. * @memberof google.firestore.v1.Firestore @@ -8093,7 +8093,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.RunQueryResponse} [response] RunQueryResponse */ - + /** * Calls RunQuery. * @function runQuery @@ -8107,7 +8107,7 @@ Object.defineProperty(Firestore.prototype.runQuery = function runQuery(request, callback) { return this.rpcCall(runQuery, $root.google.firestore.v1.RunQueryRequest, $root.google.firestore.v1.RunQueryResponse, request, callback); }, "name", { value: "RunQuery" }); - + /** * Calls RunQuery. * @function runQuery @@ -8117,7 +8117,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#partitionQuery}. * @memberof google.firestore.v1.Firestore @@ -8126,7 +8126,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.PartitionQueryResponse} [response] PartitionQueryResponse */ - + /** * Calls PartitionQuery. * @function partitionQuery @@ -8140,7 +8140,7 @@ Object.defineProperty(Firestore.prototype.partitionQuery = function partitionQuery(request, callback) { return this.rpcCall(partitionQuery, $root.google.firestore.v1.PartitionQueryRequest, $root.google.firestore.v1.PartitionQueryResponse, request, callback); }, "name", { value: "PartitionQuery" }); - + /** * Calls PartitionQuery. * @function partitionQuery @@ -8150,7 +8150,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#write}. * @memberof google.firestore.v1.Firestore @@ -8159,7 +8159,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.WriteResponse} [response] WriteResponse */ - + /** * Calls Write. * @function write @@ -8173,7 +8173,7 @@ Object.defineProperty(Firestore.prototype.write = function write(request, callback) { return this.rpcCall(write, $root.google.firestore.v1.WriteRequest, $root.google.firestore.v1.WriteResponse, request, callback); }, "name", { value: "Write" }); - + /** * Calls Write. * @function write @@ -8183,7 +8183,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#listen}. * @memberof google.firestore.v1.Firestore @@ -8192,7 +8192,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.ListenResponse} [response] ListenResponse */ - + /** * Calls Listen. * @function listen @@ -8206,7 +8206,7 @@ Object.defineProperty(Firestore.prototype.listen = function listen(request, callback) { return this.rpcCall(listen, $root.google.firestore.v1.ListenRequest, $root.google.firestore.v1.ListenResponse, request, callback); }, "name", { value: "Listen" }); - + /** * Calls Listen. * @function listen @@ -8216,7 +8216,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#listCollectionIds}. * @memberof google.firestore.v1.Firestore @@ -8225,7 +8225,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.ListCollectionIdsResponse} [response] ListCollectionIdsResponse */ - + /** * Calls ListCollectionIds. * @function listCollectionIds @@ -8239,7 +8239,7 @@ Object.defineProperty(Firestore.prototype.listCollectionIds = function listCollectionIds(request, callback) { return this.rpcCall(listCollectionIds, $root.google.firestore.v1.ListCollectionIdsRequest, $root.google.firestore.v1.ListCollectionIdsResponse, request, callback); }, "name", { value: "ListCollectionIds" }); - + /** * Calls ListCollectionIds. * @function listCollectionIds @@ -8249,7 +8249,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#batchWrite}. * @memberof google.firestore.v1.Firestore @@ -8258,7 +8258,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.BatchWriteResponse} [response] BatchWriteResponse */ - + /** * Calls BatchWrite. * @function batchWrite @@ -8272,7 +8272,7 @@ Object.defineProperty(Firestore.prototype.batchWrite = function batchWrite(request, callback) { return this.rpcCall(batchWrite, $root.google.firestore.v1.BatchWriteRequest, $root.google.firestore.v1.BatchWriteResponse, request, callback); }, "name", { value: "BatchWrite" }); - + /** * Calls BatchWrite. * @function batchWrite @@ -8282,7 +8282,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.firestore.v1.Firestore#createDocument}. * @memberof google.firestore.v1.Firestore @@ -8291,7 +8291,7 @@ * @param {Error|null} error Error, if any * @param {google.firestore.v1.Document} [response] Document */ - + /** * Calls CreateDocument. * @function createDocument @@ -8305,7 +8305,7 @@ Object.defineProperty(Firestore.prototype.createDocument = function createDocument(request, callback) { return this.rpcCall(createDocument, $root.google.firestore.v1.CreateDocumentRequest, $root.google.firestore.v1.Document, request, callback); }, "name", { value: "CreateDocument" }); - + /** * Calls CreateDocument. * @function createDocument @@ -8315,12 +8315,12 @@ * @returns {Promise} Promise * @variation 2 */ - + return Firestore; })(); - + v1.GetDocumentRequest = (function() { - + /** * Properties of a GetDocumentRequest. * @memberof google.firestore.v1 @@ -8330,7 +8330,7 @@ * @property {Uint8Array|null} [transaction] GetDocumentRequest transaction * @property {google.protobuf.ITimestamp|null} [readTime] GetDocumentRequest readTime */ - + /** * Constructs a new GetDocumentRequest. * @memberof google.firestore.v1 @@ -8345,7 +8345,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * GetDocumentRequest name. * @member {string} name @@ -8353,7 +8353,7 @@ * @instance */ GetDocumentRequest.prototype.name = ""; - + /** * GetDocumentRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask @@ -8361,7 +8361,7 @@ * @instance */ GetDocumentRequest.prototype.mask = null; - + /** * GetDocumentRequest transaction. * @member {Uint8Array|null|undefined} transaction @@ -8369,7 +8369,7 @@ * @instance */ GetDocumentRequest.prototype.transaction = null; - + /** * GetDocumentRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -8377,10 +8377,10 @@ * @instance */ GetDocumentRequest.prototype.readTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * GetDocumentRequest consistencySelector. * @member {"transaction"|"readTime"|undefined} consistencySelector @@ -8391,7 +8391,7 @@ get: $util.oneOfGetter($oneOfFields = ["transaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -8423,7 +8423,7 @@ } return message; }; - + /** * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. * @function toObject @@ -8457,7 +8457,7 @@ } return object; }; - + /** * Converts this GetDocumentRequest to JSON. * @function toJSON @@ -8468,12 +8468,12 @@ GetDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return GetDocumentRequest; })(); - + v1.ListDocumentsRequest = (function() { - + /** * Properties of a ListDocumentsRequest. * @memberof google.firestore.v1 @@ -8488,7 +8488,7 @@ * @property {google.protobuf.ITimestamp|null} [readTime] ListDocumentsRequest readTime * @property {boolean|null} [showMissing] ListDocumentsRequest showMissing */ - + /** * Constructs a new ListDocumentsRequest. * @memberof google.firestore.v1 @@ -8503,7 +8503,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListDocumentsRequest parent. * @member {string} parent @@ -8511,7 +8511,7 @@ * @instance */ ListDocumentsRequest.prototype.parent = ""; - + /** * ListDocumentsRequest collectionId. * @member {string} collectionId @@ -8519,7 +8519,7 @@ * @instance */ ListDocumentsRequest.prototype.collectionId = ""; - + /** * ListDocumentsRequest pageSize. * @member {number} pageSize @@ -8527,7 +8527,7 @@ * @instance */ ListDocumentsRequest.prototype.pageSize = 0; - + /** * ListDocumentsRequest pageToken. * @member {string} pageToken @@ -8535,7 +8535,7 @@ * @instance */ ListDocumentsRequest.prototype.pageToken = ""; - + /** * ListDocumentsRequest orderBy. * @member {string} orderBy @@ -8543,7 +8543,7 @@ * @instance */ ListDocumentsRequest.prototype.orderBy = ""; - + /** * ListDocumentsRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask @@ -8551,7 +8551,7 @@ * @instance */ ListDocumentsRequest.prototype.mask = null; - + /** * ListDocumentsRequest transaction. * @member {Uint8Array|null|undefined} transaction @@ -8559,7 +8559,7 @@ * @instance */ ListDocumentsRequest.prototype.transaction = null; - + /** * ListDocumentsRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -8567,7 +8567,7 @@ * @instance */ ListDocumentsRequest.prototype.readTime = null; - + /** * ListDocumentsRequest showMissing. * @member {boolean} showMissing @@ -8575,10 +8575,10 @@ * @instance */ ListDocumentsRequest.prototype.showMissing = false; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * ListDocumentsRequest consistencySelector. * @member {"transaction"|"readTime"|undefined} consistencySelector @@ -8589,7 +8589,7 @@ get: $util.oneOfGetter($oneOfFields = ["transaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -8631,7 +8631,7 @@ message.showMissing = Boolean(object.showMissing); return message; }; - + /** * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. * @function toObject @@ -8680,7 +8680,7 @@ object.showMissing = message.showMissing; return object; }; - + /** * Converts this ListDocumentsRequest to JSON. * @function toJSON @@ -8691,12 +8691,12 @@ ListDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListDocumentsRequest; })(); - + v1.ListDocumentsResponse = (function() { - + /** * Properties of a ListDocumentsResponse. * @memberof google.firestore.v1 @@ -8704,7 +8704,7 @@ * @property {Array.|null} [documents] ListDocumentsResponse documents * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken */ - + /** * Constructs a new ListDocumentsResponse. * @memberof google.firestore.v1 @@ -8720,7 +8720,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListDocumentsResponse documents. * @member {Array.} documents @@ -8728,7 +8728,7 @@ * @instance */ ListDocumentsResponse.prototype.documents = $util.emptyArray; - + /** * ListDocumentsResponse nextPageToken. * @member {string} nextPageToken @@ -8736,7 +8736,7 @@ * @instance */ ListDocumentsResponse.prototype.nextPageToken = ""; - + /** * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -8763,7 +8763,7 @@ message.nextPageToken = String(object.nextPageToken); return message; }; - + /** * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. * @function toObject @@ -8790,7 +8790,7 @@ object.nextPageToken = message.nextPageToken; return object; }; - + /** * Converts this ListDocumentsResponse to JSON. * @function toJSON @@ -8801,12 +8801,12 @@ ListDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListDocumentsResponse; })(); - + v1.CreateDocumentRequest = (function() { - + /** * Properties of a CreateDocumentRequest. * @memberof google.firestore.v1 @@ -8817,7 +8817,7 @@ * @property {google.firestore.v1.IDocument|null} [document] CreateDocumentRequest document * @property {google.firestore.v1.IDocumentMask|null} [mask] CreateDocumentRequest mask */ - + /** * Constructs a new CreateDocumentRequest. * @memberof google.firestore.v1 @@ -8832,7 +8832,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CreateDocumentRequest parent. * @member {string} parent @@ -8840,7 +8840,7 @@ * @instance */ CreateDocumentRequest.prototype.parent = ""; - + /** * CreateDocumentRequest collectionId. * @member {string} collectionId @@ -8848,7 +8848,7 @@ * @instance */ CreateDocumentRequest.prototype.collectionId = ""; - + /** * CreateDocumentRequest documentId. * @member {string} documentId @@ -8856,7 +8856,7 @@ * @instance */ CreateDocumentRequest.prototype.documentId = ""; - + /** * CreateDocumentRequest document. * @member {google.firestore.v1.IDocument|null|undefined} document @@ -8864,7 +8864,7 @@ * @instance */ CreateDocumentRequest.prototype.document = null; - + /** * CreateDocumentRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask @@ -8872,7 +8872,7 @@ * @instance */ CreateDocumentRequest.prototype.mask = null; - + /** * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -8903,7 +8903,7 @@ } return message; }; - + /** * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. * @function toObject @@ -8936,7 +8936,7 @@ object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); return object; }; - + /** * Converts this CreateDocumentRequest to JSON. * @function toJSON @@ -8947,12 +8947,12 @@ CreateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CreateDocumentRequest; })(); - + v1.UpdateDocumentRequest = (function() { - + /** * Properties of an UpdateDocumentRequest. * @memberof google.firestore.v1 @@ -8962,7 +8962,7 @@ * @property {google.firestore.v1.IDocumentMask|null} [mask] UpdateDocumentRequest mask * @property {google.firestore.v1.IPrecondition|null} [currentDocument] UpdateDocumentRequest currentDocument */ - + /** * Constructs a new UpdateDocumentRequest. * @memberof google.firestore.v1 @@ -8977,7 +8977,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * UpdateDocumentRequest document. * @member {google.firestore.v1.IDocument|null|undefined} document @@ -8985,7 +8985,7 @@ * @instance */ UpdateDocumentRequest.prototype.document = null; - + /** * UpdateDocumentRequest updateMask. * @member {google.firestore.v1.IDocumentMask|null|undefined} updateMask @@ -8993,7 +8993,7 @@ * @instance */ UpdateDocumentRequest.prototype.updateMask = null; - + /** * UpdateDocumentRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask @@ -9001,7 +9001,7 @@ * @instance */ UpdateDocumentRequest.prototype.mask = null; - + /** * UpdateDocumentRequest currentDocument. * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument @@ -9009,7 +9009,7 @@ * @instance */ UpdateDocumentRequest.prototype.currentDocument = null; - + /** * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9044,7 +9044,7 @@ } return message; }; - + /** * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. * @function toObject @@ -9074,7 +9074,7 @@ object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); return object; }; - + /** * Converts this UpdateDocumentRequest to JSON. * @function toJSON @@ -9085,12 +9085,12 @@ UpdateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return UpdateDocumentRequest; })(); - + v1.DeleteDocumentRequest = (function() { - + /** * Properties of a DeleteDocumentRequest. * @memberof google.firestore.v1 @@ -9098,7 +9098,7 @@ * @property {string|null} [name] DeleteDocumentRequest name * @property {google.firestore.v1.IPrecondition|null} [currentDocument] DeleteDocumentRequest currentDocument */ - + /** * Constructs a new DeleteDocumentRequest. * @memberof google.firestore.v1 @@ -9113,7 +9113,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DeleteDocumentRequest name. * @member {string} name @@ -9121,7 +9121,7 @@ * @instance */ DeleteDocumentRequest.prototype.name = ""; - + /** * DeleteDocumentRequest currentDocument. * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument @@ -9129,7 +9129,7 @@ * @instance */ DeleteDocumentRequest.prototype.currentDocument = null; - + /** * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9151,7 +9151,7 @@ } return message; }; - + /** * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. * @function toObject @@ -9175,7 +9175,7 @@ object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); return object; }; - + /** * Converts this DeleteDocumentRequest to JSON. * @function toJSON @@ -9186,12 +9186,12 @@ DeleteDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DeleteDocumentRequest; })(); - + v1.BatchGetDocumentsRequest = (function() { - + /** * Properties of a BatchGetDocumentsRequest. * @memberof google.firestore.v1 @@ -9203,7 +9203,7 @@ * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] BatchGetDocumentsRequest newTransaction * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsRequest readTime */ - + /** * Constructs a new BatchGetDocumentsRequest. * @memberof google.firestore.v1 @@ -9219,7 +9219,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BatchGetDocumentsRequest database. * @member {string} database @@ -9227,7 +9227,7 @@ * @instance */ BatchGetDocumentsRequest.prototype.database = ""; - + /** * BatchGetDocumentsRequest documents. * @member {Array.} documents @@ -9235,7 +9235,7 @@ * @instance */ BatchGetDocumentsRequest.prototype.documents = $util.emptyArray; - + /** * BatchGetDocumentsRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask @@ -9243,7 +9243,7 @@ * @instance */ BatchGetDocumentsRequest.prototype.mask = null; - + /** * BatchGetDocumentsRequest transaction. * @member {Uint8Array|null|undefined} transaction @@ -9251,7 +9251,7 @@ * @instance */ BatchGetDocumentsRequest.prototype.transaction = null; - + /** * BatchGetDocumentsRequest newTransaction. * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction @@ -9259,7 +9259,7 @@ * @instance */ BatchGetDocumentsRequest.prototype.newTransaction = null; - + /** * BatchGetDocumentsRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -9267,10 +9267,10 @@ * @instance */ BatchGetDocumentsRequest.prototype.readTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * BatchGetDocumentsRequest consistencySelector. * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector @@ -9281,7 +9281,7 @@ get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a BatchGetDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9325,7 +9325,7 @@ } return message; }; - + /** * Creates a plain object from a BatchGetDocumentsRequest message. Also converts values to other types if specified. * @function toObject @@ -9371,7 +9371,7 @@ } return object; }; - + /** * Converts this BatchGetDocumentsRequest to JSON. * @function toJSON @@ -9382,12 +9382,12 @@ BatchGetDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BatchGetDocumentsRequest; })(); - + v1.BatchGetDocumentsResponse = (function() { - + /** * Properties of a BatchGetDocumentsResponse. * @memberof google.firestore.v1 @@ -9397,7 +9397,7 @@ * @property {Uint8Array|null} [transaction] BatchGetDocumentsResponse transaction * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsResponse readTime */ - + /** * Constructs a new BatchGetDocumentsResponse. * @memberof google.firestore.v1 @@ -9412,7 +9412,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BatchGetDocumentsResponse found. * @member {google.firestore.v1.IDocument|null|undefined} found @@ -9420,7 +9420,7 @@ * @instance */ BatchGetDocumentsResponse.prototype.found = null; - + /** * BatchGetDocumentsResponse missing. * @member {string|null|undefined} missing @@ -9428,7 +9428,7 @@ * @instance */ BatchGetDocumentsResponse.prototype.missing = null; - + /** * BatchGetDocumentsResponse transaction. * @member {Uint8Array} transaction @@ -9436,7 +9436,7 @@ * @instance */ BatchGetDocumentsResponse.prototype.transaction = $util.newBuffer([]); - + /** * BatchGetDocumentsResponse readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -9444,10 +9444,10 @@ * @instance */ BatchGetDocumentsResponse.prototype.readTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * BatchGetDocumentsResponse result. * @member {"found"|"missing"|undefined} result @@ -9458,7 +9458,7 @@ get: $util.oneOfGetter($oneOfFields = ["found", "missing"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a BatchGetDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9490,7 +9490,7 @@ } return message; }; - + /** * Creates a plain object from a BatchGetDocumentsResponse message. Also converts values to other types if specified. * @function toObject @@ -9530,7 +9530,7 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; - + /** * Converts this BatchGetDocumentsResponse to JSON. * @function toJSON @@ -9541,12 +9541,12 @@ BatchGetDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BatchGetDocumentsResponse; })(); - + v1.BeginTransactionRequest = (function() { - + /** * Properties of a BeginTransactionRequest. * @memberof google.firestore.v1 @@ -9554,7 +9554,7 @@ * @property {string|null} [database] BeginTransactionRequest database * @property {google.firestore.v1.ITransactionOptions|null} [options] BeginTransactionRequest options */ - + /** * Constructs a new BeginTransactionRequest. * @memberof google.firestore.v1 @@ -9569,7 +9569,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BeginTransactionRequest database. * @member {string} database @@ -9577,7 +9577,7 @@ * @instance */ BeginTransactionRequest.prototype.database = ""; - + /** * BeginTransactionRequest options. * @member {google.firestore.v1.ITransactionOptions|null|undefined} options @@ -9585,7 +9585,7 @@ * @instance */ BeginTransactionRequest.prototype.options = null; - + /** * Creates a BeginTransactionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9607,7 +9607,7 @@ } return message; }; - + /** * Creates a plain object from a BeginTransactionRequest message. Also converts values to other types if specified. * @function toObject @@ -9631,7 +9631,7 @@ object.options = $root.google.firestore.v1.TransactionOptions.toObject(message.options, options); return object; }; - + /** * Converts this BeginTransactionRequest to JSON. * @function toJSON @@ -9642,19 +9642,19 @@ BeginTransactionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BeginTransactionRequest; })(); - + v1.BeginTransactionResponse = (function() { - + /** * Properties of a BeginTransactionResponse. * @memberof google.firestore.v1 * @interface IBeginTransactionResponse * @property {Uint8Array|null} [transaction] BeginTransactionResponse transaction */ - + /** * Constructs a new BeginTransactionResponse. * @memberof google.firestore.v1 @@ -9669,7 +9669,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BeginTransactionResponse transaction. * @member {Uint8Array} transaction @@ -9677,7 +9677,7 @@ * @instance */ BeginTransactionResponse.prototype.transaction = $util.newBuffer([]); - + /** * Creates a BeginTransactionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9697,7 +9697,7 @@ message.transaction = object.transaction; return message; }; - + /** * Creates a plain object from a BeginTransactionResponse message. Also converts values to other types if specified. * @function toObject @@ -9723,7 +9723,7 @@ object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; return object; }; - + /** * Converts this BeginTransactionResponse to JSON. * @function toJSON @@ -9734,12 +9734,12 @@ BeginTransactionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BeginTransactionResponse; })(); - + v1.CommitRequest = (function() { - + /** * Properties of a CommitRequest. * @memberof google.firestore.v1 @@ -9748,7 +9748,7 @@ * @property {Array.|null} [writes] CommitRequest writes * @property {Uint8Array|null} [transaction] CommitRequest transaction */ - + /** * Constructs a new CommitRequest. * @memberof google.firestore.v1 @@ -9764,7 +9764,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CommitRequest database. * @member {string} database @@ -9772,7 +9772,7 @@ * @instance */ CommitRequest.prototype.database = ""; - + /** * CommitRequest writes. * @member {Array.} writes @@ -9780,7 +9780,7 @@ * @instance */ CommitRequest.prototype.writes = $util.emptyArray; - + /** * CommitRequest transaction. * @member {Uint8Array} transaction @@ -9788,7 +9788,7 @@ * @instance */ CommitRequest.prototype.transaction = $util.newBuffer([]); - + /** * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9820,7 +9820,7 @@ message.transaction = object.transaction; return message; }; - + /** * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. * @function toObject @@ -9857,7 +9857,7 @@ object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; return object; }; - + /** * Converts this CommitRequest to JSON. * @function toJSON @@ -9868,12 +9868,12 @@ CommitRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CommitRequest; })(); - + v1.CommitResponse = (function() { - + /** * Properties of a CommitResponse. * @memberof google.firestore.v1 @@ -9881,7 +9881,7 @@ * @property {Array.|null} [writeResults] CommitResponse writeResults * @property {google.protobuf.ITimestamp|null} [commitTime] CommitResponse commitTime */ - + /** * Constructs a new CommitResponse. * @memberof google.firestore.v1 @@ -9897,7 +9897,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CommitResponse writeResults. * @member {Array.} writeResults @@ -9905,7 +9905,7 @@ * @instance */ CommitResponse.prototype.writeResults = $util.emptyArray; - + /** * CommitResponse commitTime. * @member {google.protobuf.ITimestamp|null|undefined} commitTime @@ -9913,7 +9913,7 @@ * @instance */ CommitResponse.prototype.commitTime = null; - + /** * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -9943,7 +9943,7 @@ } return message; }; - + /** * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. * @function toObject @@ -9970,7 +9970,7 @@ object.commitTime = $root.google.protobuf.Timestamp.toObject(message.commitTime, options); return object; }; - + /** * Converts this CommitResponse to JSON. * @function toJSON @@ -9981,12 +9981,12 @@ CommitResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CommitResponse; })(); - + v1.RollbackRequest = (function() { - + /** * Properties of a RollbackRequest. * @memberof google.firestore.v1 @@ -9994,7 +9994,7 @@ * @property {string|null} [database] RollbackRequest database * @property {Uint8Array|null} [transaction] RollbackRequest transaction */ - + /** * Constructs a new RollbackRequest. * @memberof google.firestore.v1 @@ -10009,7 +10009,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * RollbackRequest database. * @member {string} database @@ -10017,7 +10017,7 @@ * @instance */ RollbackRequest.prototype.database = ""; - + /** * RollbackRequest transaction. * @member {Uint8Array} transaction @@ -10025,7 +10025,7 @@ * @instance */ RollbackRequest.prototype.transaction = $util.newBuffer([]); - + /** * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10047,7 +10047,7 @@ message.transaction = object.transaction; return message; }; - + /** * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. * @function toObject @@ -10077,7 +10077,7 @@ object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; return object; }; - + /** * Converts this RollbackRequest to JSON. * @function toJSON @@ -10088,12 +10088,12 @@ RollbackRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return RollbackRequest; })(); - + v1.RunQueryRequest = (function() { - + /** * Properties of a RunQueryRequest. * @memberof google.firestore.v1 @@ -10104,7 +10104,7 @@ * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] RunQueryRequest newTransaction * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryRequest readTime */ - + /** * Constructs a new RunQueryRequest. * @memberof google.firestore.v1 @@ -10119,7 +10119,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * RunQueryRequest parent. * @member {string} parent @@ -10127,7 +10127,7 @@ * @instance */ RunQueryRequest.prototype.parent = ""; - + /** * RunQueryRequest structuredQuery. * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery @@ -10135,7 +10135,7 @@ * @instance */ RunQueryRequest.prototype.structuredQuery = null; - + /** * RunQueryRequest transaction. * @member {Uint8Array|null|undefined} transaction @@ -10143,7 +10143,7 @@ * @instance */ RunQueryRequest.prototype.transaction = null; - + /** * RunQueryRequest newTransaction. * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction @@ -10151,7 +10151,7 @@ * @instance */ RunQueryRequest.prototype.newTransaction = null; - + /** * RunQueryRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -10159,10 +10159,10 @@ * @instance */ RunQueryRequest.prototype.readTime = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * RunQueryRequest queryType. * @member {"structuredQuery"|undefined} queryType @@ -10173,7 +10173,7 @@ get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * RunQueryRequest consistencySelector. * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector @@ -10184,7 +10184,7 @@ get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a RunQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10221,7 +10221,7 @@ } return message; }; - + /** * Creates a plain object from a RunQueryRequest message. Also converts values to other types if specified. * @function toObject @@ -10261,7 +10261,7 @@ } return object; }; - + /** * Converts this RunQueryRequest to JSON. * @function toJSON @@ -10272,12 +10272,12 @@ RunQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return RunQueryRequest; })(); - + v1.RunQueryResponse = (function() { - + /** * Properties of a RunQueryResponse. * @memberof google.firestore.v1 @@ -10287,7 +10287,7 @@ * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryResponse readTime * @property {number|null} [skippedResults] RunQueryResponse skippedResults */ - + /** * Constructs a new RunQueryResponse. * @memberof google.firestore.v1 @@ -10302,7 +10302,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * RunQueryResponse transaction. * @member {Uint8Array} transaction @@ -10310,7 +10310,7 @@ * @instance */ RunQueryResponse.prototype.transaction = $util.newBuffer([]); - + /** * RunQueryResponse document. * @member {google.firestore.v1.IDocument|null|undefined} document @@ -10318,7 +10318,7 @@ * @instance */ RunQueryResponse.prototype.document = null; - + /** * RunQueryResponse readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -10326,7 +10326,7 @@ * @instance */ RunQueryResponse.prototype.readTime = null; - + /** * RunQueryResponse skippedResults. * @member {number} skippedResults @@ -10334,7 +10334,7 @@ * @instance */ RunQueryResponse.prototype.skippedResults = 0; - + /** * Creates a RunQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10366,7 +10366,7 @@ message.skippedResults = object.skippedResults | 0; return message; }; - + /** * Creates a plain object from a RunQueryResponse message. Also converts values to other types if specified. * @function toObject @@ -10402,7 +10402,7 @@ object.skippedResults = message.skippedResults; return object; }; - + /** * Converts this RunQueryResponse to JSON. * @function toJSON @@ -10413,12 +10413,12 @@ RunQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return RunQueryResponse; })(); - + v1.PartitionQueryRequest = (function() { - + /** * Properties of a PartitionQueryRequest. * @memberof google.firestore.v1 @@ -10429,7 +10429,7 @@ * @property {string|null} [pageToken] PartitionQueryRequest pageToken * @property {number|null} [pageSize] PartitionQueryRequest pageSize */ - + /** * Constructs a new PartitionQueryRequest. * @memberof google.firestore.v1 @@ -10444,7 +10444,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * PartitionQueryRequest parent. * @member {string} parent @@ -10452,7 +10452,7 @@ * @instance */ PartitionQueryRequest.prototype.parent = ""; - + /** * PartitionQueryRequest structuredQuery. * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery @@ -10460,7 +10460,7 @@ * @instance */ PartitionQueryRequest.prototype.structuredQuery = null; - + /** * PartitionQueryRequest partitionCount. * @member {number|string} partitionCount @@ -10468,7 +10468,7 @@ * @instance */ PartitionQueryRequest.prototype.partitionCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - + /** * PartitionQueryRequest pageToken. * @member {string} pageToken @@ -10476,7 +10476,7 @@ * @instance */ PartitionQueryRequest.prototype.pageToken = ""; - + /** * PartitionQueryRequest pageSize. * @member {number} pageSize @@ -10484,10 +10484,10 @@ * @instance */ PartitionQueryRequest.prototype.pageSize = 0; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * PartitionQueryRequest queryType. * @member {"structuredQuery"|undefined} queryType @@ -10498,7 +10498,7 @@ get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a PartitionQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10533,7 +10533,7 @@ message.pageSize = object.pageSize | 0; return message; }; - + /** * Creates a plain object from a PartitionQueryRequest message. Also converts values to other types if specified. * @function toObject @@ -10575,7 +10575,7 @@ object.pageSize = message.pageSize; return object; }; - + /** * Converts this PartitionQueryRequest to JSON. * @function toJSON @@ -10586,12 +10586,12 @@ PartitionQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return PartitionQueryRequest; })(); - + v1.PartitionQueryResponse = (function() { - + /** * Properties of a PartitionQueryResponse. * @memberof google.firestore.v1 @@ -10599,7 +10599,7 @@ * @property {Array.|null} [partitions] PartitionQueryResponse partitions * @property {string|null} [nextPageToken] PartitionQueryResponse nextPageToken */ - + /** * Constructs a new PartitionQueryResponse. * @memberof google.firestore.v1 @@ -10615,7 +10615,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * PartitionQueryResponse partitions. * @member {Array.} partitions @@ -10623,7 +10623,7 @@ * @instance */ PartitionQueryResponse.prototype.partitions = $util.emptyArray; - + /** * PartitionQueryResponse nextPageToken. * @member {string} nextPageToken @@ -10631,7 +10631,7 @@ * @instance */ PartitionQueryResponse.prototype.nextPageToken = ""; - + /** * Creates a PartitionQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10658,7 +10658,7 @@ message.nextPageToken = String(object.nextPageToken); return message; }; - + /** * Creates a plain object from a PartitionQueryResponse message. Also converts values to other types if specified. * @function toObject @@ -10685,7 +10685,7 @@ object.nextPageToken = message.nextPageToken; return object; }; - + /** * Converts this PartitionQueryResponse to JSON. * @function toJSON @@ -10696,12 +10696,12 @@ PartitionQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return PartitionQueryResponse; })(); - + v1.WriteRequest = (function() { - + /** * Properties of a WriteRequest. * @memberof google.firestore.v1 @@ -10712,7 +10712,7 @@ * @property {Uint8Array|null} [streamToken] WriteRequest streamToken * @property {Object.|null} [labels] WriteRequest labels */ - + /** * Constructs a new WriteRequest. * @memberof google.firestore.v1 @@ -10729,7 +10729,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * WriteRequest database. * @member {string} database @@ -10737,7 +10737,7 @@ * @instance */ WriteRequest.prototype.database = ""; - + /** * WriteRequest streamId. * @member {string} streamId @@ -10745,7 +10745,7 @@ * @instance */ WriteRequest.prototype.streamId = ""; - + /** * WriteRequest writes. * @member {Array.} writes @@ -10753,7 +10753,7 @@ * @instance */ WriteRequest.prototype.writes = $util.emptyArray; - + /** * WriteRequest streamToken. * @member {Uint8Array} streamToken @@ -10761,7 +10761,7 @@ * @instance */ WriteRequest.prototype.streamToken = $util.newBuffer([]); - + /** * WriteRequest labels. * @member {Object.} labels @@ -10769,7 +10769,7 @@ * @instance */ WriteRequest.prototype.labels = $util.emptyObject; - + /** * Creates a WriteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10810,7 +10810,7 @@ } return message; }; - + /** * Creates a plain object from a WriteRequest message. Also converts values to other types if specified. * @function toObject @@ -10858,7 +10858,7 @@ } return object; }; - + /** * Converts this WriteRequest to JSON. * @function toJSON @@ -10869,12 +10869,12 @@ WriteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return WriteRequest; })(); - + v1.WriteResponse = (function() { - + /** * Properties of a WriteResponse. * @memberof google.firestore.v1 @@ -10884,7 +10884,7 @@ * @property {Array.|null} [writeResults] WriteResponse writeResults * @property {google.protobuf.ITimestamp|null} [commitTime] WriteResponse commitTime */ - + /** * Constructs a new WriteResponse. * @memberof google.firestore.v1 @@ -10900,7 +10900,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * WriteResponse streamId. * @member {string} streamId @@ -10908,7 +10908,7 @@ * @instance */ WriteResponse.prototype.streamId = ""; - + /** * WriteResponse streamToken. * @member {Uint8Array} streamToken @@ -10916,7 +10916,7 @@ * @instance */ WriteResponse.prototype.streamToken = $util.newBuffer([]); - + /** * WriteResponse writeResults. * @member {Array.} writeResults @@ -10924,7 +10924,7 @@ * @instance */ WriteResponse.prototype.writeResults = $util.emptyArray; - + /** * WriteResponse commitTime. * @member {google.protobuf.ITimestamp|null|undefined} commitTime @@ -10932,7 +10932,7 @@ * @instance */ WriteResponse.prototype.commitTime = null; - + /** * Creates a WriteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -10969,7 +10969,7 @@ } return message; }; - + /** * Creates a plain object from a WriteResponse message. Also converts values to other types if specified. * @function toObject @@ -11009,7 +11009,7 @@ object.commitTime = $root.google.protobuf.Timestamp.toObject(message.commitTime, options); return object; }; - + /** * Converts this WriteResponse to JSON. * @function toJSON @@ -11020,12 +11020,12 @@ WriteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return WriteResponse; })(); - + v1.ListenRequest = (function() { - + /** * Properties of a ListenRequest. * @memberof google.firestore.v1 @@ -11035,7 +11035,7 @@ * @property {number|null} [removeTarget] ListenRequest removeTarget * @property {Object.|null} [labels] ListenRequest labels */ - + /** * Constructs a new ListenRequest. * @memberof google.firestore.v1 @@ -11051,7 +11051,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListenRequest database. * @member {string} database @@ -11059,7 +11059,7 @@ * @instance */ ListenRequest.prototype.database = ""; - + /** * ListenRequest addTarget. * @member {google.firestore.v1.ITarget|null|undefined} addTarget @@ -11067,7 +11067,7 @@ * @instance */ ListenRequest.prototype.addTarget = null; - + /** * ListenRequest removeTarget. * @member {number|null|undefined} removeTarget @@ -11075,7 +11075,7 @@ * @instance */ ListenRequest.prototype.removeTarget = null; - + /** * ListenRequest labels. * @member {Object.} labels @@ -11083,10 +11083,10 @@ * @instance */ ListenRequest.prototype.labels = $util.emptyObject; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * ListenRequest targetChange. * @member {"addTarget"|"removeTarget"|undefined} targetChange @@ -11097,7 +11097,7 @@ get: $util.oneOfGetter($oneOfFields = ["addTarget", "removeTarget"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a ListenRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11128,7 +11128,7 @@ } return message; }; - + /** * Creates a plain object from a ListenRequest message. Also converts values to other types if specified. * @function toObject @@ -11166,7 +11166,7 @@ } return object; }; - + /** * Converts this ListenRequest to JSON. * @function toJSON @@ -11177,12 +11177,12 @@ ListenRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListenRequest; })(); - + v1.ListenResponse = (function() { - + /** * Properties of a ListenResponse. * @memberof google.firestore.v1 @@ -11193,7 +11193,7 @@ * @property {google.firestore.v1.IDocumentRemove|null} [documentRemove] ListenResponse documentRemove * @property {google.firestore.v1.IExistenceFilter|null} [filter] ListenResponse filter */ - + /** * Constructs a new ListenResponse. * @memberof google.firestore.v1 @@ -11208,7 +11208,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListenResponse targetChange. * @member {google.firestore.v1.ITargetChange|null|undefined} targetChange @@ -11216,7 +11216,7 @@ * @instance */ ListenResponse.prototype.targetChange = null; - + /** * ListenResponse documentChange. * @member {google.firestore.v1.IDocumentChange|null|undefined} documentChange @@ -11224,7 +11224,7 @@ * @instance */ ListenResponse.prototype.documentChange = null; - + /** * ListenResponse documentDelete. * @member {google.firestore.v1.IDocumentDelete|null|undefined} documentDelete @@ -11232,7 +11232,7 @@ * @instance */ ListenResponse.prototype.documentDelete = null; - + /** * ListenResponse documentRemove. * @member {google.firestore.v1.IDocumentRemove|null|undefined} documentRemove @@ -11240,7 +11240,7 @@ * @instance */ ListenResponse.prototype.documentRemove = null; - + /** * ListenResponse filter. * @member {google.firestore.v1.IExistenceFilter|null|undefined} filter @@ -11248,10 +11248,10 @@ * @instance */ ListenResponse.prototype.filter = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * ListenResponse responseType. * @member {"targetChange"|"documentChange"|"documentDelete"|"documentRemove"|"filter"|undefined} responseType @@ -11262,7 +11262,7 @@ get: $util.oneOfGetter($oneOfFields = ["targetChange", "documentChange", "documentDelete", "documentRemove", "filter"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a ListenResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11302,7 +11302,7 @@ } return message; }; - + /** * Creates a plain object from a ListenResponse message. Also converts values to other types if specified. * @function toObject @@ -11343,7 +11343,7 @@ } return object; }; - + /** * Converts this ListenResponse to JSON. * @function toJSON @@ -11354,12 +11354,12 @@ ListenResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListenResponse; })(); - + v1.Target = (function() { - + /** * Properties of a Target. * @memberof google.firestore.v1 @@ -11371,7 +11371,7 @@ * @property {number|null} [targetId] Target targetId * @property {boolean|null} [once] Target once */ - + /** * Constructs a new Target. * @memberof google.firestore.v1 @@ -11386,7 +11386,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Target query. * @member {google.firestore.v1.Target.IQueryTarget|null|undefined} query @@ -11394,7 +11394,7 @@ * @instance */ Target.prototype.query = null; - + /** * Target documents. * @member {google.firestore.v1.Target.IDocumentsTarget|null|undefined} documents @@ -11402,7 +11402,7 @@ * @instance */ Target.prototype.documents = null; - + /** * Target resumeToken. * @member {Uint8Array|null|undefined} resumeToken @@ -11410,7 +11410,7 @@ * @instance */ Target.prototype.resumeToken = null; - + /** * Target readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -11418,7 +11418,7 @@ * @instance */ Target.prototype.readTime = null; - + /** * Target targetId. * @member {number} targetId @@ -11426,7 +11426,7 @@ * @instance */ Target.prototype.targetId = 0; - + /** * Target once. * @member {boolean} once @@ -11434,10 +11434,10 @@ * @instance */ Target.prototype.once = false; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Target targetType. * @member {"query"|"documents"|undefined} targetType @@ -11448,7 +11448,7 @@ get: $util.oneOfGetter($oneOfFields = ["query", "documents"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Target resumeType. * @member {"resumeToken"|"readTime"|undefined} resumeType @@ -11459,7 +11459,7 @@ get: $util.oneOfGetter($oneOfFields = ["resumeToken", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Target message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11498,7 +11498,7 @@ message.once = Boolean(object.once); return message; }; - + /** * Creates a plain object from a Target message. Also converts values to other types if specified. * @function toObject @@ -11542,7 +11542,7 @@ } return object; }; - + /** * Converts this Target to JSON. * @function toJSON @@ -11553,16 +11553,16 @@ Target.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + Target.DocumentsTarget = (function() { - + /** * Properties of a DocumentsTarget. * @memberof google.firestore.v1.Target * @interface IDocumentsTarget * @property {Array.|null} [documents] DocumentsTarget documents */ - + /** * Constructs a new DocumentsTarget. * @memberof google.firestore.v1.Target @@ -11578,7 +11578,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentsTarget documents. * @member {Array.} documents @@ -11586,7 +11586,7 @@ * @instance */ DocumentsTarget.prototype.documents = $util.emptyArray; - + /** * Creates a DocumentsTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11608,7 +11608,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentsTarget message. Also converts values to other types if specified. * @function toObject @@ -11631,7 +11631,7 @@ } return object; }; - + /** * Converts this DocumentsTarget to JSON. * @function toJSON @@ -11642,12 +11642,12 @@ DocumentsTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DocumentsTarget; })(); - + Target.QueryTarget = (function() { - + /** * Properties of a QueryTarget. * @memberof google.firestore.v1.Target @@ -11655,7 +11655,7 @@ * @property {string|null} [parent] QueryTarget parent * @property {google.firestore.v1.IStructuredQuery|null} [structuredQuery] QueryTarget structuredQuery */ - + /** * Constructs a new QueryTarget. * @memberof google.firestore.v1.Target @@ -11670,7 +11670,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * QueryTarget parent. * @member {string} parent @@ -11678,7 +11678,7 @@ * @instance */ QueryTarget.prototype.parent = ""; - + /** * QueryTarget structuredQuery. * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery @@ -11686,10 +11686,10 @@ * @instance */ QueryTarget.prototype.structuredQuery = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * QueryTarget queryType. * @member {"structuredQuery"|undefined} queryType @@ -11700,7 +11700,7 @@ get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a QueryTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11722,7 +11722,7 @@ } return message; }; - + /** * Creates a plain object from a QueryTarget message. Also converts values to other types if specified. * @function toObject @@ -11747,7 +11747,7 @@ } return object; }; - + /** * Converts this QueryTarget to JSON. * @function toJSON @@ -11758,15 +11758,15 @@ QueryTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return QueryTarget; })(); - + return Target; })(); - + v1.TargetChange = (function() { - + /** * Properties of a TargetChange. * @memberof google.firestore.v1 @@ -11777,7 +11777,7 @@ * @property {Uint8Array|null} [resumeToken] TargetChange resumeToken * @property {google.protobuf.ITimestamp|null} [readTime] TargetChange readTime */ - + /** * Constructs a new TargetChange. * @memberof google.firestore.v1 @@ -11793,7 +11793,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * TargetChange targetChangeType. * @member {google.firestore.v1.TargetChange.TargetChangeType} targetChangeType @@ -11801,7 +11801,7 @@ * @instance */ TargetChange.prototype.targetChangeType = 0; - + /** * TargetChange targetIds. * @member {Array.} targetIds @@ -11809,7 +11809,7 @@ * @instance */ TargetChange.prototype.targetIds = $util.emptyArray; - + /** * TargetChange cause. * @member {google.rpc.IStatus|null|undefined} cause @@ -11817,7 +11817,7 @@ * @instance */ TargetChange.prototype.cause = null; - + /** * TargetChange resumeToken. * @member {Uint8Array} resumeToken @@ -11825,7 +11825,7 @@ * @instance */ TargetChange.prototype.resumeToken = $util.newBuffer([]); - + /** * TargetChange readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -11833,7 +11833,7 @@ * @instance */ TargetChange.prototype.readTime = null; - + /** * Creates a TargetChange message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -11892,7 +11892,7 @@ } return message; }; - + /** * Creates a plain object from a TargetChange message. Also converts values to other types if specified. * @function toObject @@ -11935,7 +11935,7 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; - + /** * Converts this TargetChange to JSON. * @function toJSON @@ -11946,7 +11946,7 @@ TargetChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * TargetChangeType enum. * @name google.firestore.v1.TargetChange.TargetChangeType @@ -11966,12 +11966,12 @@ values[valuesById[4] = "RESET"] = "RESET"; return values; })(); - + return TargetChange; })(); - + v1.ListCollectionIdsRequest = (function() { - + /** * Properties of a ListCollectionIdsRequest. * @memberof google.firestore.v1 @@ -11980,7 +11980,7 @@ * @property {number|null} [pageSize] ListCollectionIdsRequest pageSize * @property {string|null} [pageToken] ListCollectionIdsRequest pageToken */ - + /** * Constructs a new ListCollectionIdsRequest. * @memberof google.firestore.v1 @@ -11995,7 +11995,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListCollectionIdsRequest parent. * @member {string} parent @@ -12003,7 +12003,7 @@ * @instance */ ListCollectionIdsRequest.prototype.parent = ""; - + /** * ListCollectionIdsRequest pageSize. * @member {number} pageSize @@ -12011,7 +12011,7 @@ * @instance */ ListCollectionIdsRequest.prototype.pageSize = 0; - + /** * ListCollectionIdsRequest pageToken. * @member {string} pageToken @@ -12019,7 +12019,7 @@ * @instance */ ListCollectionIdsRequest.prototype.pageToken = ""; - + /** * Creates a ListCollectionIdsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12040,7 +12040,7 @@ message.pageToken = String(object.pageToken); return message; }; - + /** * Creates a plain object from a ListCollectionIdsRequest message. Also converts values to other types if specified. * @function toObject @@ -12067,7 +12067,7 @@ object.pageToken = message.pageToken; return object; }; - + /** * Converts this ListCollectionIdsRequest to JSON. * @function toJSON @@ -12078,12 +12078,12 @@ ListCollectionIdsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListCollectionIdsRequest; })(); - + v1.ListCollectionIdsResponse = (function() { - + /** * Properties of a ListCollectionIdsResponse. * @memberof google.firestore.v1 @@ -12091,7 +12091,7 @@ * @property {Array.|null} [collectionIds] ListCollectionIdsResponse collectionIds * @property {string|null} [nextPageToken] ListCollectionIdsResponse nextPageToken */ - + /** * Constructs a new ListCollectionIdsResponse. * @memberof google.firestore.v1 @@ -12107,7 +12107,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListCollectionIdsResponse collectionIds. * @member {Array.} collectionIds @@ -12115,7 +12115,7 @@ * @instance */ ListCollectionIdsResponse.prototype.collectionIds = $util.emptyArray; - + /** * ListCollectionIdsResponse nextPageToken. * @member {string} nextPageToken @@ -12123,7 +12123,7 @@ * @instance */ ListCollectionIdsResponse.prototype.nextPageToken = ""; - + /** * Creates a ListCollectionIdsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12147,7 +12147,7 @@ message.nextPageToken = String(object.nextPageToken); return message; }; - + /** * Creates a plain object from a ListCollectionIdsResponse message. Also converts values to other types if specified. * @function toObject @@ -12174,7 +12174,7 @@ object.nextPageToken = message.nextPageToken; return object; }; - + /** * Converts this ListCollectionIdsResponse to JSON. * @function toJSON @@ -12185,12 +12185,12 @@ ListCollectionIdsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListCollectionIdsResponse; })(); - + v1.BatchWriteRequest = (function() { - + /** * Properties of a BatchWriteRequest. * @memberof google.firestore.v1 @@ -12199,7 +12199,7 @@ * @property {Array.|null} [writes] BatchWriteRequest writes * @property {Object.|null} [labels] BatchWriteRequest labels */ - + /** * Constructs a new BatchWriteRequest. * @memberof google.firestore.v1 @@ -12216,7 +12216,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BatchWriteRequest database. * @member {string} database @@ -12224,7 +12224,7 @@ * @instance */ BatchWriteRequest.prototype.database = ""; - + /** * BatchWriteRequest writes. * @member {Array.} writes @@ -12232,7 +12232,7 @@ * @instance */ BatchWriteRequest.prototype.writes = $util.emptyArray; - + /** * BatchWriteRequest labels. * @member {Object.} labels @@ -12240,7 +12240,7 @@ * @instance */ BatchWriteRequest.prototype.labels = $util.emptyObject; - + /** * Creates a BatchWriteRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12274,7 +12274,7 @@ } return message; }; - + /** * Creates a plain object from a BatchWriteRequest message. Also converts values to other types if specified. * @function toObject @@ -12309,7 +12309,7 @@ } return object; }; - + /** * Converts this BatchWriteRequest to JSON. * @function toJSON @@ -12320,12 +12320,12 @@ BatchWriteRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BatchWriteRequest; })(); - + v1.BatchWriteResponse = (function() { - + /** * Properties of a BatchWriteResponse. * @memberof google.firestore.v1 @@ -12333,7 +12333,7 @@ * @property {Array.|null} [writeResults] BatchWriteResponse writeResults * @property {Array.|null} [status] BatchWriteResponse status */ - + /** * Constructs a new BatchWriteResponse. * @memberof google.firestore.v1 @@ -12350,7 +12350,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * BatchWriteResponse writeResults. * @member {Array.} writeResults @@ -12358,7 +12358,7 @@ * @instance */ BatchWriteResponse.prototype.writeResults = $util.emptyArray; - + /** * BatchWriteResponse status. * @member {Array.} status @@ -12366,7 +12366,7 @@ * @instance */ BatchWriteResponse.prototype.status = $util.emptyArray; - + /** * Creates a BatchWriteResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12401,7 +12401,7 @@ } return message; }; - + /** * Creates a plain object from a BatchWriteResponse message. Also converts values to other types if specified. * @function toObject @@ -12431,7 +12431,7 @@ } return object; }; - + /** * Converts this BatchWriteResponse to JSON. * @function toJSON @@ -12442,12 +12442,12 @@ BatchWriteResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return BatchWriteResponse; })(); - + v1.StructuredQuery = (function() { - + /** * Properties of a StructuredQuery. * @memberof google.firestore.v1 @@ -12461,7 +12461,7 @@ * @property {number|null} [offset] StructuredQuery offset * @property {google.protobuf.IInt32Value|null} [limit] StructuredQuery limit */ - + /** * Constructs a new StructuredQuery. * @memberof google.firestore.v1 @@ -12478,7 +12478,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * StructuredQuery select. * @member {google.firestore.v1.StructuredQuery.IProjection|null|undefined} select @@ -12486,7 +12486,7 @@ * @instance */ StructuredQuery.prototype.select = null; - + /** * StructuredQuery from. * @member {Array.} from @@ -12494,7 +12494,7 @@ * @instance */ StructuredQuery.prototype.from = $util.emptyArray; - + /** * StructuredQuery where. * @member {google.firestore.v1.StructuredQuery.IFilter|null|undefined} where @@ -12502,7 +12502,7 @@ * @instance */ StructuredQuery.prototype.where = null; - + /** * StructuredQuery orderBy. * @member {Array.} orderBy @@ -12510,7 +12510,7 @@ * @instance */ StructuredQuery.prototype.orderBy = $util.emptyArray; - + /** * StructuredQuery startAt. * @member {google.firestore.v1.ICursor|null|undefined} startAt @@ -12518,7 +12518,7 @@ * @instance */ StructuredQuery.prototype.startAt = null; - + /** * StructuredQuery endAt. * @member {google.firestore.v1.ICursor|null|undefined} endAt @@ -12526,7 +12526,7 @@ * @instance */ StructuredQuery.prototype.endAt = null; - + /** * StructuredQuery offset. * @member {number} offset @@ -12534,7 +12534,7 @@ * @instance */ StructuredQuery.prototype.offset = 0; - + /** * StructuredQuery limit. * @member {google.protobuf.IInt32Value|null|undefined} limit @@ -12542,7 +12542,7 @@ * @instance */ StructuredQuery.prototype.limit = null; - + /** * Creates a StructuredQuery message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12604,7 +12604,7 @@ } return message; }; - + /** * Creates a plain object from a StructuredQuery message. Also converts values to other types if specified. * @function toObject @@ -12654,7 +12654,7 @@ object.endAt = $root.google.firestore.v1.Cursor.toObject(message.endAt, options); return object; }; - + /** * Converts this StructuredQuery to JSON. * @function toJSON @@ -12665,9 +12665,9 @@ StructuredQuery.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + StructuredQuery.CollectionSelector = (function() { - + /** * Properties of a CollectionSelector. * @memberof google.firestore.v1.StructuredQuery @@ -12675,7 +12675,7 @@ * @property {string|null} [collectionId] CollectionSelector collectionId * @property {boolean|null} [allDescendants] CollectionSelector allDescendants */ - + /** * Constructs a new CollectionSelector. * @memberof google.firestore.v1.StructuredQuery @@ -12690,7 +12690,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CollectionSelector collectionId. * @member {string} collectionId @@ -12698,7 +12698,7 @@ * @instance */ CollectionSelector.prototype.collectionId = ""; - + /** * CollectionSelector allDescendants. * @member {boolean} allDescendants @@ -12706,7 +12706,7 @@ * @instance */ CollectionSelector.prototype.allDescendants = false; - + /** * Creates a CollectionSelector message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12725,7 +12725,7 @@ message.allDescendants = Boolean(object.allDescendants); return message; }; - + /** * Creates a plain object from a CollectionSelector message. Also converts values to other types if specified. * @function toObject @@ -12749,7 +12749,7 @@ object.allDescendants = message.allDescendants; return object; }; - + /** * Converts this CollectionSelector to JSON. * @function toJSON @@ -12760,12 +12760,12 @@ CollectionSelector.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CollectionSelector; })(); - + StructuredQuery.Filter = (function() { - + /** * Properties of a Filter. * @memberof google.firestore.v1.StructuredQuery @@ -12774,7 +12774,7 @@ * @property {google.firestore.v1.StructuredQuery.IFieldFilter|null} [fieldFilter] Filter fieldFilter * @property {google.firestore.v1.StructuredQuery.IUnaryFilter|null} [unaryFilter] Filter unaryFilter */ - + /** * Constructs a new Filter. * @memberof google.firestore.v1.StructuredQuery @@ -12789,7 +12789,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Filter compositeFilter. * @member {google.firestore.v1.StructuredQuery.ICompositeFilter|null|undefined} compositeFilter @@ -12797,7 +12797,7 @@ * @instance */ Filter.prototype.compositeFilter = null; - + /** * Filter fieldFilter. * @member {google.firestore.v1.StructuredQuery.IFieldFilter|null|undefined} fieldFilter @@ -12805,7 +12805,7 @@ * @instance */ Filter.prototype.fieldFilter = null; - + /** * Filter unaryFilter. * @member {google.firestore.v1.StructuredQuery.IUnaryFilter|null|undefined} unaryFilter @@ -12813,10 +12813,10 @@ * @instance */ Filter.prototype.unaryFilter = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Filter filterType. * @member {"compositeFilter"|"fieldFilter"|"unaryFilter"|undefined} filterType @@ -12827,7 +12827,7 @@ get: $util.oneOfGetter($oneOfFields = ["compositeFilter", "fieldFilter", "unaryFilter"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Filter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12857,7 +12857,7 @@ } return message; }; - + /** * Creates a plain object from a Filter message. Also converts values to other types if specified. * @function toObject @@ -12888,7 +12888,7 @@ } return object; }; - + /** * Converts this Filter to JSON. * @function toJSON @@ -12899,12 +12899,12 @@ Filter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Filter; })(); - + StructuredQuery.CompositeFilter = (function() { - + /** * Properties of a CompositeFilter. * @memberof google.firestore.v1.StructuredQuery @@ -12912,7 +12912,7 @@ * @property {google.firestore.v1.StructuredQuery.CompositeFilter.Operator|null} [op] CompositeFilter op * @property {Array.|null} [filters] CompositeFilter filters */ - + /** * Constructs a new CompositeFilter. * @memberof google.firestore.v1.StructuredQuery @@ -12928,7 +12928,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CompositeFilter op. * @member {google.firestore.v1.StructuredQuery.CompositeFilter.Operator} op @@ -12936,7 +12936,7 @@ * @instance */ CompositeFilter.prototype.op = 0; - + /** * CompositeFilter filters. * @member {Array.} filters @@ -12944,7 +12944,7 @@ * @instance */ CompositeFilter.prototype.filters = $util.emptyArray; - + /** * Creates a CompositeFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -12979,7 +12979,7 @@ } return message; }; - + /** * Creates a plain object from a CompositeFilter message. Also converts values to other types if specified. * @function toObject @@ -13006,7 +13006,7 @@ } return object; }; - + /** * Converts this CompositeFilter to JSON. * @function toJSON @@ -13017,7 +13017,7 @@ CompositeFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.CompositeFilter.Operator @@ -13031,12 +13031,12 @@ values[valuesById[1] = "AND"] = "AND"; return values; })(); - + return CompositeFilter; })(); - + StructuredQuery.FieldFilter = (function() { - + /** * Properties of a FieldFilter. * @memberof google.firestore.v1.StructuredQuery @@ -13045,7 +13045,7 @@ * @property {google.firestore.v1.StructuredQuery.FieldFilter.Operator|null} [op] FieldFilter op * @property {google.firestore.v1.IValue|null} [value] FieldFilter value */ - + /** * Constructs a new FieldFilter. * @memberof google.firestore.v1.StructuredQuery @@ -13060,7 +13060,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldFilter field. * @member {google.firestore.v1.StructuredQuery.IFieldReference|null|undefined} field @@ -13068,7 +13068,7 @@ * @instance */ FieldFilter.prototype.field = null; - + /** * FieldFilter op. * @member {google.firestore.v1.StructuredQuery.FieldFilter.Operator} op @@ -13076,7 +13076,7 @@ * @instance */ FieldFilter.prototype.op = 0; - + /** * FieldFilter value. * @member {google.firestore.v1.IValue|null|undefined} value @@ -13084,7 +13084,7 @@ * @instance */ FieldFilter.prototype.value = null; - + /** * Creates a FieldFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13155,7 +13155,7 @@ } return message; }; - + /** * Creates a plain object from a FieldFilter message. Also converts values to other types if specified. * @function toObject @@ -13182,7 +13182,7 @@ object.value = $root.google.firestore.v1.Value.toObject(message.value, options); return object; }; - + /** * Converts this FieldFilter to JSON. * @function toJSON @@ -13193,7 +13193,7 @@ FieldFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.FieldFilter.Operator @@ -13225,12 +13225,12 @@ values[valuesById[10] = "NOT_IN"] = "NOT_IN"; return values; })(); - + return FieldFilter; })(); - + StructuredQuery.UnaryFilter = (function() { - + /** * Properties of an UnaryFilter. * @memberof google.firestore.v1.StructuredQuery @@ -13238,7 +13238,7 @@ * @property {google.firestore.v1.StructuredQuery.UnaryFilter.Operator|null} [op] UnaryFilter op * @property {google.firestore.v1.StructuredQuery.IFieldReference|null} [field] UnaryFilter field */ - + /** * Constructs a new UnaryFilter. * @memberof google.firestore.v1.StructuredQuery @@ -13253,7 +13253,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * UnaryFilter op. * @member {google.firestore.v1.StructuredQuery.UnaryFilter.Operator} op @@ -13261,7 +13261,7 @@ * @instance */ UnaryFilter.prototype.op = 0; - + /** * UnaryFilter field. * @member {google.firestore.v1.StructuredQuery.IFieldReference|null|undefined} field @@ -13269,10 +13269,10 @@ * @instance */ UnaryFilter.prototype.field = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * UnaryFilter operandType. * @member {"field"|undefined} operandType @@ -13283,7 +13283,7 @@ get: $util.oneOfGetter($oneOfFields = ["field"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates an UnaryFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13325,7 +13325,7 @@ } return message; }; - + /** * Creates a plain object from an UnaryFilter message. Also converts values to other types if specified. * @function toObject @@ -13350,7 +13350,7 @@ } return object; }; - + /** * Converts this UnaryFilter to JSON. * @function toJSON @@ -13361,7 +13361,7 @@ UnaryFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.UnaryFilter.Operator @@ -13381,12 +13381,12 @@ values[valuesById[5] = "IS_NOT_NULL"] = "IS_NOT_NULL"; return values; })(); - + return UnaryFilter; })(); - + StructuredQuery.Order = (function() { - + /** * Properties of an Order. * @memberof google.firestore.v1.StructuredQuery @@ -13394,7 +13394,7 @@ * @property {google.firestore.v1.StructuredQuery.IFieldReference|null} [field] Order field * @property {google.firestore.v1.StructuredQuery.Direction|null} [direction] Order direction */ - + /** * Constructs a new Order. * @memberof google.firestore.v1.StructuredQuery @@ -13409,7 +13409,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Order field. * @member {google.firestore.v1.StructuredQuery.IFieldReference|null|undefined} field @@ -13417,7 +13417,7 @@ * @instance */ Order.prototype.field = null; - + /** * Order direction. * @member {google.firestore.v1.StructuredQuery.Direction} direction @@ -13425,7 +13425,7 @@ * @instance */ Order.prototype.direction = 0; - + /** * Creates an Order message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13459,7 +13459,7 @@ } return message; }; - + /** * Creates a plain object from an Order message. Also converts values to other types if specified. * @function toObject @@ -13483,7 +13483,7 @@ object.direction = options.enums === String ? $root.google.firestore.v1.StructuredQuery.Direction[message.direction] : message.direction; return object; }; - + /** * Converts this Order to JSON. * @function toJSON @@ -13494,19 +13494,19 @@ Order.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Order; })(); - + StructuredQuery.FieldReference = (function() { - + /** * Properties of a FieldReference. * @memberof google.firestore.v1.StructuredQuery * @interface IFieldReference * @property {string|null} [fieldPath] FieldReference fieldPath */ - + /** * Constructs a new FieldReference. * @memberof google.firestore.v1.StructuredQuery @@ -13521,7 +13521,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldReference fieldPath. * @member {string} fieldPath @@ -13529,7 +13529,7 @@ * @instance */ FieldReference.prototype.fieldPath = ""; - + /** * Creates a FieldReference message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13546,7 +13546,7 @@ message.fieldPath = String(object.fieldPath); return message; }; - + /** * Creates a plain object from a FieldReference message. Also converts values to other types if specified. * @function toObject @@ -13566,7 +13566,7 @@ object.fieldPath = message.fieldPath; return object; }; - + /** * Converts this FieldReference to JSON. * @function toJSON @@ -13577,19 +13577,19 @@ FieldReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return FieldReference; })(); - + StructuredQuery.Projection = (function() { - + /** * Properties of a Projection. * @memberof google.firestore.v1.StructuredQuery * @interface IProjection * @property {Array.|null} [fields] Projection fields */ - + /** * Constructs a new Projection. * @memberof google.firestore.v1.StructuredQuery @@ -13605,7 +13605,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Projection fields. * @member {Array.} fields @@ -13613,7 +13613,7 @@ * @instance */ Projection.prototype.fields = $util.emptyArray; - + /** * Creates a Projection message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13638,7 +13638,7 @@ } return message; }; - + /** * Creates a plain object from a Projection message. Also converts values to other types if specified. * @function toObject @@ -13661,7 +13661,7 @@ } return object; }; - + /** * Converts this Projection to JSON. * @function toJSON @@ -13672,10 +13672,10 @@ Projection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Projection; })(); - + /** * Direction enum. * @name google.firestore.v1.StructuredQuery.Direction @@ -13691,12 +13691,12 @@ values[valuesById[2] = "DESCENDING"] = "DESCENDING"; return values; })(); - + return StructuredQuery; })(); - + v1.Cursor = (function() { - + /** * Properties of a Cursor. * @memberof google.firestore.v1 @@ -13704,7 +13704,7 @@ * @property {Array.|null} [values] Cursor values * @property {boolean|null} [before] Cursor before */ - + /** * Constructs a new Cursor. * @memberof google.firestore.v1 @@ -13720,7 +13720,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Cursor values. * @member {Array.} values @@ -13728,7 +13728,7 @@ * @instance */ Cursor.prototype.values = $util.emptyArray; - + /** * Cursor before. * @member {boolean} before @@ -13736,7 +13736,7 @@ * @instance */ Cursor.prototype.before = false; - + /** * Creates a Cursor message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13763,7 +13763,7 @@ message.before = Boolean(object.before); return message; }; - + /** * Creates a plain object from a Cursor message. Also converts values to other types if specified. * @function toObject @@ -13790,7 +13790,7 @@ object.before = message.before; return object; }; - + /** * Converts this Cursor to JSON. * @function toJSON @@ -13801,24 +13801,25 @@ Cursor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Cursor; })(); - + v1.Write = (function() { - + /** * Properties of a Write. * @memberof google.firestore.v1 * @interface IWrite * @property {google.firestore.v1.IDocument|null} [update] Write update * @property {string|null} ["delete"] Write delete + * @property {string|null} [verify] Write verify * @property {google.firestore.v1.IDocumentTransform|null} [transform] Write transform * @property {google.firestore.v1.IDocumentMask|null} [updateMask] Write updateMask * @property {Array.|null} [updateTransforms] Write updateTransforms * @property {google.firestore.v1.IPrecondition|null} [currentDocument] Write currentDocument */ - + /** * Constructs a new Write. * @memberof google.firestore.v1 @@ -13834,7 +13835,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Write update. * @member {google.firestore.v1.IDocument|null|undefined} update @@ -13842,7 +13843,7 @@ * @instance */ Write.prototype.update = null; - + /** * Write delete. * @member {string|null|undefined} delete @@ -13850,7 +13851,15 @@ * @instance */ Write.prototype["delete"] = null; - + + /** + * Write verify. + * @member {string|null|undefined} verify + * @memberof google.firestore.v1.Write + * @instance + */ + Write.prototype.verify = null; + /** * Write transform. * @member {google.firestore.v1.IDocumentTransform|null|undefined} transform @@ -13858,7 +13867,7 @@ * @instance */ Write.prototype.transform = null; - + /** * Write updateMask. * @member {google.firestore.v1.IDocumentMask|null|undefined} updateMask @@ -13866,7 +13875,7 @@ * @instance */ Write.prototype.updateMask = null; - + /** * Write updateTransforms. * @member {Array.} updateTransforms @@ -13874,7 +13883,7 @@ * @instance */ Write.prototype.updateTransforms = $util.emptyArray; - + /** * Write currentDocument. * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument @@ -13882,21 +13891,21 @@ * @instance */ Write.prototype.currentDocument = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Write operation. - * @member {"update"|"delete"|"transform"|undefined} operation + * @member {"update"|"delete"|"verify"|"transform"|undefined} operation * @memberof google.firestore.v1.Write * @instance */ Object.defineProperty(Write.prototype, "operation", { - get: $util.oneOfGetter($oneOfFields = ["update", "delete", "transform"]), + get: $util.oneOfGetter($oneOfFields = ["update", "delete", "verify", "transform"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a Write message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -13916,6 +13925,8 @@ } if (object["delete"] != null) message["delete"] = String(object["delete"]); + if (object.verify != null) + message.verify = String(object.verify); if (object.transform != null) { if (typeof object.transform !== "object") throw TypeError(".google.firestore.v1.Write.transform: object expected"); @@ -13943,7 +13954,7 @@ } return message; }; - + /** * Creates a plain object from a Write message. Also converts values to other types if specified. * @function toObject @@ -13977,6 +13988,11 @@ object.updateMask = $root.google.firestore.v1.DocumentMask.toObject(message.updateMask, options); if (message.currentDocument != null && message.hasOwnProperty("currentDocument")) object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); + if (message.verify != null && message.hasOwnProperty("verify")) { + object.verify = message.verify; + if (options.oneofs) + object.operation = "verify"; + } if (message.transform != null && message.hasOwnProperty("transform")) { object.transform = $root.google.firestore.v1.DocumentTransform.toObject(message.transform, options); if (options.oneofs) @@ -13989,7 +14005,7 @@ } return object; }; - + /** * Converts this Write to JSON. * @function toJSON @@ -14000,12 +14016,12 @@ Write.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Write; })(); - + v1.DocumentTransform = (function() { - + /** * Properties of a DocumentTransform. * @memberof google.firestore.v1 @@ -14013,7 +14029,7 @@ * @property {string|null} [document] DocumentTransform document * @property {Array.|null} [fieldTransforms] DocumentTransform fieldTransforms */ - + /** * Constructs a new DocumentTransform. * @memberof google.firestore.v1 @@ -14029,7 +14045,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentTransform document. * @member {string} document @@ -14037,7 +14053,7 @@ * @instance */ DocumentTransform.prototype.document = ""; - + /** * DocumentTransform fieldTransforms. * @member {Array.} fieldTransforms @@ -14045,7 +14061,7 @@ * @instance */ DocumentTransform.prototype.fieldTransforms = $util.emptyArray; - + /** * Creates a DocumentTransform message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14072,7 +14088,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentTransform message. Also converts values to other types if specified. * @function toObject @@ -14099,7 +14115,7 @@ } return object; }; - + /** * Converts this DocumentTransform to JSON. * @function toJSON @@ -14110,9 +14126,9 @@ DocumentTransform.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + DocumentTransform.FieldTransform = (function() { - + /** * Properties of a FieldTransform. * @memberof google.firestore.v1.DocumentTransform @@ -14125,7 +14141,7 @@ * @property {google.firestore.v1.IArrayValue|null} [appendMissingElements] FieldTransform appendMissingElements * @property {google.firestore.v1.IArrayValue|null} [removeAllFromArray] FieldTransform removeAllFromArray */ - + /** * Constructs a new FieldTransform. * @memberof google.firestore.v1.DocumentTransform @@ -14140,7 +14156,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * FieldTransform fieldPath. * @member {string} fieldPath @@ -14148,7 +14164,7 @@ * @instance */ FieldTransform.prototype.fieldPath = ""; - + /** * FieldTransform setToServerValue. * @member {google.firestore.v1.DocumentTransform.FieldTransform.ServerValue|null|undefined} setToServerValue @@ -14156,7 +14172,7 @@ * @instance */ FieldTransform.prototype.setToServerValue = null; - + /** * FieldTransform increment. * @member {google.firestore.v1.IValue|null|undefined} increment @@ -14164,7 +14180,7 @@ * @instance */ FieldTransform.prototype.increment = null; - + /** * FieldTransform maximum. * @member {google.firestore.v1.IValue|null|undefined} maximum @@ -14172,7 +14188,7 @@ * @instance */ FieldTransform.prototype.maximum = null; - + /** * FieldTransform minimum. * @member {google.firestore.v1.IValue|null|undefined} minimum @@ -14180,7 +14196,7 @@ * @instance */ FieldTransform.prototype.minimum = null; - + /** * FieldTransform appendMissingElements. * @member {google.firestore.v1.IArrayValue|null|undefined} appendMissingElements @@ -14188,7 +14204,7 @@ * @instance */ FieldTransform.prototype.appendMissingElements = null; - + /** * FieldTransform removeAllFromArray. * @member {google.firestore.v1.IArrayValue|null|undefined} removeAllFromArray @@ -14196,10 +14212,10 @@ * @instance */ FieldTransform.prototype.removeAllFromArray = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * FieldTransform transformType. * @member {"setToServerValue"|"increment"|"maximum"|"minimum"|"appendMissingElements"|"removeAllFromArray"|undefined} transformType @@ -14210,7 +14226,7 @@ get: $util.oneOfGetter($oneOfFields = ["setToServerValue", "increment", "maximum", "minimum", "appendMissingElements", "removeAllFromArray"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a FieldTransform message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14262,7 +14278,7 @@ } return message; }; - + /** * Creates a plain object from a FieldTransform message. Also converts values to other types if specified. * @function toObject @@ -14312,7 +14328,7 @@ } return object; }; - + /** * Converts this FieldTransform to JSON. * @function toJSON @@ -14323,7 +14339,7 @@ FieldTransform.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * ServerValue enum. * @name google.firestore.v1.DocumentTransform.FieldTransform.ServerValue @@ -14337,15 +14353,15 @@ values[valuesById[1] = "REQUEST_TIME"] = "REQUEST_TIME"; return values; })(); - + return FieldTransform; })(); - + return DocumentTransform; })(); - + v1.WriteResult = (function() { - + /** * Properties of a WriteResult. * @memberof google.firestore.v1 @@ -14353,7 +14369,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] WriteResult updateTime * @property {Array.|null} [transformResults] WriteResult transformResults */ - + /** * Constructs a new WriteResult. * @memberof google.firestore.v1 @@ -14369,7 +14385,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * WriteResult updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime @@ -14377,7 +14393,7 @@ * @instance */ WriteResult.prototype.updateTime = null; - + /** * WriteResult transformResults. * @member {Array.} transformResults @@ -14385,7 +14401,7 @@ * @instance */ WriteResult.prototype.transformResults = $util.emptyArray; - + /** * Creates a WriteResult message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14415,7 +14431,7 @@ } return message; }; - + /** * Creates a plain object from a WriteResult message. Also converts values to other types if specified. * @function toObject @@ -14442,7 +14458,7 @@ } return object; }; - + /** * Converts this WriteResult to JSON. * @function toJSON @@ -14453,12 +14469,12 @@ WriteResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return WriteResult; })(); - + v1.DocumentChange = (function() { - + /** * Properties of a DocumentChange. * @memberof google.firestore.v1 @@ -14467,7 +14483,7 @@ * @property {Array.|null} [targetIds] DocumentChange targetIds * @property {Array.|null} [removedTargetIds] DocumentChange removedTargetIds */ - + /** * Constructs a new DocumentChange. * @memberof google.firestore.v1 @@ -14484,7 +14500,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentChange document. * @member {google.firestore.v1.IDocument|null|undefined} document @@ -14492,7 +14508,7 @@ * @instance */ DocumentChange.prototype.document = null; - + /** * DocumentChange targetIds. * @member {Array.} targetIds @@ -14500,7 +14516,7 @@ * @instance */ DocumentChange.prototype.targetIds = $util.emptyArray; - + /** * DocumentChange removedTargetIds. * @member {Array.} removedTargetIds @@ -14508,7 +14524,7 @@ * @instance */ DocumentChange.prototype.removedTargetIds = $util.emptyArray; - + /** * Creates a DocumentChange message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14542,7 +14558,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentChange message. Also converts values to other types if specified. * @function toObject @@ -14576,7 +14592,7 @@ } return object; }; - + /** * Converts this DocumentChange to JSON. * @function toJSON @@ -14587,12 +14603,12 @@ DocumentChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DocumentChange; })(); - + v1.DocumentDelete = (function() { - + /** * Properties of a DocumentDelete. * @memberof google.firestore.v1 @@ -14601,7 +14617,7 @@ * @property {Array.|null} [removedTargetIds] DocumentDelete removedTargetIds * @property {google.protobuf.ITimestamp|null} [readTime] DocumentDelete readTime */ - + /** * Constructs a new DocumentDelete. * @memberof google.firestore.v1 @@ -14617,7 +14633,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentDelete document. * @member {string} document @@ -14625,7 +14641,7 @@ * @instance */ DocumentDelete.prototype.document = ""; - + /** * DocumentDelete removedTargetIds. * @member {Array.} removedTargetIds @@ -14633,7 +14649,7 @@ * @instance */ DocumentDelete.prototype.removedTargetIds = $util.emptyArray; - + /** * DocumentDelete readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -14641,7 +14657,7 @@ * @instance */ DocumentDelete.prototype.readTime = null; - + /** * Creates a DocumentDelete message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14670,7 +14686,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentDelete message. Also converts values to other types if specified. * @function toObject @@ -14701,7 +14717,7 @@ } return object; }; - + /** * Converts this DocumentDelete to JSON. * @function toJSON @@ -14712,12 +14728,12 @@ DocumentDelete.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DocumentDelete; })(); - + v1.DocumentRemove = (function() { - + /** * Properties of a DocumentRemove. * @memberof google.firestore.v1 @@ -14726,7 +14742,7 @@ * @property {Array.|null} [removedTargetIds] DocumentRemove removedTargetIds * @property {google.protobuf.ITimestamp|null} [readTime] DocumentRemove readTime */ - + /** * Constructs a new DocumentRemove. * @memberof google.firestore.v1 @@ -14742,7 +14758,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DocumentRemove document. * @member {string} document @@ -14750,7 +14766,7 @@ * @instance */ DocumentRemove.prototype.document = ""; - + /** * DocumentRemove removedTargetIds. * @member {Array.} removedTargetIds @@ -14758,7 +14774,7 @@ * @instance */ DocumentRemove.prototype.removedTargetIds = $util.emptyArray; - + /** * DocumentRemove readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime @@ -14766,7 +14782,7 @@ * @instance */ DocumentRemove.prototype.readTime = null; - + /** * Creates a DocumentRemove message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14795,7 +14811,7 @@ } return message; }; - + /** * Creates a plain object from a DocumentRemove message. Also converts values to other types if specified. * @function toObject @@ -14826,7 +14842,7 @@ object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; - + /** * Converts this DocumentRemove to JSON. * @function toJSON @@ -14837,12 +14853,12 @@ DocumentRemove.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DocumentRemove; })(); - + v1.ExistenceFilter = (function() { - + /** * Properties of an ExistenceFilter. * @memberof google.firestore.v1 @@ -14850,7 +14866,7 @@ * @property {number|null} [targetId] ExistenceFilter targetId * @property {number|null} [count] ExistenceFilter count */ - + /** * Constructs a new ExistenceFilter. * @memberof google.firestore.v1 @@ -14865,7 +14881,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ExistenceFilter targetId. * @member {number} targetId @@ -14873,7 +14889,7 @@ * @instance */ ExistenceFilter.prototype.targetId = 0; - + /** * ExistenceFilter count. * @member {number} count @@ -14881,7 +14897,7 @@ * @instance */ ExistenceFilter.prototype.count = 0; - + /** * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -14900,7 +14916,7 @@ message.count = object.count | 0; return message; }; - + /** * Creates a plain object from an ExistenceFilter message. Also converts values to other types if specified. * @function toObject @@ -14924,7 +14940,7 @@ object.count = message.count; return object; }; - + /** * Converts this ExistenceFilter to JSON. * @function toJSON @@ -14935,34 +14951,34 @@ ExistenceFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ExistenceFilter; })(); - + return v1; })(); - + return firestore; })(); - + google.api = (function() { - + /** * Namespace api. * @memberof google * @namespace */ var api = {}; - + api.Http = (function() { - + /** * Properties of a Http. * @memberof google.api * @interface IHttp * @property {Array.|null} [rules] Http rules */ - + /** * Constructs a new Http. * @memberof google.api @@ -14978,7 +14994,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Http rules. * @member {Array.} rules @@ -14986,7 +15002,7 @@ * @instance */ Http.prototype.rules = $util.emptyArray; - + /** * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15011,7 +15027,7 @@ } return message; }; - + /** * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject @@ -15034,7 +15050,7 @@ } return object; }; - + /** * Converts this Http to JSON. * @function toJSON @@ -15045,12 +15061,12 @@ Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Http; })(); - + api.HttpRule = (function() { - + /** * Properties of a HttpRule. * @memberof google.api @@ -15065,7 +15081,7 @@ * @property {string|null} [body] HttpRule body * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ - + /** * Constructs a new HttpRule. * @memberof google.api @@ -15081,7 +15097,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * HttpRule get. * @member {string|null|undefined} get @@ -15089,7 +15105,7 @@ * @instance */ HttpRule.prototype.get = null; - + /** * HttpRule put. * @member {string|null|undefined} put @@ -15097,7 +15113,7 @@ * @instance */ HttpRule.prototype.put = null; - + /** * HttpRule post. * @member {string|null|undefined} post @@ -15105,7 +15121,7 @@ * @instance */ HttpRule.prototype.post = null; - + /** * HttpRule delete. * @member {string|null|undefined} delete @@ -15113,7 +15129,7 @@ * @instance */ HttpRule.prototype["delete"] = null; - + /** * HttpRule patch. * @member {string|null|undefined} patch @@ -15121,7 +15137,7 @@ * @instance */ HttpRule.prototype.patch = null; - + /** * HttpRule custom. * @member {google.api.ICustomHttpPattern|null|undefined} custom @@ -15129,7 +15145,7 @@ * @instance */ HttpRule.prototype.custom = null; - + /** * HttpRule selector. * @member {string} selector @@ -15137,7 +15153,7 @@ * @instance */ HttpRule.prototype.selector = ""; - + /** * HttpRule body. * @member {string} body @@ -15145,7 +15161,7 @@ * @instance */ HttpRule.prototype.body = ""; - + /** * HttpRule additionalBindings. * @member {Array.} additionalBindings @@ -15153,10 +15169,10 @@ * @instance */ HttpRule.prototype.additionalBindings = $util.emptyArray; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * HttpRule pattern. * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern @@ -15167,7 +15183,7 @@ get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15211,7 +15227,7 @@ } return message; }; - + /** * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject @@ -15272,7 +15288,7 @@ } return object; }; - + /** * Converts this HttpRule to JSON. * @function toJSON @@ -15283,12 +15299,12 @@ HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return HttpRule; })(); - + api.CustomHttpPattern = (function() { - + /** * Properties of a CustomHttpPattern. * @memberof google.api @@ -15296,7 +15312,7 @@ * @property {string|null} [kind] CustomHttpPattern kind * @property {string|null} [path] CustomHttpPattern path */ - + /** * Constructs a new CustomHttpPattern. * @memberof google.api @@ -15311,7 +15327,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CustomHttpPattern kind. * @member {string} kind @@ -15319,7 +15335,7 @@ * @instance */ CustomHttpPattern.prototype.kind = ""; - + /** * CustomHttpPattern path. * @member {string} path @@ -15327,7 +15343,7 @@ * @instance */ CustomHttpPattern.prototype.path = ""; - + /** * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15346,7 +15362,7 @@ message.path = String(object.path); return message; }; - + /** * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject @@ -15370,7 +15386,7 @@ object.path = message.path; return object; }; - + /** * Converts this CustomHttpPattern to JSON. * @function toJSON @@ -15381,10 +15397,10 @@ CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CustomHttpPattern; })(); - + /** * FieldBehavior enum. * @name google.api.FieldBehavior @@ -15410,9 +15426,9 @@ values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; return values; })(); - + api.ResourceDescriptor = (function() { - + /** * Properties of a ResourceDescriptor. * @memberof google.api @@ -15425,7 +15441,7 @@ * @property {string|null} [singular] ResourceDescriptor singular * @property {Array.|null} [style] ResourceDescriptor style */ - + /** * Constructs a new ResourceDescriptor. * @memberof google.api @@ -15442,7 +15458,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ResourceDescriptor type. * @member {string} type @@ -15450,7 +15466,7 @@ * @instance */ ResourceDescriptor.prototype.type = ""; - + /** * ResourceDescriptor pattern. * @member {Array.} pattern @@ -15458,7 +15474,7 @@ * @instance */ ResourceDescriptor.prototype.pattern = $util.emptyArray; - + /** * ResourceDescriptor nameField. * @member {string} nameField @@ -15466,7 +15482,7 @@ * @instance */ ResourceDescriptor.prototype.nameField = ""; - + /** * ResourceDescriptor history. * @member {google.api.ResourceDescriptor.History} history @@ -15474,7 +15490,7 @@ * @instance */ ResourceDescriptor.prototype.history = 0; - + /** * ResourceDescriptor plural. * @member {string} plural @@ -15482,7 +15498,7 @@ * @instance */ ResourceDescriptor.prototype.plural = ""; - + /** * ResourceDescriptor singular. * @member {string} singular @@ -15490,7 +15506,7 @@ * @instance */ ResourceDescriptor.prototype.singular = ""; - + /** * ResourceDescriptor style. * @member {Array.} style @@ -15498,7 +15514,7 @@ * @instance */ ResourceDescriptor.prototype.style = $util.emptyArray; - + /** * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15559,7 +15575,7 @@ } return message; }; - + /** * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject @@ -15606,7 +15622,7 @@ } return object; }; - + /** * Converts this ResourceDescriptor to JSON. * @function toJSON @@ -15617,7 +15633,7 @@ ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -15633,7 +15649,7 @@ values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; return values; })(); - + /** * Style enum. * @name google.api.ResourceDescriptor.Style @@ -15647,12 +15663,12 @@ values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; return values; })(); - + return ResourceDescriptor; })(); - + api.ResourceReference = (function() { - + /** * Properties of a ResourceReference. * @memberof google.api @@ -15660,7 +15676,7 @@ * @property {string|null} [type] ResourceReference type * @property {string|null} [childType] ResourceReference childType */ - + /** * Constructs a new ResourceReference. * @memberof google.api @@ -15675,7 +15691,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ResourceReference type. * @member {string} type @@ -15683,7 +15699,7 @@ * @instance */ ResourceReference.prototype.type = ""; - + /** * ResourceReference childType. * @member {string} childType @@ -15691,7 +15707,7 @@ * @instance */ ResourceReference.prototype.childType = ""; - + /** * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15710,7 +15726,7 @@ message.childType = String(object.childType); return message; }; - + /** * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject @@ -15734,7 +15750,7 @@ object.childType = message.childType; return object; }; - + /** * Converts this ResourceReference to JSON. * @function toJSON @@ -15745,24 +15761,24 @@ ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ResourceReference; })(); - + return api; })(); - + google.type = (function() { - + /** * Namespace type. * @memberof google * @namespace */ var type = {}; - + type.LatLng = (function() { - + /** * Properties of a LatLng. * @memberof google.type @@ -15770,7 +15786,7 @@ * @property {number|null} [latitude] LatLng latitude * @property {number|null} [longitude] LatLng longitude */ - + /** * Constructs a new LatLng. * @memberof google.type @@ -15785,7 +15801,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * LatLng latitude. * @member {number} latitude @@ -15793,7 +15809,7 @@ * @instance */ LatLng.prototype.latitude = 0; - + /** * LatLng longitude. * @member {number} longitude @@ -15801,7 +15817,7 @@ * @instance */ LatLng.prototype.longitude = 0; - + /** * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15820,7 +15836,7 @@ message.longitude = Number(object.longitude); return message; }; - + /** * Creates a plain object from a LatLng message. Also converts values to other types if specified. * @function toObject @@ -15844,7 +15860,7 @@ object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; - + /** * Converts this LatLng to JSON. * @function toJSON @@ -15855,24 +15871,24 @@ LatLng.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return LatLng; })(); - + return type; })(); - + google.rpc = (function() { - + /** * Namespace rpc. * @memberof google * @namespace */ var rpc = {}; - + rpc.Status = (function() { - + /** * Properties of a Status. * @memberof google.rpc @@ -15881,7 +15897,7 @@ * @property {string|null} [message] Status message * @property {Array.|null} [details] Status details */ - + /** * Constructs a new Status. * @memberof google.rpc @@ -15897,7 +15913,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Status code. * @member {number} code @@ -15905,7 +15921,7 @@ * @instance */ Status.prototype.code = 0; - + /** * Status message. * @member {string} message @@ -15913,7 +15929,7 @@ * @instance */ Status.prototype.message = ""; - + /** * Status details. * @member {Array.} details @@ -15921,7 +15937,7 @@ * @instance */ Status.prototype.details = $util.emptyArray; - + /** * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -15950,7 +15966,7 @@ } return message; }; - + /** * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject @@ -15981,7 +15997,7 @@ } return object; }; - + /** * Converts this Status to JSON. * @function toJSON @@ -15992,24 +16008,24 @@ Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Status; })(); - + return rpc; })(); - + google.longrunning = (function() { - + /** * Namespace longrunning. * @memberof google * @namespace */ var longrunning = {}; - + longrunning.Operations = (function() { - + /** * Constructs a new Operations service. * @memberof google.longrunning @@ -16023,9 +16039,9 @@ function Operations(rpcImpl, requestDelimited, responseDelimited) { $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; - + /** * Callback as used by {@link google.longrunning.Operations#listOperations}. * @memberof google.longrunning.Operations @@ -16034,7 +16050,7 @@ * @param {Error|null} error Error, if any * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse */ - + /** * Calls ListOperations. * @function listOperations @@ -16048,7 +16064,7 @@ Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); }, "name", { value: "ListOperations" }); - + /** * Calls ListOperations. * @function listOperations @@ -16058,7 +16074,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.longrunning.Operations#getOperation}. * @memberof google.longrunning.Operations @@ -16067,7 +16083,7 @@ * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ - + /** * Calls GetOperation. * @function getOperation @@ -16081,7 +16097,7 @@ Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "GetOperation" }); - + /** * Calls GetOperation. * @function getOperation @@ -16091,7 +16107,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.longrunning.Operations#deleteOperation}. * @memberof google.longrunning.Operations @@ -16100,7 +16116,7 @@ * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ - + /** * Calls DeleteOperation. * @function deleteOperation @@ -16114,7 +16130,7 @@ Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "DeleteOperation" }); - + /** * Calls DeleteOperation. * @function deleteOperation @@ -16124,7 +16140,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.longrunning.Operations#cancelOperation}. * @memberof google.longrunning.Operations @@ -16133,7 +16149,7 @@ * @param {Error|null} error Error, if any * @param {google.protobuf.Empty} [response] Empty */ - + /** * Calls CancelOperation. * @function cancelOperation @@ -16147,7 +16163,7 @@ Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); }, "name", { value: "CancelOperation" }); - + /** * Calls CancelOperation. * @function cancelOperation @@ -16157,7 +16173,7 @@ * @returns {Promise} Promise * @variation 2 */ - + /** * Callback as used by {@link google.longrunning.Operations#waitOperation}. * @memberof google.longrunning.Operations @@ -16166,7 +16182,7 @@ * @param {Error|null} error Error, if any * @param {google.longrunning.Operation} [response] Operation */ - + /** * Calls WaitOperation. * @function waitOperation @@ -16180,7 +16196,7 @@ Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "WaitOperation" }); - + /** * Calls WaitOperation. * @function waitOperation @@ -16190,12 +16206,12 @@ * @returns {Promise} Promise * @variation 2 */ - + return Operations; })(); - + longrunning.Operation = (function() { - + /** * Properties of an Operation. * @memberof google.longrunning @@ -16206,7 +16222,7 @@ * @property {google.rpc.IStatus|null} [error] Operation error * @property {google.protobuf.IAny|null} [response] Operation response */ - + /** * Constructs a new Operation. * @memberof google.longrunning @@ -16221,7 +16237,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * Operation name. * @member {string} name @@ -16229,7 +16245,7 @@ * @instance */ Operation.prototype.name = ""; - + /** * Operation metadata. * @member {google.protobuf.IAny|null|undefined} metadata @@ -16237,7 +16253,7 @@ * @instance */ Operation.prototype.metadata = null; - + /** * Operation done. * @member {boolean} done @@ -16245,7 +16261,7 @@ * @instance */ Operation.prototype.done = false; - + /** * Operation error. * @member {google.rpc.IStatus|null|undefined} error @@ -16253,7 +16269,7 @@ * @instance */ Operation.prototype.error = null; - + /** * Operation response. * @member {google.protobuf.IAny|null|undefined} response @@ -16261,10 +16277,10 @@ * @instance */ Operation.prototype.response = null; - + // OneOf field names bound to virtual getters and setters var $oneOfFields; - + /** * Operation result. * @member {"error"|"response"|undefined} result @@ -16275,7 +16291,7 @@ get: $util.oneOfGetter($oneOfFields = ["error", "response"]), set: $util.oneOfSetter($oneOfFields) }); - + /** * Creates an Operation message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16309,7 +16325,7 @@ } return message; }; - + /** * Creates a plain object from an Operation message. Also converts values to other types if specified. * @function toObject @@ -16346,7 +16362,7 @@ } return object; }; - + /** * Converts this Operation to JSON. * @function toJSON @@ -16357,19 +16373,19 @@ Operation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return Operation; })(); - + longrunning.GetOperationRequest = (function() { - + /** * Properties of a GetOperationRequest. * @memberof google.longrunning * @interface IGetOperationRequest * @property {string|null} [name] GetOperationRequest name */ - + /** * Constructs a new GetOperationRequest. * @memberof google.longrunning @@ -16384,7 +16400,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * GetOperationRequest name. * @member {string} name @@ -16392,7 +16408,7 @@ * @instance */ GetOperationRequest.prototype.name = ""; - + /** * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16409,7 +16425,7 @@ message.name = String(object.name); return message; }; - + /** * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. * @function toObject @@ -16429,7 +16445,7 @@ object.name = message.name; return object; }; - + /** * Converts this GetOperationRequest to JSON. * @function toJSON @@ -16440,12 +16456,12 @@ GetOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return GetOperationRequest; })(); - + longrunning.ListOperationsRequest = (function() { - + /** * Properties of a ListOperationsRequest. * @memberof google.longrunning @@ -16455,7 +16471,7 @@ * @property {number|null} [pageSize] ListOperationsRequest pageSize * @property {string|null} [pageToken] ListOperationsRequest pageToken */ - + /** * Constructs a new ListOperationsRequest. * @memberof google.longrunning @@ -16470,7 +16486,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListOperationsRequest name. * @member {string} name @@ -16478,7 +16494,7 @@ * @instance */ ListOperationsRequest.prototype.name = ""; - + /** * ListOperationsRequest filter. * @member {string} filter @@ -16486,7 +16502,7 @@ * @instance */ ListOperationsRequest.prototype.filter = ""; - + /** * ListOperationsRequest pageSize. * @member {number} pageSize @@ -16494,7 +16510,7 @@ * @instance */ ListOperationsRequest.prototype.pageSize = 0; - + /** * ListOperationsRequest pageToken. * @member {string} pageToken @@ -16502,7 +16518,7 @@ * @instance */ ListOperationsRequest.prototype.pageToken = ""; - + /** * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16525,7 +16541,7 @@ message.pageToken = String(object.pageToken); return message; }; - + /** * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. * @function toObject @@ -16555,7 +16571,7 @@ object.name = message.name; return object; }; - + /** * Converts this ListOperationsRequest to JSON. * @function toJSON @@ -16566,12 +16582,12 @@ ListOperationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListOperationsRequest; })(); - + longrunning.ListOperationsResponse = (function() { - + /** * Properties of a ListOperationsResponse. * @memberof google.longrunning @@ -16579,7 +16595,7 @@ * @property {Array.|null} [operations] ListOperationsResponse operations * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken */ - + /** * Constructs a new ListOperationsResponse. * @memberof google.longrunning @@ -16595,7 +16611,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * ListOperationsResponse operations. * @member {Array.} operations @@ -16603,7 +16619,7 @@ * @instance */ ListOperationsResponse.prototype.operations = $util.emptyArray; - + /** * ListOperationsResponse nextPageToken. * @member {string} nextPageToken @@ -16611,7 +16627,7 @@ * @instance */ ListOperationsResponse.prototype.nextPageToken = ""; - + /** * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16638,7 +16654,7 @@ message.nextPageToken = String(object.nextPageToken); return message; }; - + /** * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. * @function toObject @@ -16665,7 +16681,7 @@ object.nextPageToken = message.nextPageToken; return object; }; - + /** * Converts this ListOperationsResponse to JSON. * @function toJSON @@ -16676,19 +16692,19 @@ ListOperationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return ListOperationsResponse; })(); - + longrunning.CancelOperationRequest = (function() { - + /** * Properties of a CancelOperationRequest. * @memberof google.longrunning * @interface ICancelOperationRequest * @property {string|null} [name] CancelOperationRequest name */ - + /** * Constructs a new CancelOperationRequest. * @memberof google.longrunning @@ -16703,7 +16719,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * CancelOperationRequest name. * @member {string} name @@ -16711,7 +16727,7 @@ * @instance */ CancelOperationRequest.prototype.name = ""; - + /** * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16728,7 +16744,7 @@ message.name = String(object.name); return message; }; - + /** * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. * @function toObject @@ -16748,7 +16764,7 @@ object.name = message.name; return object; }; - + /** * Converts this CancelOperationRequest to JSON. * @function toJSON @@ -16759,19 +16775,19 @@ CancelOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return CancelOperationRequest; })(); - + longrunning.DeleteOperationRequest = (function() { - + /** * Properties of a DeleteOperationRequest. * @memberof google.longrunning * @interface IDeleteOperationRequest * @property {string|null} [name] DeleteOperationRequest name */ - + /** * Constructs a new DeleteOperationRequest. * @memberof google.longrunning @@ -16786,7 +16802,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * DeleteOperationRequest name. * @member {string} name @@ -16794,7 +16810,7 @@ * @instance */ DeleteOperationRequest.prototype.name = ""; - + /** * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16811,7 +16827,7 @@ message.name = String(object.name); return message; }; - + /** * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. * @function toObject @@ -16831,7 +16847,7 @@ object.name = message.name; return object; }; - + /** * Converts this DeleteOperationRequest to JSON. * @function toJSON @@ -16842,12 +16858,12 @@ DeleteOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return DeleteOperationRequest; })(); - + longrunning.WaitOperationRequest = (function() { - + /** * Properties of a WaitOperationRequest. * @memberof google.longrunning @@ -16855,7 +16871,7 @@ * @property {string|null} [name] WaitOperationRequest name * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout */ - + /** * Constructs a new WaitOperationRequest. * @memberof google.longrunning @@ -16870,7 +16886,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * WaitOperationRequest name. * @member {string} name @@ -16878,7 +16894,7 @@ * @instance */ WaitOperationRequest.prototype.name = ""; - + /** * WaitOperationRequest timeout. * @member {google.protobuf.IDuration|null|undefined} timeout @@ -16886,7 +16902,7 @@ * @instance */ WaitOperationRequest.prototype.timeout = null; - + /** * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -16908,7 +16924,7 @@ } return message; }; - + /** * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. * @function toObject @@ -16932,7 +16948,7 @@ object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); return object; }; - + /** * Converts this WaitOperationRequest to JSON. * @function toJSON @@ -16943,12 +16959,12 @@ WaitOperationRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return WaitOperationRequest; })(); - + longrunning.OperationInfo = (function() { - + /** * Properties of an OperationInfo. * @memberof google.longrunning @@ -16956,7 +16972,7 @@ * @property {string|null} [responseType] OperationInfo responseType * @property {string|null} [metadataType] OperationInfo metadataType */ - + /** * Constructs a new OperationInfo. * @memberof google.longrunning @@ -16971,7 +16987,7 @@ if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]]; } - + /** * OperationInfo responseType. * @member {string} responseType @@ -16979,7 +16995,7 @@ * @instance */ OperationInfo.prototype.responseType = ""; - + /** * OperationInfo metadataType. * @member {string} metadataType @@ -16987,7 +17003,7 @@ * @instance */ OperationInfo.prototype.metadataType = ""; - + /** * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject @@ -17006,7 +17022,7 @@ message.metadataType = String(object.metadataType); return message; }; - + /** * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. * @function toObject @@ -17030,7 +17046,7 @@ object.metadataType = message.metadataType; return object; }; - + /** * Converts this OperationInfo to JSON. * @function toJSON @@ -17041,13 +17057,13 @@ OperationInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - + return OperationInfo; })(); - + return longrunning; })(); - + return google; })(); diff --git a/dev/protos/google/firestore/v1/write.proto b/dev/protos/google/firestore/v1/write.proto index c78437bab..a9ac9832d 100644 --- a/dev/protos/google/firestore/v1/write.proto +++ b/dev/protos/google/firestore/v1/write.proto @@ -41,6 +41,11 @@ message Write { // `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 transformation to a document. DocumentTransform transform = 6; } diff --git a/dev/protos/protos.json b/dev/protos/protos.json index 44043811b..e39c4905a 100644 --- a/dev/protos/protos.json +++ b/dev/protos/protos.json @@ -2133,6 +2133,7 @@ "oneof": [ "update", "delete", + "verify", "transform" ] } @@ -2146,6 +2147,10 @@ "type": "string", "id": 2 }, + "verify": { + "type": "string", + "id": 5 + }, "transform": { "type": "DocumentTransform", "id": 6 @@ -5460,4 +5465,4 @@ } } } -} \ No newline at end of file +} diff --git a/dev/src/document-reader.ts b/dev/src/document-reader.ts index 21af91a7f..83faca0e7 100644 --- a/dev/src/document-reader.ts +++ b/dev/src/document-reader.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +import {DocumentData} from '@google-cloud/firestore'; +import * as assert from 'assert'; + import {DocumentSnapshot, DocumentSnapshotBuilder} from './document'; import {DocumentReference} from './reference'; import {FieldPath} from './path'; @@ -21,7 +24,7 @@ import {isPermanentRpcError} from './util'; import {google} from '../protos/firestore_v1_proto_api'; import {logger} from './logger'; import {Firestore} from './index'; -import {DocumentData} from '@google-cloud/firestore'; +import {Timestamp} from './timestamp'; import api = google.firestore.v1; /** @@ -33,8 +36,16 @@ import api = google.firestore.v1; export class DocumentReader { /** An optional field mask to apply to this read. */ fieldMask?: FieldPath[]; - /** An optional transaction ID to use for this read. */ + /** + * An optional transaction ID to use for this read. Reads can only specify a + * transaction ID or a read time but not both. + */ transactionId?: Uint8Array; + /** + * An optional time to read the documents at. Reads can only specify a + * transaction ID or a read time but not both. + */ + readTime?: Timestamp; private outstandingDocuments = new Set(); private retrievedDocuments = new Map(); @@ -93,9 +104,15 @@ export class DocumentReader { return; } + assert( + !(this.transactionId && this.readTime), + 'Cannot specify both a transaction ID and a read time' + ); + const request: api.IBatchGetDocumentsRequest = { database: this.firestore.formattedName, transaction: this.transactionId, + readTime: this.readTime?.toProto()?.timestampValue, documents: Array.from(this.outstandingDocuments), }; diff --git a/dev/src/index.ts b/dev/src/index.ts index 5d90c452f..2571150a2 100644 --- a/dev/src/index.ts +++ b/dev/src/index.ts @@ -957,6 +957,12 @@ export class Firestore implements firestore.Firestore { * @template T * @param {false=} readOnly Set to false or omit to indicate a read-write * transaction. + * @param {boolean=} optimisticLocking Whether to use optimistic locking. + * By default, transactions lock documents pessimistically, which increases + * the chance that transactions succeed but blocks other clients` + * modifications. With `optimisticLocking`, writes are not blocked. When other + * clients modify a document, the transaction is instead retried. Optimistic + * transactions do not support queries. * @param {number=} maxAttempts The maximum number of attempts for this * transaction. Defaults to five. */ @@ -972,10 +978,16 @@ export class Firestore implements firestore.Firestore { * Transactions can be performed as read-only or read-write transactions. By * default, transactions are executed in read-write mode. * - * A read-write transaction obtains a pessimistic lock on all documents that - * are read during the transaction. These locks block other transactions, - * batched writes, and other non-transactional writes from changing that - * document. Any writes in a read-write transactions are committed once + * By default, read-write transactions obtain a pessimistic locks on all + * documents that are read during the transaction. These locks block other + * transactions, batched writes, and other non-transactional writes from + * changing that document. If you enable optimistic locking, other clients + * can continue to modify these documents. The transaction will be retried + * if a concurrent write affects the data read during the transaction. + * + * A transaction can modify up to 500 documents. If you enable optimistic + * locking, any document read during the transaction also counts against + * this limit. Any writes in a read-write transactions are committed once * 'updateFunction' resolves, which also releases all locks. * * If a read-write transaction fails with contention, the transaction is @@ -1037,6 +1049,7 @@ export class Firestore implements firestore.Firestore { let maxAttempts = DEFAULT_MAX_TRANSACTION_ATTEMPTS; let readOnly = false; let readTime: Timestamp | undefined; + let optimisticLocking = false; if (transactionOptions) { validateObject('transactionOptions', transactionOptions); @@ -1062,13 +1075,18 @@ export class Firestore implements firestore.Firestore { transactionOptions.maxAttempts, {optional: true, minValue: 1} ); - maxAttempts = transactionOptions.maxAttempts || DEFAULT_MAX_TRANSACTION_ATTEMPTS; + validateBoolean( + 'transactionOptions.optimisticLocking', + transactionOptions.optimisticLocking, + {optional: true} + ); + optimisticLocking = transactionOptions.optimisticLocking || false; } } - const transaction = new Transaction(this, tag); + const transaction = new Transaction(this, optimisticLocking, tag); return this.initializeIfNeeded(tag).then(() => transaction.runTransaction(updateFunction, { maxAttempts, diff --git a/dev/src/transaction.ts b/dev/src/transaction.ts index 7274a9cb0..8b1822ca2 100644 --- a/dev/src/transaction.ts +++ b/dev/src/transaction.ts @@ -18,9 +18,10 @@ import * as firestore from '@google-cloud/firestore'; import {GoogleError} from 'google-gax'; import * as proto from '../protos/firestore_v1_proto_api'; +import * as deepEqual from 'fast-deep-equal'; import {ExponentialBackoff} from './backoff'; -import {DocumentSnapshot} from './document'; +import {DocumentSnapshot, Precondition} from './document'; import {Firestore, WriteBatch} from './index'; import {Timestamp} from './timestamp'; import {logger} from './logger'; @@ -59,23 +60,43 @@ const READ_AFTER_WRITE_ERROR_MSG = * @class Transaction */ export class Transaction implements firestore.Transaction { - private _firestore: Firestore; private _writeBatch: WriteBatch; private _backoff: ExponentialBackoff; - private _requestTag: string; private _transactionId?: Uint8Array; + /*! + * A map of document paths to versions. This maps stores either an + * update time or `exists: false` for the documents read during + * the transaction. If optimistic locking is chosen, these versions + * are then verified during the transaction commit. + */ + private _readVersions = new Map< + string, + {exists?: boolean; lastUpdateTime?: Timestamp} + >(); + + /** + * The read time at which to run this transaction. This can be user-specified + * for read-only transactions. For read-write transaction, this is the read + * time of the first document fetch. + */ + private _readTime?: Timestamp; + /** * @hideconstructor * - * @param firestore The Firestore Database client. - * @param requestTag A unique client-assigned identifier for the scope of + * @param _firestore The Firestore Database client. + * @param _optimisticLocking If true, uses optimistic locking for all + * documents read during this transaction. + * @param _requestTag A unique client-assigned identifier for the scope of * this transaction. */ - constructor(firestore: Firestore, requestTag: string) { - this._firestore = firestore; - this._writeBatch = firestore.batch(); - this._requestTag = requestTag; + constructor( + private readonly _firestore: Firestore, + private readonly _optimisticLocking: boolean, + private readonly _requestTag: string + ) { + this._writeBatch = _firestore.batch(); this._backoff = new ExponentialBackoff(); } @@ -126,12 +147,13 @@ export class Transaction implements firestore.Transaction { } if (refOrQuery instanceof DocumentReference) { - const documentReader = new DocumentReader(this._firestore, [refOrQuery]); - documentReader.transactionId = this._transactionId; - return documentReader.get(this._requestTag).then(([res]) => res); - } - - if (refOrQuery instanceof Query) { + return this.getAll(refOrQuery).then(([doc]) => doc); + } else if (refOrQuery instanceof Query) { + if (this._optimisticLocking) { + throw new Error( + 'Queries are not supported for transactions that use optimistic locking.' + ); + } return refOrQuery._get(this._transactionId); } @@ -187,8 +209,39 @@ export class Transaction implements firestore.Transaction { const documentReader = new DocumentReader(this._firestore, documents); documentReader.fieldMask = fieldMask || undefined; - documentReader.transactionId = this._transactionId; - return documentReader.get(this._requestTag); + + // If optimistic locking is chosen, document reads are not part of the + // server-side transaction. Instead, these reads are performed out of band. + // This means that the backend does not lock the document. Instead, we + // verify that the document has not changed during the commit. + if (!this._optimisticLocking) { + documentReader.transactionId = this._transactionId; + } else { + documentReader.readTime = this._readTime; + } + + return documentReader.get(this._requestTag).then(docs => { + for (const doc of docs) { + const version = doc.exists + ? {lastUpdateTime: doc.updateTime} + : {exists: false}; + if (this._readVersions.has(doc.ref.formattedName)) { + const existingVersion = this._readVersions.get(doc.ref.formattedName); + if (!deepEqual(version, existingVersion)) { + const error: GoogleError = new Error( + `Document version changed between reads (for ${doc.ref.path})` + ); + error.code = StatusCode.ABORTED as number; + throw error; + } + } else { + this._readVersions.set(doc.ref.formattedName, version); + } + + this._readTime = doc.readTime; + } + return docs; + }); } /** @@ -385,8 +438,40 @@ export class Transaction implements firestore.Transaction { commit(): Promise { return this._writeBatch ._commit({ - transactionId: this._transactionId, requestTag: this._requestTag, + preproccessor: commitRequest => { + commitRequest.transaction = this._transactionId; + commitRequest.writes = commitRequest.writes || []; + + if (!this._optimisticLocking) { + return commitRequest; + } + + const unwrittenDocs = new Map(this._readVersions); + + // Attempt to attach the precondition to existing writes. This saves + // some costs and lets the user issue more writes (as there is a fixed + // limit on the number of operations). + for (const write of commitRequest.writes) { + const path = (write.delete || + write.update?.name || + write.verify) as string; + const version = unwrittenDocs.get(path); + if (write.currentDocument === undefined && version) { + write.currentDocument = new Precondition(version).toProto(); + unwrittenDocs.delete(path); + } + } + + // Add verify preconditions for any remaining documents. + for (const [path, version] of unwrittenDocs) { + commitRequest.writes.push({ + verify: path, + currentDocument: new Precondition(version).toProto(), + }); + } + return commitRequest; + }, }) .then(() => {}); } @@ -411,8 +496,6 @@ export class Transaction implements firestore.Transaction { * @private * @param updateFunction The user function to execute within the transaction * context. - * @param requestTag A unique client-assigned identifier for the scope of - * this transaction. * @param options The user-defined options for this transaction. */ async runTransaction( @@ -439,6 +522,8 @@ export class Transaction implements firestore.Transaction { } this._writeBatch._reset(); + this._readVersions.clear(); + this._readTime = undefined; await this.maybeBackoff(lastError); await this.begin(options.readOnly, options.readTime); @@ -462,7 +547,10 @@ export class Transaction implements firestore.Transaction { lastError = err; - if (!this._transactionId || !isRetryableTransactionError(err)) { + if ( + !this._transactionId || + !isRetryableTransactionError(err, this._optimisticLocking) + ) { break; } } @@ -591,7 +679,10 @@ function validateReadOptions( } } -function isRetryableTransactionError(error: GoogleError): boolean { +function isRetryableTransactionError( + error: GoogleError, + optimisticLocking: boolean +): boolean { if (error.code !== undefined) { // This list is based on https://github.com/firebase/firebase-js-sdk/blob/master/packages/firestore/src/core/transaction_runner.ts#L112 switch (error.code as number) { @@ -609,6 +700,11 @@ function isRetryableTransactionError(error: GoogleError): boolean { // IDs that have expired. While INVALID_ARGUMENT is generally not // retryable, we retry this specific case. return !!error.message.match(/transaction has expired/); + case StatusCode.FAILED_PRECONDITION: + // Optimistic transactions use preconditions to verify that documents + // haven't changed during the lifetime of a transaction. If a document + // has changed, we retry the transaction to fetch the latest version. + return optimisticLocking; default: return false; } diff --git a/dev/src/write-batch.ts b/dev/src/write-batch.ts index b6e684b1e..52aa37d19 100644 --- a/dev/src/write-batch.ts +++ b/dev/src/write-batch.ts @@ -568,16 +568,17 @@ export class WriteBatch implements firestore.WriteBatch { * * @private * @param commitOptions Options to use for this commit. - * @param commitOptions.transactionId The transaction ID of this commit. * @param commitOptions.requestTag A unique client-assigned identifier for * this request. + * @param commitOptions.preprocessor A function that can be used to mutate + * the request before the commit. * @returns A Promise that resolves when this batch completes. */ async _commit(commitOptions?: { - transactionId?: Uint8Array; requestTag?: string; retryCodes?: number[]; methodName?: FirestoreUnaryMethod; + preproccessor?: (request: api.ICommitRequest) => api.ICommitRequest; }): Promise { // Note: We don't call `verifyNotCommitted()` to allow for retries. this._committed = true; @@ -587,13 +588,13 @@ export class WriteBatch implements firestore.WriteBatch { // Note that the request may not always be of type ICommitRequest. This is // just here to ensure type safety. - const request: api.ICommitRequest = { + let request: api.ICommitRequest = { database: this._firestore.formattedName, writes: this._ops.map(op => op.op()), }; - if (commitOptions?.transactionId) { - request.transaction = commitOptions.transactionId; + if (commitOptions?.preproccessor) { + request = commitOptions?.preproccessor(request); } logger( diff --git a/dev/system-test/firestore.ts b/dev/system-test/firestore.ts index 11e45e1aa..e26391af7 100644 --- a/dev/system-test/firestore.ts +++ b/dev/system-test/firestore.ts @@ -2346,6 +2346,66 @@ describe('Transaction class', () => { expect(finalSnapshot.data()).to.deep.equal({first: true, second: true}); }); + it('supports optimistic locks', async () => { + const ref = randomCol.doc('doc1'); + await ref.set({updated: false}); + await firestore.runTransaction( + async txn => { + await txn.get(ref); + txn.set(ref, {updated: true}); + }, + {optimisticLocking: true} + ); + const doc = await ref.get(); + expect(doc.get('updated')).to.equal(true); + }); + + it('optimistic transactions enforce consistency', async () => { + let attempts = 0; + const ref1 = randomCol.doc('doc1'); + await ref1.set({ver: 1}); + const ref2 = randomCol.doc('doc1'); + await ref2.set({ver: 1}); + await firestore.runTransaction( + async txn => { + if (attempts === 0) { + // Read two documents at the same version. + let doc = await txn.get(ref1); + expect(doc.get('ver')).to.equal(1); + await ref2.set({ver: 2}); + doc = await txn.get(ref2); + expect(doc.get('ver')).to.equal(1); + // In the first attempt, the commit fails because ref2's version + // changed. We could possibly even fail the transaction after + // reading ref2 since we can detect that the document was modified + // after ref1's document's read time. This would not work for + // deletes, however, and would require more special handling. + } + ++attempts; + }, + {optimisticLocking: true} + ); + expect(attempts).to.equal(2); + }); + + it('retries transaction with optimistic locks', async () => { + let attempts = 0; + const ref = randomCol.doc('doc1'); + await ref.set({updated: false}); + await firestore.runTransaction( + async txn => { + await txn.get(ref); + if (attempts === 0) { + // Update outside of the transaction + await ref.set({updated: true}); + } + ++attempts; + }, + {optimisticLocking: true} + ); + expect(attempts).to.equal(2); + }); + it('supports read-only transactions', async () => { const ref = randomCol.doc('doc'); await ref.set({foo: 'bar'}); diff --git a/dev/test/transaction.ts b/dev/test/transaction.ts index 8854bc159..f5d145480 100644 --- a/dev/test/transaction.ts +++ b/dev/test/transaction.ts @@ -52,13 +52,17 @@ const DOCUMENT_NAME = `${COLLECTION_ROOT}/${DOCUMENT_ID}`; Firestore.setLogFunction(null); /** Helper to create a transaction ID from either a string or a Uint8Array. */ -function transactionId(transaction?: Uint8Array | string): Uint8Array { +function transactionId( + transaction?: Uint8Array | string +): Uint8Array | undefined { if (transaction === undefined) { return Buffer.from('foo'); - } else if (typeof transaction === 'string') { + } else if (typeof transaction === 'string' && transaction.length > 0) { return Buffer.from(transaction); - } else { + } else if (transaction instanceof Uint8Array && transaction.length > 0) { return transaction; + } else { + return undefined; } } @@ -172,12 +176,15 @@ function getAll( docs: string[], fieldMask?: string[], transaction?: Uint8Array | string, - error?: Error + error?: Error, + updateTime?: {seconds: string; nanos: number}, + readTime?: {seconds: string; nanos: number} ): TransactionStep { const request: api.IBatchGetDocumentsRequest = { database: DATABASE_ROOT, documents: [], transaction: transactionId(transaction), + readTime, }; if (fieldMask) { @@ -195,7 +202,7 @@ function getAll( found: { name, createTime: {seconds: 1, nanos: 2}, - updateTime: {seconds: 3, nanos: 4}, + updateTime: updateTime || {seconds: 3, nanos: 4}, }, readTime: {seconds: 5, nanos: 6}, }); @@ -220,9 +227,49 @@ function getAll( function getDocument( transaction?: Uint8Array | string, - error?: Error + error?: Error, + updateTime?: {seconds: string; nanos: number}, + readTime?: {seconds: string; nanos: number} +): TransactionStep { + return getAll( + [DOCUMENT_ID], + undefined, + transaction, + error, + updateTime, + readTime + ); +} + +function getMissing( + doc: string = DOCUMENT_ID, + readTime?: {seconds: string; nanos: number} ): TransactionStep { - return getAll([DOCUMENT_ID], undefined, transaction, error); + const name = `${COLLECTION_ROOT}/${doc}`; + const request: api.IBatchGetDocumentsRequest = { + database: DATABASE_ROOT, + documents: [name], + transaction: undefined, + readTime, + }; + + const stream = through2.obj(); + setImmediate(() => { + stream.push({ + missing: name, + readTime: {seconds: 5, nanos: 6}, + }); + }); + setImmediate(() => { + stream.push(null); + }); + + return { + type: 'getDocument', + request, + error: undefined, + stream, + }; } function query( @@ -377,7 +424,7 @@ function runTransaction( }); } -describe('successful transactions', () => { +describe('successful transactions (with pessimistic locking)', () => { it('empty transaction', () => { return runTransaction( /* transactionOptions= */ {}, @@ -401,139 +448,463 @@ describe('successful transactions', () => { expect(val).to.equal('bar'); }); }); -}); - -describe('failed transactions', () => { - const retryBehavior: {[code: number]: boolean} = { - [Status.CANCELLED]: true, - [Status.UNKNOWN]: true, - [Status.INVALID_ARGUMENT]: false, - [Status.DEADLINE_EXCEEDED]: true, - [Status.NOT_FOUND]: false, - [Status.ALREADY_EXISTS]: false, - [Status.RESOURCE_EXHAUSTED]: true, - [Status.FAILED_PRECONDITION]: false, - [Status.ABORTED]: true, - [Status.OUT_OF_RANGE]: false, - [Status.UNIMPLEMENTED]: false, - [Status.INTERNAL]: true, - [Status.UNAVAILABLE]: true, - [Status.DATA_LOSS]: false, - [Status.UNAUTHENTICATED]: true, - }; - it('retries commit based on error code', async () => { - const transactionFunction = () => Promise.resolve(); + it('support get with document ref', () => { + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + return transaction.get(docRef).then(doc => { + expect(doc.id).to.equal('documentId'); + }); + }, + begin(), + getDocument(), + commit() + ); + }); - for (const [errorCode, retry] of Object.entries(retryBehavior)) { - const serverError = new GoogleError('Test Error'); - serverError.code = Number(errorCode) as Status; + it('requires a query or document for get', () => { + return runTransaction( + /* transactionOptions= */ {}, + (transaction: InvalidApiUsage) => { + expect(() => transaction.get()).to.throw( + 'Value for argument "refOrQuery" must be a DocumentReference or a Query.' + ); - if (retry) { - await runTransaction( - /* transactionOptions= */ {}, - transactionFunction, - begin({transactionId: 'foo1'}), - commit('foo1', undefined, serverError), - rollback('foo1'), - backoff(), - begin({ - transactionId: 'foo2', - readWrite: {prevTransactionId: 'foo1'}, - }), - commit('foo2') + expect(() => transaction.get('foo')).to.throw( + 'Value for argument "refOrQuery" must be a DocumentReference or a Query.' ); - } else { - await expect( - runTransaction( - /* transactionOptions= */ {}, - transactionFunction, - begin({transactionId: 'foo1'}), - commit('foo1', undefined, serverError), - rollback('foo1') - ) - ).to.eventually.be.rejected; - } - } + + return Promise.resolve(); + }, + begin(), + commit() + ); }); - it('retries commit for expired transaction', async () => { - const transactionFunction = () => Promise.resolve(); + it('enforce that gets come before writes', () => { + return expect( + runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.set(docRef, {foo: 'bar'}); + return transaction.get(docRef); + }, + begin(), + rollback() + ) + ).to.eventually.be.rejectedWith( + 'Firestore transactions require all reads to be executed before all writes.' + ); + }); - const serverError = new GoogleError( - 'The referenced transaction has expired or is no longer valid.' + it('support get with query', () => { + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + const query = docRef.parent.where('foo', '==', 'bar'); + return transaction.get(query).then(results => { + expect(results.docs[0].id).to.equal('documentId'); + }); + }, + begin(), + query(), + commit() ); - serverError.code = Status.INVALID_ARGUMENT; + }); - await runTransaction( + it('support getAll', () => { + return runTransaction( /* transactionOptions= */ {}, - transactionFunction, - begin({transactionId: 'foo1'}), - commit('foo1', undefined, serverError), - rollback('foo1'), - backoff(), - begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), - commit('foo2') + (transaction, docRef) => { + const firstDoc = docRef.parent.doc('firstDocument'); + const secondDoc = docRef.parent.doc('secondDocument'); + + return transaction.getAll(firstDoc, secondDoc).then(docs => { + expect(docs.length).to.equal(2); + expect(docs[0].id).to.equal('firstDocument'); + expect(docs[1].id).to.equal('secondDocument'); + }); + }, + begin(), + getAll(['firstDocument', 'secondDocument']), + commit() ); }); - it('retries runQuery based on error code', async () => { - const transactionFunction = ( - transaction: Transaction, - docRef: DocumentReference - ) => { - const query = docRef.parent.where('foo', '==', 'bar'); - return transaction.get(query); - }; + it('support getAll with field mask', () => { + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + const doc = docRef.parent.doc('doc'); - for (const [errorCode, retry] of Object.entries(retryBehavior)) { - const serverError = new GoogleError('Test Error'); - serverError.code = Number(errorCode) as Status; + return transaction.getAll(doc, { + fieldMask: ['a.b', new FieldPath('a.b')], + }); + }, + begin(), + getAll(['doc'], ['a.b', '`a.b`']), + commit() + ); + }); - if (retry) { - await runTransaction( - /* transactionOptions= */ {}, - transactionFunction, - begin({transactionId: 'foo1'}), - query('foo1', serverError), - rollback('foo1'), - backoff(), - begin({ - transactionId: 'foo2', - readWrite: {prevTransactionId: 'foo1'}, - }), - query('foo2'), - commit('foo2') - ); - } else { - await expect( - runTransaction( - /* transactionOptions= */ {}, - transactionFunction, - begin({transactionId: 'foo1'}), - query('foo1', serverError), - rollback('foo1') - ) - ).to.eventually.be.rejected; - } - } + it('enforce that getAll come before writes', () => { + return expect( + runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.set(docRef, {foo: 'bar'}); + return transaction.getAll(docRef); + }, + begin(), + rollback() + ) + ).to.eventually.be.rejectedWith( + 'Firestore transactions require all reads to be executed before all writes.' + ); }); - it('retries batchGetDocuments based on error code', async () => { - const transactionFunction = ( - transaction: Transaction, - docRef: DocumentReference - ) => { - return transaction.get(docRef); + it('support create', () => { + const create = { + currentDocument: { + exists: false, + }, + update: { + fields: {}, + name: DOCUMENT_NAME, + }, }; - for (const [errorCode, retry] of Object.entries(retryBehavior)) { - const serverError = new GoogleError('Test Error'); - serverError.code = Number(errorCode) as Status; + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.create(docRef, {}); + return Promise.resolve(); + }, + begin(), + commit(undefined, [create]) + ); + }); - if (retry) { - await runTransaction( - /* transactionOptions= */ {}, + it('support update', () => { + const update = { + currentDocument: { + exists: true, + }, + update: { + fields: { + a: { + mapValue: { + fields: { + b: { + stringValue: 'c', + }, + }, + }, + }, + }, + name: DOCUMENT_NAME, + }, + updateMask: { + fieldPaths: ['a.b'], + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.update(docRef, {'a.b': 'c'}); + transaction.update(docRef, 'a.b', 'c'); + transaction.update(docRef, new Firestore.FieldPath('a', 'b'), 'c'); + return Promise.resolve(); + }, + begin(), + commit(undefined, [update, update, update]) + ); + }); + + it('support set', () => { + const set = { + update: { + fields: { + 'a.b': { + stringValue: 'c', + }, + }, + name: DOCUMENT_NAME, + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.set(docRef, {'a.b': 'c'}); + return Promise.resolve(); + }, + begin(), + commit(undefined, [set]) + ); + }); + + it('support set with merge', () => { + const set = { + update: { + fields: { + 'a.b': { + stringValue: 'c', + }, + }, + name: DOCUMENT_NAME, + }, + updateMask: { + fieldPaths: ['`a.b`'], + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.set(docRef, {'a.b': 'c'}, {merge: true}); + return Promise.resolve(); + }, + begin(), + commit(undefined, [set]) + ); + }); + + it('support set with partials and merge', () => { + const set = { + update: { + fields: { + title: { + stringValue: 'story', + }, + }, + name: DOCUMENT_NAME, + }, + updateMask: { + fieldPaths: ['title'], + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + const postRef = docRef.withConverter(postConverterMerge); + transaction.set(postRef, {title: 'story'} as Partial, { + merge: true, + }); + return Promise.resolve(); + }, + begin(), + commit(undefined, [set]) + ); + }); + + it('support set with partials and mergeFields', () => { + const set = { + update: { + fields: { + title: { + stringValue: 'story', + }, + }, + name: DOCUMENT_NAME, + }, + updateMask: { + fieldPaths: ['title'], + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + const postRef = docRef.withConverter(postConverter); + transaction.set( + postRef, + {title: 'story', author: 'person'} as Partial, + { + mergeFields: ['title'], + } + ); + return Promise.resolve(); + }, + begin(), + commit(undefined, [set]) + ); + }); + + it('support delete', () => { + const remove = { + delete: DOCUMENT_NAME, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.delete(docRef); + return Promise.resolve(); + }, + begin(), + commit(undefined, [remove]) + ); + }); + + it('support multiple writes', () => { + const remove = { + delete: DOCUMENT_NAME, + }; + + const set = { + update: { + fields: {}, + name: DOCUMENT_NAME, + }, + }; + + return runTransaction( + /* transactionOptions= */ {}, + (transaction, docRef) => { + transaction.delete(docRef).set(docRef, {}); + return Promise.resolve(); + }, + begin(), + commit(undefined, [remove, set]) + ); + }); +}); + +describe('failed transactions (with pessimistic locking)', () => { + const retryBehavior: {[code: number]: boolean} = { + [Status.CANCELLED]: true, + [Status.UNKNOWN]: true, + [Status.INVALID_ARGUMENT]: false, + [Status.DEADLINE_EXCEEDED]: true, + [Status.NOT_FOUND]: false, + [Status.ALREADY_EXISTS]: false, + [Status.RESOURCE_EXHAUSTED]: true, + [Status.FAILED_PRECONDITION]: false, + [Status.ABORTED]: true, + [Status.OUT_OF_RANGE]: false, + [Status.UNIMPLEMENTED]: false, + [Status.INTERNAL]: true, + [Status.UNAVAILABLE]: true, + [Status.DATA_LOSS]: false, + [Status.UNAUTHENTICATED]: true, + }; + + it('retries commit based on error code', async () => { + const transactionFunction = () => Promise.resolve(); + + for (const [errorCode, retry] of Object.entries(retryBehavior)) { + const serverError = new GoogleError('Test Error'); + serverError.code = Number(errorCode) as Status; + + if (retry) { + await runTransaction( + /* transactionOptions= */ {}, + transactionFunction, + begin({transactionId: 'foo1'}), + commit('foo1', undefined, serverError), + rollback('foo1'), + backoff(), + begin({ + transactionId: 'foo2', + readWrite: {prevTransactionId: 'foo1'}, + }), + commit('foo2') + ); + } else { + await expect( + runTransaction( + /* transactionOptions= */ {}, + transactionFunction, + begin({transactionId: 'foo1'}), + commit('foo1', undefined, serverError), + rollback('foo1') + ) + ).to.eventually.be.rejected; + } + } + }); + + it('retries commit for expired transaction', async () => { + const transactionFunction = () => Promise.resolve(); + + const serverError = new GoogleError( + 'The referenced transaction has expired or is no longer valid.' + ); + serverError.code = Status.INVALID_ARGUMENT; + + await runTransaction( + /* transactionOptions= */ {}, + transactionFunction, + begin({transactionId: 'foo1'}), + commit('foo1', undefined, serverError), + rollback('foo1'), + backoff(), + begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), + commit('foo2') + ); + }); + + it('retries runQuery based on error code', async () => { + const transactionFunction = ( + transaction: Transaction, + docRef: DocumentReference + ) => { + const query = docRef.parent.where('foo', '==', 'bar'); + return transaction.get(query); + }; + + for (const [errorCode, retry] of Object.entries(retryBehavior)) { + const serverError = new GoogleError('Test Error'); + serverError.code = Number(errorCode) as Status; + + if (retry) { + await runTransaction( + /* transactionOptions= */ {}, + transactionFunction, + begin({transactionId: 'foo1'}), + query('foo1', serverError), + rollback('foo1'), + backoff(), + begin({ + transactionId: 'foo2', + readWrite: {prevTransactionId: 'foo1'}, + }), + query('foo2'), + commit('foo2') + ); + } else { + await expect( + runTransaction( + /* transactionOptions= */ {}, + transactionFunction, + begin({transactionId: 'foo1'}), + query('foo1', serverError), + rollback('foo1') + ) + ).to.eventually.be.rejected; + } + } + }); + + it('retries batchGetDocuments based on error code', async () => { + const transactionFunction = ( + transaction: Transaction, + docRef: DocumentReference + ) => { + return transaction.get(docRef); + }; + + for (const [errorCode, retry] of Object.entries(retryBehavior)) { + const serverError = new GoogleError('Test Error'); + serverError.code = Number(errorCode) as Status; + + if (retry) { + await runTransaction( + /* transactionOptions= */ {}, transactionFunction, begin({transactionId: 'foo1'}), getDocument('foo1', serverError), @@ -708,182 +1079,91 @@ describe('failed transactions', () => { return runTransaction( /* transactionOptions= */ {}, async () => {}, - begin({transactionId: 'foo1'}), - commit('foo1', [], err), - rollback('foo1'), - backoff(/* maxDelay= */ true), - begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), - commit('foo2') - ); - }); -}); - -describe('transaction operations', () => { - it('support get with document ref', () => { - return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - return transaction.get(docRef).then(doc => { - expect(doc.id).to.equal('documentId'); - }); - }, - begin(), - getDocument(), - commit() - ); - }); - - it('requires a query or document for get', () => { - return runTransaction( - /* transactionOptions= */ {}, - (transaction: InvalidApiUsage) => { - expect(() => transaction.get()).to.throw( - 'Value for argument "refOrQuery" must be a DocumentReference or a Query.' - ); - - expect(() => transaction.get('foo')).to.throw( - 'Value for argument "refOrQuery" must be a DocumentReference or a Query.' - ); - - return Promise.resolve(); - }, - begin(), - commit() - ); - }); - - it('enforce that gets come before writes', () => { - return expect( - runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.set(docRef, {foo: 'bar'}); - return transaction.get(docRef); - }, - begin(), - rollback() - ) - ).to.eventually.be.rejectedWith( - 'Firestore transactions require all reads to be executed before all writes.' - ); - }); - - it('support get with query', () => { - return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - const query = docRef.parent.where('foo', '==', 'bar'); - return transaction.get(query).then(results => { - expect(results.docs[0].id).to.equal('documentId'); - }); - }, - begin(), - query(), - commit() - ); - }); - - it('supports read-only transactions', () => { - return runTransaction( - {readOnly: true}, - (transaction, docRef) => transaction.get(docRef), - begin({readOnly: {}}), - getDocument(), - commit() + begin({transactionId: 'foo1'}), + commit('foo1', [], err), + rollback('foo1'), + backoff(/* maxDelay= */ true), + begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), + commit('foo2') ); }); +}); - it('supports read-only transactions with read time', () => { - return runTransaction( - { - readOnly: true, - readTime: Timestamp.fromMillis(1), +describe('successful transactions (with optimistic locking)', () => { + it('uses lastUpdateTime precondition for existing documents', () => { + const verify = { + verify: DOCUMENT_NAME, + currentDocument: { + updateTime: { + seconds: '3', + nanos: 4, + }, }, - (transaction, docRef) => transaction.get(docRef), - begin({readOnly: {readTime: {nanos: 1000000}}}), - getDocument(), - commit() - ); - }); + }; - it('support getAll', () => { return runTransaction( - /* transactionOptions= */ {}, + {optimisticLocking: true}, (transaction, docRef) => { - const firstDoc = docRef.parent.doc('firstDocument'); - const secondDoc = docRef.parent.doc('secondDocument'); - - return transaction.getAll(firstDoc, secondDoc).then(docs => { - expect(docs.length).to.equal(2); - expect(docs[0].id).to.equal('firstDocument'); - expect(docs[1].id).to.equal('secondDocument'); + return transaction.get(docRef).then(doc => { + expect(doc.id).to.equal('documentId'); }); }, begin(), - getAll(['firstDocument', 'secondDocument']), - commit() + getDocument(/* transaction= */ ''), + commit(undefined, [verify]) ); }); - it('support getAll with field mask', () => { + it('uses exists precondition for missing documents', () => { + const verify = { + verify: DOCUMENT_NAME, + currentDocument: { + exists: false, + }, + }; + return runTransaction( - /* transactionOptions= */ {}, + {optimisticLocking: true}, (transaction, docRef) => { - const doc = docRef.parent.doc('doc'); - - return transaction.getAll(doc, { - fieldMask: ['a.b', new FieldPath('a.b')], + return transaction.get(docRef).then(doc => { + expect(doc.exists).to.equal(false); }); }, begin(), - getAll(['doc'], ['a.b', '`a.b`']), - commit() - ); - }); - - it('enforce that getAll come before writes', () => { - return expect( - runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.set(docRef, {foo: 'bar'}); - return transaction.getAll(docRef); - }, - begin(), - rollback() - ) - ).to.eventually.be.rejectedWith( - 'Firestore transactions require all reads to be executed before all writes.' + getMissing(), + commit(undefined, [verify]) ); }); - it('support create', () => { - const create = { - currentDocument: { - exists: false, - }, + it('combines precondition with existing write', () => { + const set = { update: { fields: {}, name: DOCUMENT_NAME, }, + currentDocument: { + updateTime: { + seconds: '3', + nanos: 4, + }, + }, }; return runTransaction( - /* transactionOptions= */ {}, + {optimisticLocking: true}, (transaction, docRef) => { - transaction.create(docRef, {}); - return Promise.resolve(); + return transaction.get(docRef).then(() => { + transaction.set(docRef, {}); + }); }, begin(), - commit(undefined, [create]) + getDocument(/* transaction= */ ''), + commit(undefined, [set]) ); }); - it('support update', () => { - const update = { - currentDocument: { - exists: true, - }, + it('does not combine precondition if already set', () => { + const set = { update: { fields: { a: { @@ -901,168 +1181,194 @@ describe('transaction operations', () => { updateMask: { fieldPaths: ['a.b'], }, - }; - - return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.update(docRef, {'a.b': 'c'}); - transaction.update(docRef, 'a.b', 'c'); - transaction.update(docRef, new Firestore.FieldPath('a', 'b'), 'c'); - return Promise.resolve(); + currentDocument: { + updateTime: { + seconds: '1', + nanos: 2, + }, }, - begin(), - commit(undefined, [update, update, update]) - ); - }); - - it('support set', () => { - const set = { - update: { - fields: { - 'a.b': { - stringValue: 'c', - }, + }; + const verify = { + verify: DOCUMENT_NAME, + currentDocument: { + updateTime: { + seconds: '3', + nanos: 4, }, - name: DOCUMENT_NAME, }, }; return runTransaction( - /* transactionOptions= */ {}, + {optimisticLocking: true}, (transaction, docRef) => { - transaction.set(docRef, {'a.b': 'c'}); - return Promise.resolve(); + return transaction.get(docRef).then(() => { + transaction.update( + docRef, + {'a.b': 'c'}, + {lastUpdateTime: new Timestamp(1, 2)} + ); + }); }, begin(), - commit(undefined, [set]) + getDocument(/* transaction= */ ''), + commit(undefined, [set, verify]) ); }); - it('support set with merge', () => { - const set = { - update: { - fields: { - 'a.b': { - stringValue: 'c', - }, - }, - name: DOCUMENT_NAME, + it('uses the same readTime for all document reads', () => { + const verify1 = { + verify: `${DOCUMENT_NAME}_1`, + currentDocument: { + exists: false, }, - updateMask: { - fieldPaths: ['`a.b`'], + }; + const verify2 = { + verify: `${DOCUMENT_NAME}_2`, + currentDocument: { + exists: false, }, }; return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.set(docRef, {'a.b': 'c'}, {merge: true}); - return Promise.resolve(); + {optimisticLocking: true}, + async (transaction, docRef) => { + const collection = docRef.parent; + await transaction.get(collection.doc(`${DOCUMENT_ID}_1`)); + await transaction.get(collection.doc(`${DOCUMENT_ID}_2`)); }, begin(), - commit(undefined, [set]) + getMissing(`${DOCUMENT_ID}_1`), + getMissing(`${DOCUMENT_ID}_2`, {seconds: '5', nanos: 6}), + commit(undefined, [verify1, verify2]) ); }); +}); - it('support set with partials and merge', () => { - const set = { - update: { - fields: { - title: { - stringValue: 'story', - }, - }, - name: DOCUMENT_NAME, - }, - updateMask: { - fieldPaths: ['title'], +describe('failed transactions (with optimistic locking)', () => { + it('retries commit for failed precondition', () => { + const serverError = new GoogleError(''); + serverError.code = Status.FAILED_PRECONDITION; + + const verify = { + verify: DOCUMENT_NAME, + currentDocument: { + exists: false, }, }; return runTransaction( - /* transactionOptions= */ {}, + {optimisticLocking: true}, (transaction, docRef) => { - const postRef = docRef.withConverter(postConverterMerge); - transaction.set(postRef, {title: 'story'} as Partial, { - merge: true, - }); - return Promise.resolve(); + return transaction.get(docRef); }, - begin(), - commit(undefined, [set]) + begin({transactionId: 'foo1'}), + getMissing(), + commit('foo1', [verify], serverError), + rollback('foo1'), + backoff(), + begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), + getMissing(), + commit('foo2', [verify]) ); }); - it('support set with partials and mergeFields', () => { - const set = { - update: { - fields: { - title: { - stringValue: 'story', - }, + it('rejects queries', () => { + return expect( + runTransaction( + {optimisticLocking: true}, + (transaction, docRef) => { + return transaction.get(docRef.parent); + }, + begin(), + rollback() + ) + ).to.eventually.be.rejectedWith( + 'Queries are not supported for transactions that use optimistic locking.' + ); + }); + + it('cannot read a document twice if version changed', () => { + const serverError = new GoogleError(''); + serverError.code = Status.FAILED_PRECONDITION; + + const verify = { + verify: DOCUMENT_NAME, + currentDocument: { + updateTime: { + seconds: '1', + nanos: 2, }, - name: DOCUMENT_NAME, - }, - updateMask: { - fieldPaths: ['title'], }, }; return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - const postRef = docRef.withConverter(postConverter); - transaction.set( - postRef, - {title: 'story', author: 'person'} as Partial, - { - mergeFields: ['title'], - } - ); - return Promise.resolve(); + {optimisticLocking: true}, + async (transaction, docRef) => { + await transaction.get(docRef); + await transaction.get(docRef); }, - begin(), - commit(undefined, [set]) + begin({transactionId: 'foo1'}), + getDocument(/* transaction= */ '', /* error= */ undefined, { + seconds: '1', + nanos: 2, + }), + getDocument( + /* transaction= */ '', + /* error= */ undefined, + { + seconds: '2', + nanos: 3, + }, + { + seconds: '5', + nanos: 6, + } + ), + rollback('foo1'), + backoff(), + begin({transactionId: 'foo2', readWrite: {prevTransactionId: 'foo1'}}), + getDocument(/* transaction= */ '', /* error= */ undefined, { + seconds: '1', + nanos: 2, + }), + getDocument( + /* transaction= */ '', + /* error= */ undefined, + { + seconds: '1', + nanos: 2, + }, + { + seconds: '5', + nanos: 6, + } + ), + commit('foo2', [verify]) ); }); +}); - it('support delete', () => { - const remove = { - delete: DOCUMENT_NAME, - }; - +describe('read-only transactions', () => { + it('support get', () => { return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.delete(docRef); - return Promise.resolve(); - }, - begin(), - commit(undefined, [remove]) + {readOnly: true}, + (transaction, docRef) => transaction.get(docRef), + begin({readOnly: {}}), + getDocument(), + commit() ); }); - it('support multiple writes', () => { - const remove = { - delete: DOCUMENT_NAME, - }; - - const set = { - update: { - fields: {}, - name: DOCUMENT_NAME, - }, - }; - + it('support get with read time', () => { return runTransaction( - /* transactionOptions= */ {}, - (transaction, docRef) => { - transaction.delete(docRef).set(docRef, {}); - return Promise.resolve(); + { + readOnly: true, + readTime: Timestamp.fromMillis(1), }, - begin(), - commit(undefined, [remove, set]) + (transaction, docRef) => transaction.get(docRef), + begin({readOnly: {readTime: {nanos: 1000000}}}), + getDocument(), + commit() ); }); }); diff --git a/types/firestore.d.ts b/types/firestore.d.ts index 558ae812a..6eaefe6c9 100644 --- a/types/firestore.d.ts +++ b/types/firestore.d.ts @@ -190,6 +190,16 @@ declare namespace FirebaseFirestore { export interface ReadWriteTransactionOptions { /** Set to false or omit to indicate a read-write transaction. */ readOnly?: false; + /** + * Whether to use optimistic locking. By default, transactions lock + * documents pessimistically, which increases the chance that transactions + * succeed but blocks other clients` modifications. With + * `optimisticLocking`, writes are not blocked. When other clients modify a + * document, the transaction is instead retried. + * + * Optimistic transactions do not support queries. + */ + optimisticLocking?: boolean; /** * The maximum number of attempts for this transaction. Defaults to five. */ @@ -336,10 +346,16 @@ declare namespace FirebaseFirestore { * Transactions can be performed as read-only or read-write transactions. By * default, transactions are executed in read-write mode. * - * A read-write transaction obtains a pessimistic lock on all documents that - * are read during the transaction. These locks block other transactions, - * batched writes, and other non-transactional writes from changing that - * document. Any writes in a read-write transactions are committed once + * By default, read-write transactions obtain a pessimistic locks on all + * documents that are read during the transaction. These locks block other + * transactions, batched writes, and other non-transactional writes from + * changing that document. If you enable optimistic locking, other clients + * can continue to modify these documents. The transaction will be retried + * if a concurrent write affects the data read during the transaction. + * + * A transaction can modify up to 500 documents. If you enable optimistic + * locking, any document read during the transaction also counts against + * this limit. Any writes in a read-write transactions are committed once * 'updateFunction' resolves, which also releases all locks. * * If a read-write transaction fails with contention, the transaction is