diff --git a/Cargo.lock b/Cargo.lock index a3a995c3d6e..a9a9d76d788 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1600,7 +1600,6 @@ dependencies = [ "base64 0.22.1", "bip37-bloom-filter", "chrono", - "ciborium", "clap", "dapi-grpc", "dash-async", diff --git a/packages/dapi-grpc/build.rs b/packages/dapi-grpc/build.rs index f0412b06165..0abcf5c99c2 100644 --- a/packages/dapi-grpc/build.rs +++ b/packages/dapi-grpc/build.rs @@ -354,8 +354,11 @@ fn configure_platform(mut platform: MappingConfig) -> MappingConfig { .field_attribute("nullifiers", SERDE_WITH_BASE64) // Get documents fields .field_attribute("data_contract_id", SERDE_WITH_BYTES) - .field_attribute("where", SERDE_WITH_BYTES) - .field_attribute("order_by", SERDE_WITH_BYTES) + // V0 still ships CBOR for `where` / `order_by`; V1 ships + // typed `repeated WhereClause` / `repeated OrderClause` + // and doesn't need the `bytes`-shaped serde shim. + .field_attribute("GetDocumentsRequestV0.where", SERDE_WITH_BYTES) + .field_attribute("GetDocumentsRequestV0.order_by", SERDE_WITH_BYTES) // Proof fields .field_attribute("Proof.grovedb_proof", SERDE_WITH_BYTES) .field_attribute("Proof.quorum_hash", SERDE_WITH_BYTES) diff --git a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js index 711943624a4..dd6ee8270ed 100644 --- a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js +++ b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js @@ -20090,6 +20090,2128 @@ $root.org = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * WhereOperator enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator + * @enum {number} + * @property {number} EQUAL=0 EQUAL value + * @property {number} GREATER_THAN=1 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUALS=2 GREATER_THAN_OR_EQUALS value + * @property {number} LESS_THAN=3 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUALS=4 LESS_THAN_OR_EQUALS value + * @property {number} BETWEEN=5 BETWEEN value + * @property {number} BETWEEN_EXCLUDE_BOUNDS=6 BETWEEN_EXCLUDE_BOUNDS value + * @property {number} BETWEEN_EXCLUDE_LEFT=7 BETWEEN_EXCLUDE_LEFT value + * @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value + * @property {number} IN=9 IN value + * @property {number} STARTS_WITH=10 STARTS_WITH value + */ + GetDocumentsRequest.WhereOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EQUAL"] = 0; + values[valuesById[1] = "GREATER_THAN"] = 1; + values[valuesById[2] = "GREATER_THAN_OR_EQUALS"] = 2; + values[valuesById[3] = "LESS_THAN"] = 3; + values[valuesById[4] = "LESS_THAN_OR_EQUALS"] = 4; + values[valuesById[5] = "BETWEEN"] = 5; + values[valuesById[6] = "BETWEEN_EXCLUDE_BOUNDS"] = 6; + values[valuesById[7] = "BETWEEN_EXCLUDE_LEFT"] = 7; + values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8; + values[valuesById[9] = "IN"] = 9; + values[valuesById[10] = "STARTS_WITH"] = 10; + return values; + })(); + + GetDocumentsRequest.DocumentFieldValue = (function() { + + /** + * Properties of a DocumentFieldValue. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IDocumentFieldValue + * @property {boolean|null} [boolValue] DocumentFieldValue boolValue + * @property {number|Long|null} [int64Value] DocumentFieldValue int64Value + * @property {number|Long|null} [uint64Value] DocumentFieldValue uint64Value + * @property {number|null} [doubleValue] DocumentFieldValue doubleValue + * @property {string|null} [text] DocumentFieldValue text + * @property {Uint8Array|null} [bytesValue] DocumentFieldValue bytesValue + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList|null} [list] DocumentFieldValue list + * @property {boolean|null} [nullValue] DocumentFieldValue nullValue + */ + + /** + * Constructs a new DocumentFieldValue. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a DocumentFieldValue. + * @implements IDocumentFieldValue + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue=} [properties] Properties to set + */ + function DocumentFieldValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentFieldValue boolValue. + * @member {boolean} boolValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.boolValue = false; + + /** + * DocumentFieldValue int64Value. + * @member {number|Long} int64Value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DocumentFieldValue uint64Value. + * @member {number|Long} uint64Value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DocumentFieldValue doubleValue. + * @member {number} doubleValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.doubleValue = 0; + + /** + * DocumentFieldValue text. + * @member {string} text + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.text = ""; + + /** + * DocumentFieldValue bytesValue. + * @member {Uint8Array} bytesValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.bytesValue = $util.newBuffer([]); + + /** + * DocumentFieldValue list. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList|null|undefined} list + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.list = null; + + /** + * DocumentFieldValue nullValue. + * @member {boolean} nullValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.nullValue = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DocumentFieldValue variant. + * @member {"boolValue"|"int64Value"|"uint64Value"|"doubleValue"|"text"|"bytesValue"|"list"|"nullValue"|undefined} variant + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + Object.defineProperty(DocumentFieldValue.prototype, "variant", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "uint64Value", "doubleValue", "text", "bytesValue", "list", "nullValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DocumentFieldValue instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue instance + */ + DocumentFieldValue.create = function create(properties) { + return new DocumentFieldValue(properties); + }; + + /** + * Encodes the specified DocumentFieldValue message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue} message DocumentFieldValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFieldValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).sint64(message.int64Value); + if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.doubleValue); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.text); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.encode(message.list, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullValue); + return writer; + }; + + /** + * Encodes the specified DocumentFieldValue message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue} message DocumentFieldValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFieldValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentFieldValue message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFieldValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.boolValue = reader.bool(); + break; + case 2: + message.int64Value = reader.sint64(); + break; + case 3: + message.uint64Value = reader.uint64(); + break; + case 4: + message.doubleValue = reader.double(); + break; + case 5: + message.text = reader.string(); + break; + case 6: + message.bytesValue = reader.bytes(); + break; + case 7: + message.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.decode(reader, reader.uint32()); + break; + case 8: + message.nullValue = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentFieldValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFieldValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentFieldValue message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentFieldValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.variant = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.uint64Value != null && message.hasOwnProperty("uint64Value")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high))) + return "uint64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify(message.list); + if (error) + return "list." + error; + } + } + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (typeof message.nullValue !== "boolean") + return "nullValue: boolean expected"; + } + return null; + }; + + /** + * Creates a DocumentFieldValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + */ + DocumentFieldValue.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.uint64Value != null) + if ($util.Long) + (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true; + else if (typeof object.uint64Value === "string") + message.uint64Value = parseInt(object.uint64Value, 10); + else if (typeof object.uint64Value === "number") + message.uint64Value = object.uint64Value; + else if (typeof object.uint64Value === "object") + message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.text != null) + message.text = String(object.text); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.list: object expected"); + message.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.fromObject(object.list); + } + if (object.nullValue != null) + message.nullValue = Boolean(object.nullValue); + return message; + }; + + /** + * Creates a plain object from a DocumentFieldValue message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} message DocumentFieldValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentFieldValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.variant = "boolValue"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.variant = "int64Value"; + } + if (message.uint64Value != null && message.hasOwnProperty("uint64Value")) { + if (typeof message.uint64Value === "number") + object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value; + else + object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value; + if (options.oneofs) + object.variant = "uint64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.variant = "doubleValue"; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.variant = "text"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.variant = "bytesValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(message.list, options); + if (options.oneofs) + object.variant = "list"; + } + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = message.nullValue; + if (options.oneofs) + object.variant = "nullValue"; + } + return object; + }; + + /** + * Converts this DocumentFieldValue to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + * @returns {Object.} JSON object + */ + DocumentFieldValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DocumentFieldValue.ValueList = (function() { + + /** + * Properties of a ValueList. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @interface IValueList + * @property {Array.|null} [values] ValueList values + */ + + /** + * Constructs a new ValueList. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @classdesc Represents a ValueList. + * @implements IValueList + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList=} [properties] Properties to set + */ + function ValueList(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueList values. + * @member {Array.} values + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @instance + */ + ValueList.prototype.values = $util.emptyArray; + + /** + * Creates a new ValueList instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList instance + */ + ValueList.create = function create(properties) { + return new ValueList(properties); + }; + + /** + * Encodes the specified ValueList message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList} message ValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValueList message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList} message ValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueList message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueList message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ValueList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + */ + ValueList.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.values: object expected"); + message.values[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValueList message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} message ValueList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ValueList to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @instance + * @returns {Object.} JSON object + */ + ValueList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueList; + })(); + + return DocumentFieldValue; + })(); + + GetDocumentsRequest.WhereClause = (function() { + + /** + * Properties of a WhereClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IWhereClause + * @property {string|null} [field] WhereClause field + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator|null} [operator] WhereClause operator + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null} [value] WhereClause value + */ + + /** + * Constructs a new WhereClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a WhereClause. + * @implements IWhereClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause=} [properties] Properties to set + */ + function WhereClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WhereClause field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.field = ""; + + /** + * WhereClause operator. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} operator + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.operator = 0; + + /** + * WhereClause value. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null|undefined} value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.value = null; + + /** + * Creates a new WhereClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause instance + */ + WhereClause.create = function create(properties) { + return new WhereClause(properties); + }; + + /** + * Encodes the specified WhereClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause} message WhereClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WhereClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.value, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WhereClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause} message WhereClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WhereClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WhereClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WhereClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.field = reader.string(); + break; + case 2: + message.operator = reader.int32(); + break; + case 3: + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WhereClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WhereClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WhereClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WhereClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a WhereClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + */ + WhereClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause(); + if (object.field != null) + message.field = String(object.field); + switch (object.operator) { + case "EQUAL": + case 0: + message.operator = 0; + break; + case "GREATER_THAN": + case 1: + message.operator = 1; + break; + case "GREATER_THAN_OR_EQUALS": + case 2: + message.operator = 2; + break; + case "LESS_THAN": + case 3: + message.operator = 3; + break; + case "LESS_THAN_OR_EQUALS": + case 4: + message.operator = 4; + break; + case "BETWEEN": + case 5: + message.operator = 5; + break; + case "BETWEEN_EXCLUDE_BOUNDS": + case 6: + message.operator = 6; + break; + case "BETWEEN_EXCLUDE_LEFT": + case 7: + message.operator = 7; + break; + case "BETWEEN_EXCLUDE_RIGHT": + case 8: + message.operator = 8; + break; + case "IN": + case 9: + message.operator = 9; + break; + case "STARTS_WITH": + case 10: + message.operator = 10; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.value: object expected"); + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a WhereClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} message WhereClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WhereClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.operator = options.enums === String ? "EQUAL" : 0; + object.value = null; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator[message.operator] : message.operator; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this WhereClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + * @returns {Object.} JSON object + */ + WhereClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WhereClause; + })(); + + GetDocumentsRequest.HavingAggregate = (function() { + + /** + * Properties of a HavingAggregate. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingAggregate + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function|null} ["function"] HavingAggregate function + * @property {string|null} [field] HavingAggregate field + */ + + /** + * Constructs a new HavingAggregate. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingAggregate. + * @implements IHavingAggregate + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate=} [properties] Properties to set + */ + function HavingAggregate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingAggregate function. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} function + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + */ + HavingAggregate.prototype["function"] = 0; + + /** + * HavingAggregate field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + */ + HavingAggregate.prototype.field = ""; + + /** + * Creates a new HavingAggregate instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate instance + */ + HavingAggregate.create = function create(properties) { + return new HavingAggregate(properties); + }; + + /** + * Encodes the specified HavingAggregate message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate} message HavingAggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingAggregate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message["function"]); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); + return writer; + }; + + /** + * Encodes the specified HavingAggregate message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate} message HavingAggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingAggregate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingAggregate message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingAggregate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["function"] = reader.int32(); + break; + case 2: + message.field = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingAggregate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingAggregate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingAggregate message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingAggregate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + switch (message["function"]) { + default: + return "function: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + return null; + }; + + /** + * Creates a HavingAggregate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + */ + HavingAggregate.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate(); + switch (object["function"]) { + case "COUNT": + case 0: + message["function"] = 0; + break; + case "SUM": + case 1: + message["function"] = 1; + break; + case "AVG": + case 2: + message["function"] = 2; + break; + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from a HavingAggregate message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} message HavingAggregate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingAggregate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["function"] = options.enums === String ? "COUNT" : 0; + object.field = ""; + } + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function[message["function"]] : message["function"]; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + return object; + }; + + /** + * Converts this HavingAggregate to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + * @returns {Object.} JSON object + */ + HavingAggregate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Function enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function + * @enum {number} + * @property {number} COUNT=0 COUNT value + * @property {number} SUM=1 SUM value + * @property {number} AVG=2 AVG value + */ + HavingAggregate.Function = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COUNT"] = 0; + values[valuesById[1] = "SUM"] = 1; + values[valuesById[2] = "AVG"] = 2; + return values; + })(); + + return HavingAggregate; + })(); + + GetDocumentsRequest.HavingRanking = (function() { + + /** + * Properties of a HavingRanking. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingRanking + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind|null} [kind] HavingRanking kind + * @property {number|Long|null} [n] HavingRanking n + */ + + /** + * Constructs a new HavingRanking. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingRanking. + * @implements IHavingRanking + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking=} [properties] Properties to set + */ + function HavingRanking(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingRanking kind. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} kind + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + */ + HavingRanking.prototype.kind = 0; + + /** + * HavingRanking n. + * @member {number|Long} n + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + */ + HavingRanking.prototype.n = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new HavingRanking instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking instance + */ + HavingRanking.create = function create(properties) { + return new HavingRanking(properties); + }; + + /** + * Encodes the specified HavingRanking message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking} message HavingRanking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingRanking.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.n != null && Object.hasOwnProperty.call(message, "n")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.n); + return writer; + }; + + /** + * Encodes the specified HavingRanking message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking} message HavingRanking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingRanking.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingRanking message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingRanking.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.int32(); + break; + case 2: + message.n = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingRanking message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingRanking.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingRanking message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingRanking.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.n != null && message.hasOwnProperty("n")) + if (!$util.isInteger(message.n) && !(message.n && $util.isInteger(message.n.low) && $util.isInteger(message.n.high))) + return "n: integer|Long expected"; + return null; + }; + + /** + * Creates a HavingRanking message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + */ + HavingRanking.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking(); + switch (object.kind) { + case "MIN": + case 0: + message.kind = 0; + break; + case "MAX": + case 1: + message.kind = 1; + break; + case "TOP": + case 2: + message.kind = 2; + break; + case "BOTTOM": + case 3: + message.kind = 3; + break; + } + if (object.n != null) + if ($util.Long) + (message.n = $util.Long.fromValue(object.n)).unsigned = true; + else if (typeof object.n === "string") + message.n = parseInt(object.n, 10); + else if (typeof object.n === "number") + message.n = object.n; + else if (typeof object.n === "object") + message.n = new $util.LongBits(object.n.low >>> 0, object.n.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a HavingRanking message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} message HavingRanking + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingRanking.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "MIN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.n = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.n = options.longs === String ? "0" : 0; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind[message.kind] : message.kind; + if (message.n != null && message.hasOwnProperty("n")) + if (typeof message.n === "number") + object.n = options.longs === String ? String(message.n) : message.n; + else + object.n = options.longs === String ? $util.Long.prototype.toString.call(message.n) : options.longs === Number ? new $util.LongBits(message.n.low >>> 0, message.n.high >>> 0).toNumber(true) : message.n; + return object; + }; + + /** + * Converts this HavingRanking to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + * @returns {Object.} JSON object + */ + HavingRanking.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Kind enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind + * @enum {number} + * @property {number} MIN=0 MIN value + * @property {number} MAX=1 MAX value + * @property {number} TOP=2 TOP value + * @property {number} BOTTOM=3 BOTTOM value + */ + HavingRanking.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIN"] = 0; + values[valuesById[1] = "MAX"] = 1; + values[valuesById[2] = "TOP"] = 2; + values[valuesById[3] = "BOTTOM"] = 3; + return values; + })(); + + return HavingRanking; + })(); + + GetDocumentsRequest.HavingClause = (function() { + + /** + * Properties of a HavingClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingClause + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null} [aggregate] HavingClause aggregate + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator|null} [operator] HavingClause operator + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null} [value] HavingClause value + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking|null} [ranking] HavingClause ranking + */ + + /** + * Constructs a new HavingClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingClause. + * @implements IHavingClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause=} [properties] Properties to set + */ + function HavingClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingClause aggregate. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null|undefined} aggregate + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.aggregate = null; + + /** + * HavingClause operator. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} operator + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.operator = 0; + + /** + * HavingClause value. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null|undefined} value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.value = null; + + /** + * HavingClause ranking. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking|null|undefined} ranking + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.ranking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HavingClause right. + * @member {"value"|"ranking"|undefined} right + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + Object.defineProperty(HavingClause.prototype, "right", { + get: $util.oneOfGetter($oneOfFields = ["value", "ranking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HavingClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause instance + */ + HavingClause.create = function create(properties) { + return new HavingClause(properties); + }; + + /** + * Encodes the specified HavingClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause} message HavingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aggregate != null && Object.hasOwnProperty.call(message, "aggregate")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.encode(message.aggregate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.value, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ranking != null && Object.hasOwnProperty.call(message, "ranking")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.encode(message.ranking, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HavingClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause} message HavingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.decode(reader, reader.uint32()); + break; + case 2: + message.operator = reader.int32(); + break; + case 3: + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32()); + break; + case 4: + message.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify(message.aggregate); + if (error) + return "aggregate." + error; + } + if (message.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties.right = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.ranking != null && message.hasOwnProperty("ranking")) { + if (properties.right === 1) + return "right: multiple values"; + properties.right = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify(message.ranking); + if (error) + return "ranking." + error; + } + } + return null; + }; + + /** + * Creates a HavingClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + */ + HavingClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause(); + if (object.aggregate != null) { + if (typeof object.aggregate !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.aggregate: object expected"); + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.fromObject(object.aggregate); + } + switch (object.operator) { + case "EQUAL": + case 0: + message.operator = 0; + break; + case "NOT_EQUAL": + case 1: + message.operator = 1; + break; + case "GREATER_THAN": + case 2: + message.operator = 2; + break; + case "GREATER_THAN_OR_EQUALS": + case 3: + message.operator = 3; + break; + case "LESS_THAN": + case 4: + message.operator = 4; + break; + case "LESS_THAN_OR_EQUALS": + case 5: + message.operator = 5; + break; + case "BETWEEN": + case 6: + message.operator = 6; + break; + case "BETWEEN_EXCLUDE_BOUNDS": + case 7: + message.operator = 7; + break; + case "BETWEEN_EXCLUDE_LEFT": + case 8: + message.operator = 8; + break; + case "BETWEEN_EXCLUDE_RIGHT": + case 9: + message.operator = 9; + break; + case "IN": + case 10: + message.operator = 10; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.value: object expected"); + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.value); + } + if (object.ranking != null) { + if (typeof object.ranking !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.ranking: object expected"); + message.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.fromObject(object.ranking); + } + return message; + }; + + /** + * Creates a plain object from a HavingClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} message HavingClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.aggregate = null; + object.operator = options.enums === String ? "EQUAL" : 0; + } + if (message.aggregate != null && message.hasOwnProperty("aggregate")) + object.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(message.aggregate, options); + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator[message.operator] : message.operator; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.value, options); + if (options.oneofs) + object.right = "value"; + } + if (message.ranking != null && message.hasOwnProperty("ranking")) { + object.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(message.ranking, options); + if (options.oneofs) + object.right = "ranking"; + } + return object; + }; + + /** + * Converts this HavingClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + * @returns {Object.} JSON object + */ + HavingClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Operator enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator + * @enum {number} + * @property {number} EQUAL=0 EQUAL value + * @property {number} NOT_EQUAL=1 NOT_EQUAL value + * @property {number} GREATER_THAN=2 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUALS=3 GREATER_THAN_OR_EQUALS value + * @property {number} LESS_THAN=4 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUALS=5 LESS_THAN_OR_EQUALS value + * @property {number} BETWEEN=6 BETWEEN value + * @property {number} BETWEEN_EXCLUDE_BOUNDS=7 BETWEEN_EXCLUDE_BOUNDS value + * @property {number} BETWEEN_EXCLUDE_LEFT=8 BETWEEN_EXCLUDE_LEFT value + * @property {number} BETWEEN_EXCLUDE_RIGHT=9 BETWEEN_EXCLUDE_RIGHT value + * @property {number} IN=10 IN value + */ + HavingClause.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EQUAL"] = 0; + values[valuesById[1] = "NOT_EQUAL"] = 1; + values[valuesById[2] = "GREATER_THAN"] = 2; + values[valuesById[3] = "GREATER_THAN_OR_EQUALS"] = 3; + values[valuesById[4] = "LESS_THAN"] = 4; + values[valuesById[5] = "LESS_THAN_OR_EQUALS"] = 5; + values[valuesById[6] = "BETWEEN"] = 6; + values[valuesById[7] = "BETWEEN_EXCLUDE_BOUNDS"] = 7; + values[valuesById[8] = "BETWEEN_EXCLUDE_LEFT"] = 8; + values[valuesById[9] = "BETWEEN_EXCLUDE_RIGHT"] = 9; + values[valuesById[10] = "IN"] = 10; + return values; + })(); + + return HavingClause; + })(); + + GetDocumentsRequest.OrderClause = (function() { + + /** + * Properties of an OrderClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IOrderClause + * @property {string|null} [field] OrderClause field + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null} [aggregate] OrderClause aggregate + * @property {boolean|null} [ascending] OrderClause ascending + */ + + /** + * Constructs a new OrderClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents an OrderClause. + * @implements IOrderClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause=} [properties] Properties to set + */ + function OrderClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrderClause field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.field = ""; + + /** + * OrderClause aggregate. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null|undefined} aggregate + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.aggregate = null; + + /** + * OrderClause ascending. + * @member {boolean} ascending + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.ascending = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderClause target. + * @member {"field"|"aggregate"|undefined} target + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + Object.defineProperty(OrderClause.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["field", "aggregate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause instance + */ + OrderClause.create = function create(properties) { + return new OrderClause(properties); + }; + + /** + * Encodes the specified OrderClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause} message OrderClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.ascending != null && Object.hasOwnProperty.call(message, "ascending")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ascending); + if (message.aggregate != null && Object.hasOwnProperty.call(message, "aggregate")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.encode(message.aggregate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrderClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause} message OrderClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.field = reader.string(); + break; + case 3: + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.decode(reader, reader.uint32()); + break; + case 2: + message.ascending = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + properties.target = 1; + if (!$util.isString(message.field)) + return "field: string expected"; + } + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify(message.aggregate); + if (error) + return "aggregate." + error; + } + } + if (message.ascending != null && message.hasOwnProperty("ascending")) + if (typeof message.ascending !== "boolean") + return "ascending: boolean expected"; + return null; + }; + + /** + * Creates an OrderClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + */ + OrderClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause(); + if (object.field != null) + message.field = String(object.field); + if (object.aggregate != null) { + if (typeof object.aggregate !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.aggregate: object expected"); + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.fromObject(object.aggregate); + } + if (object.ascending != null) + message.ascending = Boolean(object.ascending); + return message; + }; + + /** + * Creates a plain object from an OrderClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} message OrderClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.ascending = false; + if (message.field != null && message.hasOwnProperty("field")) { + object.field = message.field; + if (options.oneofs) + object.target = "field"; + } + if (message.ascending != null && message.hasOwnProperty("ascending")) + object.ascending = message.ascending; + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + object.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(message.aggregate, options); + if (options.oneofs) + object.target = "aggregate"; + } + return object; + }; + + /** + * Converts this OrderClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + * @returns {Object.} JSON object + */ + OrderClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OrderClause; + })(); + GetDocumentsRequest.GetDocumentsRequestV0 = (function() { /** @@ -20498,15 +22620,16 @@ $root.org = (function() { * @interface IGetDocumentsRequestV1 * @property {Uint8Array|null} [dataContractId] GetDocumentsRequestV1 dataContractId * @property {string|null} [documentType] GetDocumentsRequestV1 documentType - * @property {Uint8Array|null} [where] GetDocumentsRequestV1 where - * @property {Uint8Array|null} [orderBy] GetDocumentsRequestV1 orderBy + * @property {Array.|null} [whereClauses] GetDocumentsRequestV1 whereClauses + * @property {Array.|null} [orderBy] GetDocumentsRequestV1 orderBy * @property {number|null} [limit] GetDocumentsRequestV1 limit * @property {Uint8Array|null} [startAfter] GetDocumentsRequestV1 startAfter * @property {Uint8Array|null} [startAt] GetDocumentsRequestV1 startAt * @property {boolean|null} [prove] GetDocumentsRequestV1 prove - * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select|null} [select] GetDocumentsRequestV1 select + * @property {Array.|null} [selects] GetDocumentsRequestV1 selects * @property {Array.|null} [groupBy] GetDocumentsRequestV1 groupBy - * @property {Uint8Array|null} [having] GetDocumentsRequestV1 having + * @property {Array.|null} [having] GetDocumentsRequestV1 having + * @property {number|null} [offset] GetDocumentsRequestV1 offset */ /** @@ -20518,7 +22641,11 @@ $root.org = (function() { * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IGetDocumentsRequestV1=} [properties] Properties to set */ function GetDocumentsRequestV1(properties) { + this.whereClauses = []; + this.orderBy = []; + this.selects = []; this.groupBy = []; + this.having = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20542,20 +22669,20 @@ $root.org = (function() { GetDocumentsRequestV1.prototype.documentType = ""; /** - * GetDocumentsRequestV1 where. - * @member {Uint8Array} where + * GetDocumentsRequestV1 whereClauses. + * @member {Array.} whereClauses * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.where = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.whereClauses = $util.emptyArray; /** * GetDocumentsRequestV1 orderBy. - * @member {Uint8Array} orderBy + * @member {Array.} orderBy * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.orderBy = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.orderBy = $util.emptyArray; /** * GetDocumentsRequestV1 limit. @@ -20590,12 +22717,12 @@ $root.org = (function() { GetDocumentsRequestV1.prototype.prove = false; /** - * GetDocumentsRequestV1 select. - * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} select + * GetDocumentsRequestV1 selects. + * @member {Array.} selects * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.select = 0; + GetDocumentsRequestV1.prototype.selects = $util.emptyArray; /** * GetDocumentsRequestV1 groupBy. @@ -20607,11 +22734,19 @@ $root.org = (function() { /** * GetDocumentsRequestV1 having. - * @member {Uint8Array} having + * @member {Array.} having + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @instance + */ + GetDocumentsRequestV1.prototype.having = $util.emptyArray; + + /** + * GetDocumentsRequestV1 offset. + * @member {number} offset * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.having = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.offset = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -20655,10 +22790,12 @@ $root.org = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); - if (message.where != null && Object.hasOwnProperty.call(message, "where")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.orderBy); + if (message.whereClauses != null && message.whereClauses.length) + for (var i = 0; i < message.whereClauses.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.encode(message.whereClauses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.orderBy != null && message.orderBy.length) + for (var i = 0; i < message.orderBy.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.encode(message.orderBy[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.limit); if (message.startAfter != null && Object.hasOwnProperty.call(message, "startAfter")) @@ -20667,13 +22804,17 @@ $root.org = (function() { writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.startAt); if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.prove); - if (message.select != null && Object.hasOwnProperty.call(message, "select")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.select); + if (message.selects != null && message.selects.length) + for (var i = 0; i < message.selects.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.encode(message.selects[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.groupBy != null && message.groupBy.length) for (var i = 0; i < message.groupBy.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.groupBy[i]); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.having); + if (message.having != null && message.having.length) + for (var i = 0; i < message.having.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.encode(message.having[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.offset); return writer; }; @@ -20715,10 +22856,14 @@ $root.org = (function() { message.documentType = reader.string(); break; case 3: - message.where = reader.bytes(); + if (!(message.whereClauses && message.whereClauses.length)) + message.whereClauses = []; + message.whereClauses.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.decode(reader, reader.uint32())); break; case 4: - message.orderBy = reader.bytes(); + if (!(message.orderBy && message.orderBy.length)) + message.orderBy = []; + message.orderBy.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.decode(reader, reader.uint32())); break; case 5: message.limit = reader.uint32(); @@ -20733,7 +22878,9 @@ $root.org = (function() { message.prove = reader.bool(); break; case 9: - message.select = reader.int32(); + if (!(message.selects && message.selects.length)) + message.selects = []; + message.selects.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.decode(reader, reader.uint32())); break; case 10: if (!(message.groupBy && message.groupBy.length)) @@ -20741,7 +22888,12 @@ $root.org = (function() { message.groupBy.push(reader.string()); break; case 11: - message.having = reader.bytes(); + if (!(message.having && message.having.length)) + message.having = []; + message.having.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.decode(reader, reader.uint32())); + break; + case 12: + message.offset = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -20785,12 +22937,24 @@ $root.org = (function() { if (message.documentType != null && message.hasOwnProperty("documentType")) if (!$util.isString(message.documentType)) return "documentType: string expected"; - if (message.where != null && message.hasOwnProperty("where")) - if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) - return "where: buffer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!(message.orderBy && typeof message.orderBy.length === "number" || $util.isString(message.orderBy))) - return "orderBy: buffer expected"; + if (message.whereClauses != null && message.hasOwnProperty("whereClauses")) { + if (!Array.isArray(message.whereClauses)) + return "whereClauses: array expected"; + for (var i = 0; i < message.whereClauses.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify(message.whereClauses[i]); + if (error) + return "whereClauses." + error; + } + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + if (!Array.isArray(message.orderBy)) + return "orderBy: array expected"; + for (var i = 0; i < message.orderBy.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify(message.orderBy[i]); + if (error) + return "orderBy." + error; + } + } if (message.limit != null && message.hasOwnProperty("limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; @@ -20809,14 +22973,15 @@ $root.org = (function() { if (message.prove != null && message.hasOwnProperty("prove")) if (typeof message.prove !== "boolean") return "prove: boolean expected"; - if (message.select != null && message.hasOwnProperty("select")) - switch (message.select) { - default: - return "select: enum value expected"; - case 0: - case 1: - break; + if (message.selects != null && message.hasOwnProperty("selects")) { + if (!Array.isArray(message.selects)) + return "selects: array expected"; + for (var i = 0; i < message.selects.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify(message.selects[i]); + if (error) + return "selects." + error; } + } if (message.groupBy != null && message.hasOwnProperty("groupBy")) { if (!Array.isArray(message.groupBy)) return "groupBy: array expected"; @@ -20824,9 +22989,18 @@ $root.org = (function() { if (!$util.isString(message.groupBy[i])) return "groupBy: string[] expected"; } - if (message.having != null && message.hasOwnProperty("having")) - if (!(message.having && typeof message.having.length === "number" || $util.isString(message.having))) - return "having: buffer expected"; + if (message.having != null && message.hasOwnProperty("having")) { + if (!Array.isArray(message.having)) + return "having: array expected"; + for (var i = 0; i < message.having.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify(message.having[i]); + if (error) + return "having." + error; + } + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; return null; }; @@ -20849,16 +23023,26 @@ $root.org = (function() { message.dataContractId = object.dataContractId; if (object.documentType != null) message.documentType = String(object.documentType); - if (object.where != null) - if (typeof object.where === "string") - $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); - else if (object.where.length >= 0) - message.where = object.where; - if (object.orderBy != null) - if (typeof object.orderBy === "string") - $util.base64.decode(object.orderBy, message.orderBy = $util.newBuffer($util.base64.length(object.orderBy)), 0); - else if (object.orderBy.length >= 0) - message.orderBy = object.orderBy; + if (object.whereClauses) { + if (!Array.isArray(object.whereClauses)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.whereClauses: array expected"); + message.whereClauses = []; + for (var i = 0; i < object.whereClauses.length; ++i) { + if (typeof object.whereClauses[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.whereClauses: object expected"); + message.whereClauses[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.fromObject(object.whereClauses[i]); + } + } + if (object.orderBy) { + if (!Array.isArray(object.orderBy)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.orderBy: array expected"); + message.orderBy = []; + for (var i = 0; i < object.orderBy.length; ++i) { + if (typeof object.orderBy[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.orderBy: object expected"); + message.orderBy[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.fromObject(object.orderBy[i]); + } + } if (object.limit != null) message.limit = object.limit >>> 0; if (object.startAfter != null) @@ -20873,15 +23057,15 @@ $root.org = (function() { message.startAt = object.startAt; if (object.prove != null) message.prove = Boolean(object.prove); - switch (object.select) { - case "DOCUMENTS": - case 0: - message.select = 0; - break; - case "COUNT": - case 1: - message.select = 1; - break; + if (object.selects) { + if (!Array.isArray(object.selects)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.selects: array expected"); + message.selects = []; + for (var i = 0; i < object.selects.length; ++i) { + if (typeof object.selects[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.selects: object expected"); + message.selects[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.fromObject(object.selects[i]); + } } if (object.groupBy) { if (!Array.isArray(object.groupBy)) @@ -20890,11 +23074,18 @@ $root.org = (function() { for (var i = 0; i < object.groupBy.length; ++i) message.groupBy[i] = String(object.groupBy[i]); } - if (object.having != null) - if (typeof object.having === "string") - $util.base64.decode(object.having, message.having = $util.newBuffer($util.base64.length(object.having)), 0); - else if (object.having.length >= 0) - message.having = object.having; + if (object.having) { + if (!Array.isArray(object.having)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.having: array expected"); + message.having = []; + for (var i = 0; i < object.having.length; ++i) { + if (typeof object.having[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.having: object expected"); + message.having[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.fromObject(object.having[i]); + } + } + if (object.offset != null) + message.offset = object.offset >>> 0; return message; }; @@ -20911,8 +23102,13 @@ $root.org = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { + object.whereClauses = []; + object.orderBy = []; + object.selects = []; object.groupBy = []; + object.having = []; + } if (options.defaults) { if (options.bytes === String) object.dataContractId = ""; @@ -20922,39 +23118,24 @@ $root.org = (function() { object.dataContractId = $util.newBuffer(object.dataContractId); } object.documentType = ""; - if (options.bytes === String) - object.where = ""; - else { - object.where = []; - if (options.bytes !== Array) - object.where = $util.newBuffer(object.where); - } - if (options.bytes === String) - object.orderBy = ""; - else { - object.orderBy = []; - if (options.bytes !== Array) - object.orderBy = $util.newBuffer(object.orderBy); - } object.limit = 0; object.prove = false; - object.select = options.enums === String ? "DOCUMENTS" : 0; - if (options.bytes === String) - object.having = ""; - else { - object.having = []; - if (options.bytes !== Array) - object.having = $util.newBuffer(object.having); - } + object.offset = 0; } if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; if (message.documentType != null && message.hasOwnProperty("documentType")) object.documentType = message.documentType; - if (message.where != null && message.hasOwnProperty("where")) - object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = options.bytes === String ? $util.base64.encode(message.orderBy, 0, message.orderBy.length) : options.bytes === Array ? Array.prototype.slice.call(message.orderBy) : message.orderBy; + if (message.whereClauses && message.whereClauses.length) { + object.whereClauses = []; + for (var j = 0; j < message.whereClauses.length; ++j) + object.whereClauses[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject(message.whereClauses[j], options); + } + if (message.orderBy && message.orderBy.length) { + object.orderBy = []; + for (var j = 0; j < message.orderBy.length; ++j) + object.orderBy[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject(message.orderBy[j], options); + } if (message.limit != null && message.hasOwnProperty("limit")) object.limit = message.limit; if (message.startAfter != null && message.hasOwnProperty("startAfter")) { @@ -20969,15 +23150,23 @@ $root.org = (function() { } if (message.prove != null && message.hasOwnProperty("prove")) object.prove = message.prove; - if (message.select != null && message.hasOwnProperty("select")) - object.select = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select[message.select] : message.select; + if (message.selects && message.selects.length) { + object.selects = []; + for (var j = 0; j < message.selects.length; ++j) + object.selects[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject(message.selects[j], options); + } if (message.groupBy && message.groupBy.length) { object.groupBy = []; for (var j = 0; j < message.groupBy.length; ++j) object.groupBy[j] = message.groupBy[j]; } - if (message.having != null && message.hasOwnProperty("having")) - object.having = options.bytes === String ? $util.base64.encode(message.having, 0, message.having.length) : options.bytes === Array ? Array.prototype.slice.call(message.having) : message.having; + if (message.having && message.having.length) { + object.having = []; + for (var j = 0; j < message.having.length; ++j) + object.having[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject(message.having[j], options); + } + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; return object; }; @@ -20992,18 +23181,269 @@ $root.org = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Select enum. - * @name org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select - * @enum {number} - * @property {number} DOCUMENTS=0 DOCUMENTS value - * @property {number} COUNT=1 COUNT value - */ GetDocumentsRequestV1.Select = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENTS"] = 0; - values[valuesById[1] = "COUNT"] = 1; - return values; + + /** + * Properties of a Select. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @interface ISelect + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function|null} ["function"] Select function + * @property {string|null} [field] Select field + */ + + /** + * Constructs a new Select. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @classdesc Represents a Select. + * @implements ISelect + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect=} [properties] Properties to set + */ + function Select(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Select function. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} function + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + */ + Select.prototype["function"] = 0; + + /** + * Select field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + */ + Select.prototype.field = ""; + + /** + * Creates a new Select instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select instance + */ + Select.create = function create(properties) { + return new Select(properties); + }; + + /** + * Encodes the specified Select message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect} message Select message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Select.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message["function"]); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); + return writer; + }; + + /** + * Encodes the specified Select message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect} message Select message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Select.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Select message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Select.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["function"] = reader.int32(); + break; + case 2: + message.field = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Select message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Select.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Select message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Select.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + switch (message["function"]) { + default: + return "function: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + return null; + }; + + /** + * Creates a Select message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + */ + Select.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select(); + switch (object["function"]) { + case "DOCUMENTS": + case 0: + message["function"] = 0; + break; + case "COUNT": + case 1: + message["function"] = 1; + break; + case "SUM": + case 2: + message["function"] = 2; + break; + case "AVG": + case 3: + message["function"] = 3; + break; + case "MIN": + case 4: + message["function"] = 4; + break; + case "MAX": + case 5: + message["function"] = 5; + break; + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from a Select message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} message Select + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Select.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["function"] = options.enums === String ? "DOCUMENTS" : 0; + object.field = ""; + } + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function[message["function"]] : message["function"]; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + return object; + }; + + /** + * Converts this Select to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + * @returns {Object.} JSON object + */ + Select.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Function enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function + * @enum {number} + * @property {number} DOCUMENTS=0 DOCUMENTS value + * @property {number} COUNT=1 COUNT value + * @property {number} SUM=2 SUM value + * @property {number} AVG=3 AVG value + * @property {number} MIN=4 MIN value + * @property {number} MAX=5 MAX value + */ + Select.Function = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENTS"] = 0; + values[valuesById[1] = "COUNT"] = 1; + values[valuesById[2] = "SUM"] = 2; + values[valuesById[3] = "AVG"] = 3; + values[valuesById[4] = "MIN"] = 4; + values[valuesById[5] = "MAX"] = 5; + return values; + })(); + + return Select; })(); return GetDocumentsRequestV1; diff --git a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java index 2000f5bd1b7..472dcf8f1b4 100644 --- a/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java +++ b/packages/dapi-grpc/clients/platform/v0/java/org/dash/platform/dapi/v0/PlatformGrpc.java @@ -2094,13 +2094,6 @@ public void getDocuments(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumen } /** - *
-     * `getDocumentsCount` removed in v1: callers express counts via
-     * `getDocuments` with `version.v1.select = COUNT` (optionally
-     * with `group_by`). See `GetDocumentsRequestV1` for the unified
-     * SQL-shaped surface. The v0-count endpoint shipped briefly in
-     * #3623 and never had stable callers; v1 supersedes it entirely.
-     * 
*/ public void getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request, io.grpc.stub.StreamObserver responseObserver) { @@ -3025,13 +3018,6 @@ public void getDocuments(org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumen } /** - *
-     * `getDocumentsCount` removed in v1: callers express counts via
-     * `getDocuments` with `version.v1.select = COUNT` (optionally
-     * with `group_by`). See `GetDocumentsRequestV1` for the unified
-     * SQL-shaped surface. The v0-count endpoint shipped briefly in
-     * #3623 and never had stable callers; v1 supersedes it entirely.
-     * 
*/ public void getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request, io.grpc.stub.StreamObserver responseObserver) { @@ -3549,13 +3535,6 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetDocumentsResponse getDocu } /** - *
-     * `getDocumentsCount` removed in v1: callers express counts via
-     * `getDocuments` with `version.v1.select = COUNT` (optionally
-     * with `group_by`). See `GetDocumentsRequestV1` for the unified
-     * SQL-shaped surface. The v0-count endpoint shipped briefly in
-     * #3623 and never had stable callers; v1 supersedes it entirely.
-     * 
*/ public org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashResponse getIdentityByPublicKeyHash(org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( @@ -4041,13 +4020,6 @@ public com.google.common.util.concurrent.ListenableFuture - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - * */ public com.google.common.util.concurrent.ListenableFuture getIdentityByPublicKeyHash( org.dash.platform.dapi.v0.PlatformOuterClass.GetIdentityByPublicKeyHashRequest request) { diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js index d3559ff1efb..c0f13e8431f 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -19582,6 +19582,2128 @@ $root.org = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * WhereOperator enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator + * @enum {number} + * @property {number} EQUAL=0 EQUAL value + * @property {number} GREATER_THAN=1 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUALS=2 GREATER_THAN_OR_EQUALS value + * @property {number} LESS_THAN=3 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUALS=4 LESS_THAN_OR_EQUALS value + * @property {number} BETWEEN=5 BETWEEN value + * @property {number} BETWEEN_EXCLUDE_BOUNDS=6 BETWEEN_EXCLUDE_BOUNDS value + * @property {number} BETWEEN_EXCLUDE_LEFT=7 BETWEEN_EXCLUDE_LEFT value + * @property {number} BETWEEN_EXCLUDE_RIGHT=8 BETWEEN_EXCLUDE_RIGHT value + * @property {number} IN=9 IN value + * @property {number} STARTS_WITH=10 STARTS_WITH value + */ + GetDocumentsRequest.WhereOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EQUAL"] = 0; + values[valuesById[1] = "GREATER_THAN"] = 1; + values[valuesById[2] = "GREATER_THAN_OR_EQUALS"] = 2; + values[valuesById[3] = "LESS_THAN"] = 3; + values[valuesById[4] = "LESS_THAN_OR_EQUALS"] = 4; + values[valuesById[5] = "BETWEEN"] = 5; + values[valuesById[6] = "BETWEEN_EXCLUDE_BOUNDS"] = 6; + values[valuesById[7] = "BETWEEN_EXCLUDE_LEFT"] = 7; + values[valuesById[8] = "BETWEEN_EXCLUDE_RIGHT"] = 8; + values[valuesById[9] = "IN"] = 9; + values[valuesById[10] = "STARTS_WITH"] = 10; + return values; + })(); + + GetDocumentsRequest.DocumentFieldValue = (function() { + + /** + * Properties of a DocumentFieldValue. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IDocumentFieldValue + * @property {boolean|null} [boolValue] DocumentFieldValue boolValue + * @property {number|Long|null} [int64Value] DocumentFieldValue int64Value + * @property {number|Long|null} [uint64Value] DocumentFieldValue uint64Value + * @property {number|null} [doubleValue] DocumentFieldValue doubleValue + * @property {string|null} [text] DocumentFieldValue text + * @property {Uint8Array|null} [bytesValue] DocumentFieldValue bytesValue + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList|null} [list] DocumentFieldValue list + * @property {boolean|null} [nullValue] DocumentFieldValue nullValue + */ + + /** + * Constructs a new DocumentFieldValue. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a DocumentFieldValue. + * @implements IDocumentFieldValue + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue=} [properties] Properties to set + */ + function DocumentFieldValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentFieldValue boolValue. + * @member {boolean} boolValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.boolValue = false; + + /** + * DocumentFieldValue int64Value. + * @member {number|Long} int64Value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.int64Value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DocumentFieldValue uint64Value. + * @member {number|Long} uint64Value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DocumentFieldValue doubleValue. + * @member {number} doubleValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.doubleValue = 0; + + /** + * DocumentFieldValue text. + * @member {string} text + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.text = ""; + + /** + * DocumentFieldValue bytesValue. + * @member {Uint8Array} bytesValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.bytesValue = $util.newBuffer([]); + + /** + * DocumentFieldValue list. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList|null|undefined} list + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.list = null; + + /** + * DocumentFieldValue nullValue. + * @member {boolean} nullValue + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + DocumentFieldValue.prototype.nullValue = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DocumentFieldValue variant. + * @member {"boolValue"|"int64Value"|"uint64Value"|"doubleValue"|"text"|"bytesValue"|"list"|"nullValue"|undefined} variant + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + */ + Object.defineProperty(DocumentFieldValue.prototype, "variant", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "uint64Value", "doubleValue", "text", "bytesValue", "list", "nullValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DocumentFieldValue instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue instance + */ + DocumentFieldValue.create = function create(properties) { + return new DocumentFieldValue(properties); + }; + + /** + * Encodes the specified DocumentFieldValue message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue} message DocumentFieldValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFieldValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.boolValue); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 2, wireType 0 =*/16).sint64(message.int64Value); + if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.doubleValue); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.text); + if (message.bytesValue != null && Object.hasOwnProperty.call(message, "bytesValue")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.bytesValue); + if (message.list != null && Object.hasOwnProperty.call(message, "list")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.encode(message.list, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.nullValue); + return writer; + }; + + /** + * Encodes the specified DocumentFieldValue message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue} message DocumentFieldValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFieldValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentFieldValue message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFieldValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.boolValue = reader.bool(); + break; + case 2: + message.int64Value = reader.sint64(); + break; + case 3: + message.uint64Value = reader.uint64(); + break; + case 4: + message.doubleValue = reader.double(); + break; + case 5: + message.text = reader.string(); + break; + case 6: + message.bytesValue = reader.bytes(); + break; + case 7: + message.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.decode(reader, reader.uint32()); + break; + case 8: + message.nullValue = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentFieldValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFieldValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentFieldValue message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentFieldValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + properties.variant = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.uint64Value != null && message.hasOwnProperty("uint64Value")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high))) + return "uint64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + if (message.text != null && message.hasOwnProperty("text")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!$util.isString(message.text)) + return "text: string expected"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (!(message.bytesValue && typeof message.bytesValue.length === "number" || $util.isString(message.bytesValue))) + return "bytesValue: buffer expected"; + } + if (message.list != null && message.hasOwnProperty("list")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify(message.list); + if (error) + return "list." + error; + } + } + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + if (properties.variant === 1) + return "variant: multiple values"; + properties.variant = 1; + if (typeof message.nullValue !== "boolean") + return "nullValue: boolean expected"; + } + return null; + }; + + /** + * Creates a DocumentFieldValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} DocumentFieldValue + */ + DocumentFieldValue.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue(); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.uint64Value != null) + if ($util.Long) + (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true; + else if (typeof object.uint64Value === "string") + message.uint64Value = parseInt(object.uint64Value, 10); + else if (typeof object.uint64Value === "number") + message.uint64Value = object.uint64Value; + else if (typeof object.uint64Value === "object") + message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.text != null) + message.text = String(object.text); + if (object.bytesValue != null) + if (typeof object.bytesValue === "string") + $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); + else if (object.bytesValue.length >= 0) + message.bytesValue = object.bytesValue; + if (object.list != null) { + if (typeof object.list !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.list: object expected"); + message.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.fromObject(object.list); + } + if (object.nullValue != null) + message.nullValue = Boolean(object.nullValue); + return message; + }; + + /** + * Creates a plain object from a DocumentFieldValue message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} message DocumentFieldValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentFieldValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.variant = "boolValue"; + } + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.variant = "int64Value"; + } + if (message.uint64Value != null && message.hasOwnProperty("uint64Value")) { + if (typeof message.uint64Value === "number") + object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value; + else + object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value; + if (options.oneofs) + object.variant = "uint64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.variant = "doubleValue"; + } + if (message.text != null && message.hasOwnProperty("text")) { + object.text = message.text; + if (options.oneofs) + object.variant = "text"; + } + if (message.bytesValue != null && message.hasOwnProperty("bytesValue")) { + object.bytesValue = options.bytes === String ? $util.base64.encode(message.bytesValue, 0, message.bytesValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytesValue) : message.bytesValue; + if (options.oneofs) + object.variant = "bytesValue"; + } + if (message.list != null && message.hasOwnProperty("list")) { + object.list = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(message.list, options); + if (options.oneofs) + object.variant = "list"; + } + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = message.nullValue; + if (options.oneofs) + object.variant = "nullValue"; + } + return object; + }; + + /** + * Converts this DocumentFieldValue to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @instance + * @returns {Object.} JSON object + */ + DocumentFieldValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DocumentFieldValue.ValueList = (function() { + + /** + * Properties of a ValueList. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @interface IValueList + * @property {Array.|null} [values] ValueList values + */ + + /** + * Constructs a new ValueList. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue + * @classdesc Represents a ValueList. + * @implements IValueList + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList=} [properties] Properties to set + */ + function ValueList(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueList values. + * @member {Array.} values + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @instance + */ + ValueList.prototype.values = $util.emptyArray; + + /** + * Creates a new ValueList instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList instance + */ + ValueList.create = function create(properties) { + return new ValueList(properties); + }; + + /** + * Encodes the specified ValueList message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList} message ValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValueList message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.IValueList} message ValueList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueList message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValueList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueList message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.values[i]); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a ValueList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} ValueList + */ + ValueList.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.values: object expected"); + message.values[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.values[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValueList message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} message ValueList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this ValueList to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList + * @instance + * @returns {Object.} JSON object + */ + ValueList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValueList; + })(); + + return DocumentFieldValue; + })(); + + GetDocumentsRequest.WhereClause = (function() { + + /** + * Properties of a WhereClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IWhereClause + * @property {string|null} [field] WhereClause field + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator|null} [operator] WhereClause operator + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null} [value] WhereClause value + */ + + /** + * Constructs a new WhereClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a WhereClause. + * @implements IWhereClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause=} [properties] Properties to set + */ + function WhereClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WhereClause field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.field = ""; + + /** + * WhereClause operator. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} operator + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.operator = 0; + + /** + * WhereClause value. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null|undefined} value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + */ + WhereClause.prototype.value = null; + + /** + * Creates a new WhereClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause instance + */ + WhereClause.create = function create(properties) { + return new WhereClause(properties); + }; + + /** + * Encodes the specified WhereClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause} message WhereClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WhereClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.value, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WhereClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IWhereClause} message WhereClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WhereClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WhereClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WhereClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.field = reader.string(); + break; + case 2: + message.operator = reader.int32(); + break; + case 3: + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WhereClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WhereClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WhereClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WhereClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a WhereClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} WhereClause + */ + WhereClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause(); + if (object.field != null) + message.field = String(object.field); + switch (object.operator) { + case "EQUAL": + case 0: + message.operator = 0; + break; + case "GREATER_THAN": + case 1: + message.operator = 1; + break; + case "GREATER_THAN_OR_EQUALS": + case 2: + message.operator = 2; + break; + case "LESS_THAN": + case 3: + message.operator = 3; + break; + case "LESS_THAN_OR_EQUALS": + case 4: + message.operator = 4; + break; + case "BETWEEN": + case 5: + message.operator = 5; + break; + case "BETWEEN_EXCLUDE_BOUNDS": + case 6: + message.operator = 6; + break; + case "BETWEEN_EXCLUDE_LEFT": + case 7: + message.operator = 7; + break; + case "BETWEEN_EXCLUDE_RIGHT": + case 8: + message.operator = 8; + break; + case "IN": + case 9: + message.operator = 9; + break; + case "STARTS_WITH": + case 10: + message.operator = 10; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.value: object expected"); + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a WhereClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} message WhereClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WhereClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.operator = options.enums === String ? "EQUAL" : 0; + object.value = null; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator[message.operator] : message.operator; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this WhereClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause + * @instance + * @returns {Object.} JSON object + */ + WhereClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WhereClause; + })(); + + GetDocumentsRequest.HavingAggregate = (function() { + + /** + * Properties of a HavingAggregate. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingAggregate + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function|null} ["function"] HavingAggregate function + * @property {string|null} [field] HavingAggregate field + */ + + /** + * Constructs a new HavingAggregate. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingAggregate. + * @implements IHavingAggregate + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate=} [properties] Properties to set + */ + function HavingAggregate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingAggregate function. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} function + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + */ + HavingAggregate.prototype["function"] = 0; + + /** + * HavingAggregate field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + */ + HavingAggregate.prototype.field = ""; + + /** + * Creates a new HavingAggregate instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate instance + */ + HavingAggregate.create = function create(properties) { + return new HavingAggregate(properties); + }; + + /** + * Encodes the specified HavingAggregate message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate} message HavingAggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingAggregate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message["function"]); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); + return writer; + }; + + /** + * Encodes the specified HavingAggregate message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate} message HavingAggregate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingAggregate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingAggregate message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingAggregate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["function"] = reader.int32(); + break; + case 2: + message.field = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingAggregate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingAggregate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingAggregate message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingAggregate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + switch (message["function"]) { + default: + return "function: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + return null; + }; + + /** + * Creates a HavingAggregate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} HavingAggregate + */ + HavingAggregate.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate(); + switch (object["function"]) { + case "COUNT": + case 0: + message["function"] = 0; + break; + case "SUM": + case 1: + message["function"] = 1; + break; + case "AVG": + case 2: + message["function"] = 2; + break; + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from a HavingAggregate message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} message HavingAggregate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingAggregate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["function"] = options.enums === String ? "COUNT" : 0; + object.field = ""; + } + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function[message["function"]] : message["function"]; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + return object; + }; + + /** + * Converts this HavingAggregate to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate + * @instance + * @returns {Object.} JSON object + */ + HavingAggregate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Function enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function + * @enum {number} + * @property {number} COUNT=0 COUNT value + * @property {number} SUM=1 SUM value + * @property {number} AVG=2 AVG value + */ + HavingAggregate.Function = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COUNT"] = 0; + values[valuesById[1] = "SUM"] = 1; + values[valuesById[2] = "AVG"] = 2; + return values; + })(); + + return HavingAggregate; + })(); + + GetDocumentsRequest.HavingRanking = (function() { + + /** + * Properties of a HavingRanking. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingRanking + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind|null} [kind] HavingRanking kind + * @property {number|Long|null} [n] HavingRanking n + */ + + /** + * Constructs a new HavingRanking. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingRanking. + * @implements IHavingRanking + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking=} [properties] Properties to set + */ + function HavingRanking(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingRanking kind. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} kind + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + */ + HavingRanking.prototype.kind = 0; + + /** + * HavingRanking n. + * @member {number|Long} n + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + */ + HavingRanking.prototype.n = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new HavingRanking instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking instance + */ + HavingRanking.create = function create(properties) { + return new HavingRanking(properties); + }; + + /** + * Encodes the specified HavingRanking message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking} message HavingRanking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingRanking.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.kind); + if (message.n != null && Object.hasOwnProperty.call(message, "n")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.n); + return writer; + }; + + /** + * Encodes the specified HavingRanking message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking} message HavingRanking message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingRanking.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingRanking message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingRanking.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.int32(); + break; + case 2: + message.n = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingRanking message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingRanking.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingRanking message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingRanking.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.n != null && message.hasOwnProperty("n")) + if (!$util.isInteger(message.n) && !(message.n && $util.isInteger(message.n.low) && $util.isInteger(message.n.high))) + return "n: integer|Long expected"; + return null; + }; + + /** + * Creates a HavingRanking message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} HavingRanking + */ + HavingRanking.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking(); + switch (object.kind) { + case "MIN": + case 0: + message.kind = 0; + break; + case "MAX": + case 1: + message.kind = 1; + break; + case "TOP": + case 2: + message.kind = 2; + break; + case "BOTTOM": + case 3: + message.kind = 3; + break; + } + if (object.n != null) + if ($util.Long) + (message.n = $util.Long.fromValue(object.n)).unsigned = true; + else if (typeof object.n === "string") + message.n = parseInt(object.n, 10); + else if (typeof object.n === "number") + message.n = object.n; + else if (typeof object.n === "object") + message.n = new $util.LongBits(object.n.low >>> 0, object.n.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a HavingRanking message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} message HavingRanking + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingRanking.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = options.enums === String ? "MIN" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.n = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.n = options.longs === String ? "0" : 0; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind[message.kind] : message.kind; + if (message.n != null && message.hasOwnProperty("n")) + if (typeof message.n === "number") + object.n = options.longs === String ? String(message.n) : message.n; + else + object.n = options.longs === String ? $util.Long.prototype.toString.call(message.n) : options.longs === Number ? new $util.LongBits(message.n.low >>> 0, message.n.high >>> 0).toNumber(true) : message.n; + return object; + }; + + /** + * Converts this HavingRanking to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking + * @instance + * @returns {Object.} JSON object + */ + HavingRanking.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Kind enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind + * @enum {number} + * @property {number} MIN=0 MIN value + * @property {number} MAX=1 MAX value + * @property {number} TOP=2 TOP value + * @property {number} BOTTOM=3 BOTTOM value + */ + HavingRanking.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MIN"] = 0; + values[valuesById[1] = "MAX"] = 1; + values[valuesById[2] = "TOP"] = 2; + values[valuesById[3] = "BOTTOM"] = 3; + return values; + })(); + + return HavingRanking; + })(); + + GetDocumentsRequest.HavingClause = (function() { + + /** + * Properties of a HavingClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IHavingClause + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null} [aggregate] HavingClause aggregate + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator|null} [operator] HavingClause operator + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null} [value] HavingClause value + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking|null} [ranking] HavingClause ranking + */ + + /** + * Constructs a new HavingClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents a HavingClause. + * @implements IHavingClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause=} [properties] Properties to set + */ + function HavingClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HavingClause aggregate. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null|undefined} aggregate + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.aggregate = null; + + /** + * HavingClause operator. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} operator + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.operator = 0; + + /** + * HavingClause value. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IDocumentFieldValue|null|undefined} value + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.value = null; + + /** + * HavingClause ranking. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingRanking|null|undefined} ranking + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + HavingClause.prototype.ranking = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HavingClause right. + * @member {"value"|"ranking"|undefined} right + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + */ + Object.defineProperty(HavingClause.prototype, "right", { + get: $util.oneOfGetter($oneOfFields = ["value", "ranking"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HavingClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause instance + */ + HavingClause.create = function create(properties) { + return new HavingClause(properties); + }; + + /** + * Encodes the specified HavingClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause} message HavingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aggregate != null && Object.hasOwnProperty.call(message, "aggregate")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.encode(message.aggregate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operator); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.encode(message.value, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ranking != null && Object.hasOwnProperty.call(message, "ranking")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.encode(message.ranking, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HavingClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingClause} message HavingClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HavingClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HavingClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.decode(reader, reader.uint32()); + break; + case 2: + message.operator = reader.int32(); + break; + case 3: + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.decode(reader, reader.uint32()); + break; + case 4: + message.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HavingClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HavingClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HavingClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HavingClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify(message.aggregate); + if (error) + return "aggregate." + error; + } + if (message.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + properties.right = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.verify(message.value); + if (error) + return "value." + error; + } + } + if (message.ranking != null && message.hasOwnProperty("ranking")) { + if (properties.right === 1) + return "right: multiple values"; + properties.right = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.verify(message.ranking); + if (error) + return "ranking." + error; + } + } + return null; + }; + + /** + * Creates a HavingClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} HavingClause + */ + HavingClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause(); + if (object.aggregate != null) { + if (typeof object.aggregate !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.aggregate: object expected"); + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.fromObject(object.aggregate); + } + switch (object.operator) { + case "EQUAL": + case 0: + message.operator = 0; + break; + case "NOT_EQUAL": + case 1: + message.operator = 1; + break; + case "GREATER_THAN": + case 2: + message.operator = 2; + break; + case "GREATER_THAN_OR_EQUALS": + case 3: + message.operator = 3; + break; + case "LESS_THAN": + case 4: + message.operator = 4; + break; + case "LESS_THAN_OR_EQUALS": + case 5: + message.operator = 5; + break; + case "BETWEEN": + case 6: + message.operator = 6; + break; + case "BETWEEN_EXCLUDE_BOUNDS": + case 7: + message.operator = 7; + break; + case "BETWEEN_EXCLUDE_LEFT": + case 8: + message.operator = 8; + break; + case "BETWEEN_EXCLUDE_RIGHT": + case 9: + message.operator = 9; + break; + case "IN": + case 10: + message.operator = 10; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.value: object expected"); + message.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.fromObject(object.value); + } + if (object.ranking != null) { + if (typeof object.ranking !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.ranking: object expected"); + message.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.fromObject(object.ranking); + } + return message; + }; + + /** + * Creates a plain object from a HavingClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} message HavingClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HavingClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.aggregate = null; + object.operator = options.enums === String ? "EQUAL" : 0; + } + if (message.aggregate != null && message.hasOwnProperty("aggregate")) + object.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(message.aggregate, options); + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator[message.operator] : message.operator; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(message.value, options); + if (options.oneofs) + object.right = "value"; + } + if (message.ranking != null && message.hasOwnProperty("ranking")) { + object.ranking = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(message.ranking, options); + if (options.oneofs) + object.right = "ranking"; + } + return object; + }; + + /** + * Converts this HavingClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause + * @instance + * @returns {Object.} JSON object + */ + HavingClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Operator enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator + * @enum {number} + * @property {number} EQUAL=0 EQUAL value + * @property {number} NOT_EQUAL=1 NOT_EQUAL value + * @property {number} GREATER_THAN=2 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUALS=3 GREATER_THAN_OR_EQUALS value + * @property {number} LESS_THAN=4 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUALS=5 LESS_THAN_OR_EQUALS value + * @property {number} BETWEEN=6 BETWEEN value + * @property {number} BETWEEN_EXCLUDE_BOUNDS=7 BETWEEN_EXCLUDE_BOUNDS value + * @property {number} BETWEEN_EXCLUDE_LEFT=8 BETWEEN_EXCLUDE_LEFT value + * @property {number} BETWEEN_EXCLUDE_RIGHT=9 BETWEEN_EXCLUDE_RIGHT value + * @property {number} IN=10 IN value + */ + HavingClause.Operator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EQUAL"] = 0; + values[valuesById[1] = "NOT_EQUAL"] = 1; + values[valuesById[2] = "GREATER_THAN"] = 2; + values[valuesById[3] = "GREATER_THAN_OR_EQUALS"] = 3; + values[valuesById[4] = "LESS_THAN"] = 4; + values[valuesById[5] = "LESS_THAN_OR_EQUALS"] = 5; + values[valuesById[6] = "BETWEEN"] = 6; + values[valuesById[7] = "BETWEEN_EXCLUDE_BOUNDS"] = 7; + values[valuesById[8] = "BETWEEN_EXCLUDE_LEFT"] = 8; + values[valuesById[9] = "BETWEEN_EXCLUDE_RIGHT"] = 9; + values[valuesById[10] = "IN"] = 10; + return values; + })(); + + return HavingClause; + })(); + + GetDocumentsRequest.OrderClause = (function() { + + /** + * Properties of an OrderClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @interface IOrderClause + * @property {string|null} [field] OrderClause field + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null} [aggregate] OrderClause aggregate + * @property {boolean|null} [ascending] OrderClause ascending + */ + + /** + * Constructs a new OrderClause. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest + * @classdesc Represents an OrderClause. + * @implements IOrderClause + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause=} [properties] Properties to set + */ + function OrderClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrderClause field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.field = ""; + + /** + * OrderClause aggregate. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.IHavingAggregate|null|undefined} aggregate + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.aggregate = null; + + /** + * OrderClause ascending. + * @member {boolean} ascending + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + OrderClause.prototype.ascending = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OrderClause target. + * @member {"field"|"aggregate"|undefined} target + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + */ + Object.defineProperty(OrderClause.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["field", "aggregate"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OrderClause instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause instance + */ + OrderClause.create = function create(properties) { + return new OrderClause(properties); + }; + + /** + * Encodes the specified OrderClause message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause} message OrderClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.ascending != null && Object.hasOwnProperty.call(message, "ascending")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ascending); + if (message.aggregate != null && Object.hasOwnProperty.call(message, "aggregate")) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.encode(message.aggregate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrderClause message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IOrderClause} message OrderClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrderClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrderClause message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.field = reader.string(); + break; + case 3: + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.decode(reader, reader.uint32()); + break; + case 2: + message.ascending = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrderClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrderClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrderClause message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrderClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + properties.target = 1; + if (!$util.isString(message.field)) + return "field: string expected"; + } + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.verify(message.aggregate); + if (error) + return "aggregate." + error; + } + } + if (message.ascending != null && message.hasOwnProperty("ascending")) + if (typeof message.ascending !== "boolean") + return "ascending: boolean expected"; + return null; + }; + + /** + * Creates an OrderClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} OrderClause + */ + OrderClause.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause(); + if (object.field != null) + message.field = String(object.field); + if (object.aggregate != null) { + if (typeof object.aggregate !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.aggregate: object expected"); + message.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.fromObject(object.aggregate); + } + if (object.ascending != null) + message.ascending = Boolean(object.ascending); + return message; + }; + + /** + * Creates a plain object from an OrderClause message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} message OrderClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrderClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.ascending = false; + if (message.field != null && message.hasOwnProperty("field")) { + object.field = message.field; + if (options.oneofs) + object.target = "field"; + } + if (message.ascending != null && message.hasOwnProperty("ascending")) + object.ascending = message.ascending; + if (message.aggregate != null && message.hasOwnProperty("aggregate")) { + object.aggregate = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(message.aggregate, options); + if (options.oneofs) + object.target = "aggregate"; + } + return object; + }; + + /** + * Converts this OrderClause to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause + * @instance + * @returns {Object.} JSON object + */ + OrderClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OrderClause; + })(); + GetDocumentsRequest.GetDocumentsRequestV0 = (function() { /** @@ -19990,15 +22112,16 @@ $root.org = (function() { * @interface IGetDocumentsRequestV1 * @property {Uint8Array|null} [dataContractId] GetDocumentsRequestV1 dataContractId * @property {string|null} [documentType] GetDocumentsRequestV1 documentType - * @property {Uint8Array|null} [where] GetDocumentsRequestV1 where - * @property {Uint8Array|null} [orderBy] GetDocumentsRequestV1 orderBy + * @property {Array.|null} [whereClauses] GetDocumentsRequestV1 whereClauses + * @property {Array.|null} [orderBy] GetDocumentsRequestV1 orderBy * @property {number|null} [limit] GetDocumentsRequestV1 limit * @property {Uint8Array|null} [startAfter] GetDocumentsRequestV1 startAfter * @property {Uint8Array|null} [startAt] GetDocumentsRequestV1 startAt * @property {boolean|null} [prove] GetDocumentsRequestV1 prove - * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select|null} [select] GetDocumentsRequestV1 select + * @property {Array.|null} [selects] GetDocumentsRequestV1 selects * @property {Array.|null} [groupBy] GetDocumentsRequestV1 groupBy - * @property {Uint8Array|null} [having] GetDocumentsRequestV1 having + * @property {Array.|null} [having] GetDocumentsRequestV1 having + * @property {number|null} [offset] GetDocumentsRequestV1 offset */ /** @@ -20010,7 +22133,11 @@ $root.org = (function() { * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.IGetDocumentsRequestV1=} [properties] Properties to set */ function GetDocumentsRequestV1(properties) { + this.whereClauses = []; + this.orderBy = []; + this.selects = []; this.groupBy = []; + this.having = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20034,20 +22161,20 @@ $root.org = (function() { GetDocumentsRequestV1.prototype.documentType = ""; /** - * GetDocumentsRequestV1 where. - * @member {Uint8Array} where + * GetDocumentsRequestV1 whereClauses. + * @member {Array.} whereClauses * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.where = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.whereClauses = $util.emptyArray; /** * GetDocumentsRequestV1 orderBy. - * @member {Uint8Array} orderBy + * @member {Array.} orderBy * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.orderBy = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.orderBy = $util.emptyArray; /** * GetDocumentsRequestV1 limit. @@ -20082,12 +22209,12 @@ $root.org = (function() { GetDocumentsRequestV1.prototype.prove = false; /** - * GetDocumentsRequestV1 select. - * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} select + * GetDocumentsRequestV1 selects. + * @member {Array.} selects * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.select = 0; + GetDocumentsRequestV1.prototype.selects = $util.emptyArray; /** * GetDocumentsRequestV1 groupBy. @@ -20099,11 +22226,19 @@ $root.org = (function() { /** * GetDocumentsRequestV1 having. - * @member {Uint8Array} having + * @member {Array.} having + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @instance + */ + GetDocumentsRequestV1.prototype.having = $util.emptyArray; + + /** + * GetDocumentsRequestV1 offset. + * @member {number} offset * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 * @instance */ - GetDocumentsRequestV1.prototype.having = $util.newBuffer([]); + GetDocumentsRequestV1.prototype.offset = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -20147,10 +22282,12 @@ $root.org = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.dataContractId); if (message.documentType != null && Object.hasOwnProperty.call(message, "documentType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.documentType); - if (message.where != null && Object.hasOwnProperty.call(message, "where")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.where); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.orderBy); + if (message.whereClauses != null && message.whereClauses.length) + for (var i = 0; i < message.whereClauses.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.encode(message.whereClauses[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.orderBy != null && message.orderBy.length) + for (var i = 0; i < message.orderBy.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.encode(message.orderBy[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) writer.uint32(/* id 5, wireType 0 =*/40).uint32(message.limit); if (message.startAfter != null && Object.hasOwnProperty.call(message, "startAfter")) @@ -20159,13 +22296,17 @@ $root.org = (function() { writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.startAt); if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.prove); - if (message.select != null && Object.hasOwnProperty.call(message, "select")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.select); + if (message.selects != null && message.selects.length) + for (var i = 0; i < message.selects.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.encode(message.selects[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.groupBy != null && message.groupBy.length) for (var i = 0; i < message.groupBy.length; ++i) writer.uint32(/* id 10, wireType 2 =*/82).string(message.groupBy[i]); - if (message.having != null && Object.hasOwnProperty.call(message, "having")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.having); + if (message.having != null && message.having.length) + for (var i = 0; i < message.having.length; ++i) + $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.encode(message.having[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 12, wireType 0 =*/96).uint32(message.offset); return writer; }; @@ -20207,10 +22348,14 @@ $root.org = (function() { message.documentType = reader.string(); break; case 3: - message.where = reader.bytes(); + if (!(message.whereClauses && message.whereClauses.length)) + message.whereClauses = []; + message.whereClauses.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.decode(reader, reader.uint32())); break; case 4: - message.orderBy = reader.bytes(); + if (!(message.orderBy && message.orderBy.length)) + message.orderBy = []; + message.orderBy.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.decode(reader, reader.uint32())); break; case 5: message.limit = reader.uint32(); @@ -20225,7 +22370,9 @@ $root.org = (function() { message.prove = reader.bool(); break; case 9: - message.select = reader.int32(); + if (!(message.selects && message.selects.length)) + message.selects = []; + message.selects.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.decode(reader, reader.uint32())); break; case 10: if (!(message.groupBy && message.groupBy.length)) @@ -20233,7 +22380,12 @@ $root.org = (function() { message.groupBy.push(reader.string()); break; case 11: - message.having = reader.bytes(); + if (!(message.having && message.having.length)) + message.having = []; + message.having.push($root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.decode(reader, reader.uint32())); + break; + case 12: + message.offset = reader.uint32(); break; default: reader.skipType(tag & 7); @@ -20277,12 +22429,24 @@ $root.org = (function() { if (message.documentType != null && message.hasOwnProperty("documentType")) if (!$util.isString(message.documentType)) return "documentType: string expected"; - if (message.where != null && message.hasOwnProperty("where")) - if (!(message.where && typeof message.where.length === "number" || $util.isString(message.where))) - return "where: buffer expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!(message.orderBy && typeof message.orderBy.length === "number" || $util.isString(message.orderBy))) - return "orderBy: buffer expected"; + if (message.whereClauses != null && message.hasOwnProperty("whereClauses")) { + if (!Array.isArray(message.whereClauses)) + return "whereClauses: array expected"; + for (var i = 0; i < message.whereClauses.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.verify(message.whereClauses[i]); + if (error) + return "whereClauses." + error; + } + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) { + if (!Array.isArray(message.orderBy)) + return "orderBy: array expected"; + for (var i = 0; i < message.orderBy.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.verify(message.orderBy[i]); + if (error) + return "orderBy." + error; + } + } if (message.limit != null && message.hasOwnProperty("limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; @@ -20301,14 +22465,15 @@ $root.org = (function() { if (message.prove != null && message.hasOwnProperty("prove")) if (typeof message.prove !== "boolean") return "prove: boolean expected"; - if (message.select != null && message.hasOwnProperty("select")) - switch (message.select) { - default: - return "select: enum value expected"; - case 0: - case 1: - break; + if (message.selects != null && message.hasOwnProperty("selects")) { + if (!Array.isArray(message.selects)) + return "selects: array expected"; + for (var i = 0; i < message.selects.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify(message.selects[i]); + if (error) + return "selects." + error; } + } if (message.groupBy != null && message.hasOwnProperty("groupBy")) { if (!Array.isArray(message.groupBy)) return "groupBy: array expected"; @@ -20316,9 +22481,18 @@ $root.org = (function() { if (!$util.isString(message.groupBy[i])) return "groupBy: string[] expected"; } - if (message.having != null && message.hasOwnProperty("having")) - if (!(message.having && typeof message.having.length === "number" || $util.isString(message.having))) - return "having: buffer expected"; + if (message.having != null && message.hasOwnProperty("having")) { + if (!Array.isArray(message.having)) + return "having: array expected"; + for (var i = 0; i < message.having.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.verify(message.having[i]); + if (error) + return "having." + error; + } + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset)) + return "offset: integer expected"; return null; }; @@ -20341,16 +22515,26 @@ $root.org = (function() { message.dataContractId = object.dataContractId; if (object.documentType != null) message.documentType = String(object.documentType); - if (object.where != null) - if (typeof object.where === "string") - $util.base64.decode(object.where, message.where = $util.newBuffer($util.base64.length(object.where)), 0); - else if (object.where.length >= 0) - message.where = object.where; - if (object.orderBy != null) - if (typeof object.orderBy === "string") - $util.base64.decode(object.orderBy, message.orderBy = $util.newBuffer($util.base64.length(object.orderBy)), 0); - else if (object.orderBy.length >= 0) - message.orderBy = object.orderBy; + if (object.whereClauses) { + if (!Array.isArray(object.whereClauses)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.whereClauses: array expected"); + message.whereClauses = []; + for (var i = 0; i < object.whereClauses.length; ++i) { + if (typeof object.whereClauses[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.whereClauses: object expected"); + message.whereClauses[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.fromObject(object.whereClauses[i]); + } + } + if (object.orderBy) { + if (!Array.isArray(object.orderBy)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.orderBy: array expected"); + message.orderBy = []; + for (var i = 0; i < object.orderBy.length; ++i) { + if (typeof object.orderBy[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.orderBy: object expected"); + message.orderBy[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.fromObject(object.orderBy[i]); + } + } if (object.limit != null) message.limit = object.limit >>> 0; if (object.startAfter != null) @@ -20365,15 +22549,15 @@ $root.org = (function() { message.startAt = object.startAt; if (object.prove != null) message.prove = Boolean(object.prove); - switch (object.select) { - case "DOCUMENTS": - case 0: - message.select = 0; - break; - case "COUNT": - case 1: - message.select = 1; - break; + if (object.selects) { + if (!Array.isArray(object.selects)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.selects: array expected"); + message.selects = []; + for (var i = 0; i < object.selects.length; ++i) { + if (typeof object.selects[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.selects: object expected"); + message.selects[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.fromObject(object.selects[i]); + } } if (object.groupBy) { if (!Array.isArray(object.groupBy)) @@ -20382,11 +22566,18 @@ $root.org = (function() { for (var i = 0; i < object.groupBy.length; ++i) message.groupBy[i] = String(object.groupBy[i]); } - if (object.having != null) - if (typeof object.having === "string") - $util.base64.decode(object.having, message.having = $util.newBuffer($util.base64.length(object.having)), 0); - else if (object.having.length >= 0) - message.having = object.having; + if (object.having) { + if (!Array.isArray(object.having)) + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.having: array expected"); + message.having = []; + for (var i = 0; i < object.having.length; ++i) { + if (typeof object.having[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.having: object expected"); + message.having[i] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.fromObject(object.having[i]); + } + } + if (object.offset != null) + message.offset = object.offset >>> 0; return message; }; @@ -20403,8 +22594,13 @@ $root.org = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { + object.whereClauses = []; + object.orderBy = []; + object.selects = []; object.groupBy = []; + object.having = []; + } if (options.defaults) { if (options.bytes === String) object.dataContractId = ""; @@ -20414,39 +22610,24 @@ $root.org = (function() { object.dataContractId = $util.newBuffer(object.dataContractId); } object.documentType = ""; - if (options.bytes === String) - object.where = ""; - else { - object.where = []; - if (options.bytes !== Array) - object.where = $util.newBuffer(object.where); - } - if (options.bytes === String) - object.orderBy = ""; - else { - object.orderBy = []; - if (options.bytes !== Array) - object.orderBy = $util.newBuffer(object.orderBy); - } object.limit = 0; object.prove = false; - object.select = options.enums === String ? "DOCUMENTS" : 0; - if (options.bytes === String) - object.having = ""; - else { - object.having = []; - if (options.bytes !== Array) - object.having = $util.newBuffer(object.having); - } + object.offset = 0; } if (message.dataContractId != null && message.hasOwnProperty("dataContractId")) object.dataContractId = options.bytes === String ? $util.base64.encode(message.dataContractId, 0, message.dataContractId.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataContractId) : message.dataContractId; if (message.documentType != null && message.hasOwnProperty("documentType")) object.documentType = message.documentType; - if (message.where != null && message.hasOwnProperty("where")) - object.where = options.bytes === String ? $util.base64.encode(message.where, 0, message.where.length) : options.bytes === Array ? Array.prototype.slice.call(message.where) : message.where; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = options.bytes === String ? $util.base64.encode(message.orderBy, 0, message.orderBy.length) : options.bytes === Array ? Array.prototype.slice.call(message.orderBy) : message.orderBy; + if (message.whereClauses && message.whereClauses.length) { + object.whereClauses = []; + for (var j = 0; j < message.whereClauses.length; ++j) + object.whereClauses[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject(message.whereClauses[j], options); + } + if (message.orderBy && message.orderBy.length) { + object.orderBy = []; + for (var j = 0; j < message.orderBy.length; ++j) + object.orderBy[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject(message.orderBy[j], options); + } if (message.limit != null && message.hasOwnProperty("limit")) object.limit = message.limit; if (message.startAfter != null && message.hasOwnProperty("startAfter")) { @@ -20461,15 +22642,23 @@ $root.org = (function() { } if (message.prove != null && message.hasOwnProperty("prove")) object.prove = message.prove; - if (message.select != null && message.hasOwnProperty("select")) - object.select = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select[message.select] : message.select; + if (message.selects && message.selects.length) { + object.selects = []; + for (var j = 0; j < message.selects.length; ++j) + object.selects[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject(message.selects[j], options); + } if (message.groupBy && message.groupBy.length) { object.groupBy = []; for (var j = 0; j < message.groupBy.length; ++j) object.groupBy[j] = message.groupBy[j]; } - if (message.having != null && message.hasOwnProperty("having")) - object.having = options.bytes === String ? $util.base64.encode(message.having, 0, message.having.length) : options.bytes === Array ? Array.prototype.slice.call(message.having) : message.having; + if (message.having && message.having.length) { + object.having = []; + for (var j = 0; j < message.having.length; ++j) + object.having[j] = $root.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject(message.having[j], options); + } + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = message.offset; return object; }; @@ -20484,18 +22673,269 @@ $root.org = (function() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * Select enum. - * @name org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select - * @enum {number} - * @property {number} DOCUMENTS=0 DOCUMENTS value - * @property {number} COUNT=1 COUNT value - */ GetDocumentsRequestV1.Select = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DOCUMENTS"] = 0; - values[valuesById[1] = "COUNT"] = 1; - return values; + + /** + * Properties of a Select. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @interface ISelect + * @property {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function|null} ["function"] Select function + * @property {string|null} [field] Select field + */ + + /** + * Constructs a new Select. + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1 + * @classdesc Represents a Select. + * @implements ISelect + * @constructor + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect=} [properties] Properties to set + */ + function Select(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Select function. + * @member {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} function + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + */ + Select.prototype["function"] = 0; + + /** + * Select field. + * @member {string} field + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + */ + Select.prototype.field = ""; + + /** + * Creates a new Select instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select instance + */ + Select.create = function create(properties) { + return new Select(properties); + }; + + /** + * Encodes the specified Select message. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect} message Select message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Select.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message["function"] != null && Object.hasOwnProperty.call(message, "function")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message["function"]); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.field); + return writer; + }; + + /** + * Encodes the specified Select message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.ISelect} message Select message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Select.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Select message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Select.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message["function"] = reader.int32(); + break; + case 2: + message.field = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Select message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Select.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Select message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Select.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message["function"] != null && message.hasOwnProperty("function")) + switch (message["function"]) { + default: + return "function: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + return null; + }; + + /** + * Creates a Select message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} Select + */ + Select.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select(); + switch (object["function"]) { + case "DOCUMENTS": + case 0: + message["function"] = 0; + break; + case "COUNT": + case 1: + message["function"] = 1; + break; + case "SUM": + case 2: + message["function"] = 2; + break; + case "AVG": + case 3: + message["function"] = 3; + break; + case "MIN": + case 4: + message["function"] = 4; + break; + case "MAX": + case 5: + message["function"] = 5; + break; + } + if (object.field != null) + message.field = String(object.field); + return message; + }; + + /** + * Creates a plain object from a Select message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @static + * @param {org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} message Select + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Select.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object["function"] = options.enums === String ? "DOCUMENTS" : 0; + object.field = ""; + } + if (message["function"] != null && message.hasOwnProperty("function")) + object["function"] = options.enums === String ? $root.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function[message["function"]] : message["function"]; + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + return object; + }; + + /** + * Converts this Select to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select + * @instance + * @returns {Object.} JSON object + */ + Select.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Function enum. + * @name org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function + * @enum {number} + * @property {number} DOCUMENTS=0 DOCUMENTS value + * @property {number} COUNT=1 COUNT value + * @property {number} SUM=2 SUM value + * @property {number} AVG=3 AVG value + * @property {number} MIN=4 MIN value + * @property {number} MAX=5 MAX value + */ + Select.Function = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DOCUMENTS"] = 0; + values[valuesById[1] = "COUNT"] = 1; + values[valuesById[2] = "SUM"] = 2; + values[valuesById[3] = "AVG"] = 3; + values[valuesById[4] = "MIN"] = 4; + values[valuesById[5] = "MAX"] = 5; + return values; + })(); + + return Select; })(); return GetDocumentsRequestV1; diff --git a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js index 7e9deb3b0c3..4fbca79fcf1 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -151,12 +151,27 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetD goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.StartCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents', null, { proto }); @@ -2163,6 +2178,153 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2205,6 +2367,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -24238,6 +24421,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = fu }; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = { + EQUAL: 0, + GREATER_THAN: 1, + GREATER_THAN_OR_EQUALS: 2, + LESS_THAN: 3, + LESS_THAN_OR_EQUALS: 4, + BETWEEN: 5, + BETWEEN_EXCLUDE_BOUNDS: 6, + BETWEEN_EXCLUDE_LEFT: 7, + BETWEEN_EXCLUDE_RIGHT: 8, + IN: 9, + STARTS_WITH: 10 +}; + /** * Oneof group definitions for this message. Each group defines the field @@ -24247,22 +24447,28 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = fu * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 6, - START_AT: 7 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase = { + VARIANT_NOT_SET: 0, + BOOL_VALUE: 1, + INT64_VALUE: 2, + UINT64_VALUE: 3, + DOUBLE_VALUE: 4, + TEXT: 5, + BYTES_VALUE: 6, + LIST: 7, + NULL_VALUE: 8 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getVariantCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0])); }; @@ -24280,8 +24486,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(opt_includeInstance, this); }; @@ -24290,20 +24496,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject = function(includeInstance, msg) { var f, obj = { - dataContractId: msg.getDataContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), - limit: jspb.Message.getFieldWithDefault(msg, 5, 0), - startAfter: msg.getStartAfter_asB64(), - startAt: msg.getStartAt_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 2, "0"), + uint64Value: jspb.Message.getFieldWithDefault(msg, 3, "0"), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + text: jspb.Message.getFieldWithDefault(msg, 5, ""), + bytesValue: msg.getBytesValue_asB64(), + list: (f = msg.getList()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(includeInstance, f), + nullValue: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -24317,23 +24523,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24341,36 +24547,37 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContractId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); + var value = /** @type {string} */ (reader.readSint64String()); + msg.setInt64Value(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setUint64Value(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); + var value = /** @type {string} */ (reader.readString()); + msg.setText(value); break; case 6: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAfter(value); + msg.setBytesValue(value); break; case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAt(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader); + msg.setList(value); break; case 8: var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + msg.setNullValue(value); break; default: reader.skipField(); @@ -24385,9 +24592,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24395,43 +24602,43 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( 1, f ); } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint64String( 2, f ); } - f = message.getWhere_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64String( 3, f ); } - f = message.getOrderBy_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( 4, f ); } - f = message.getLimit(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( 5, f ); @@ -24443,15 +24650,16 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serial f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + f = message.getList(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 7, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { writer.writeBool( 8, f @@ -24460,33 +24668,1877 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serial }; -/** - * optional bytes data_contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - /** - * optional bytes data_contract_id = 1; - * This is a type-conversion wrapper around `getDataContractId()` - * @return {string} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContractId())); -}; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes data_contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContractId()` - * @return {!Uint8Array} - */ + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DocumentFieldValue values = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * optional bool bool_value = 1; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint64 int64_value = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getInt64Value = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 uint64_value = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getUint64Value = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double double_value = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string text = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getText = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setText = function(value) { + return jspb.Message.setOneofField(this, 5, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearText = function() { + return jspb.Message.setOneofField(this, 5, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasText = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes bytes_value = 6; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes bytes_value = 6; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ValueList list = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getList = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList, 7)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setList = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearList = function() { + return this.setList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasList = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool null_value = 8; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getNullValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 8, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 8, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + operator: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: (f = msg.getValue()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 2: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} */ (reader.readEnum()); + msg.setOperator(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperator(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional WhereOperator operator = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getOperator = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setOperator = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional DocumentFieldValue value = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getValue = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.hasValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject = function(includeInstance, msg) { + var f, obj = { + pb_function: jspb.Message.getFieldWithDefault(msg, 1, 0), + field: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} */ (reader.readEnum()); + msg.setFunction(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFunction(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function = { + COUNT: 0, + SUM: 1, + AVG: 2 +}; + +/** + * optional Function function = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.getFunction = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.setFunction = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0), + n: jspb.Message.getFieldWithDefault(msg, 2, "0") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} */ (reader.readEnum()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setN(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64String( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind = { + MIN: 0, + MAX: 1, + TOP: 2, + BOTTOM: 3 +}; + +/** + * optional Kind kind = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.getKind = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.setKind = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 n = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.getN = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.setN = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.clearN = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.hasN = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_ = [[3,4]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase = { + RIGHT_NOT_SET: 0, + VALUE: 3, + RANKING: 4 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getRightCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject = function(includeInstance, msg) { + var f, obj = { + aggregate: (f = msg.getAggregate()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(includeInstance, f), + operator: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: (f = msg.getValue()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(includeInstance, f), + ranking: (f = msg.getRanking()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader); + msg.setAggregate(value); + break; + case 2: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} */ (reader.readEnum()); + msg.setOperator(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.setValue(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader); + msg.setRanking(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAggregate(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter + ); + } + f = message.getOperator(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } + f = message.getRanking(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator = { + EQUAL: 0, + NOT_EQUAL: 1, + GREATER_THAN: 2, + GREATER_THAN_OR_EQUALS: 3, + LESS_THAN: 4, + LESS_THAN_OR_EQUALS: 5, + BETWEEN: 6, + BETWEEN_EXCLUDE_BOUNDS: 7, + BETWEEN_EXCLUDE_LEFT: 8, + BETWEEN_EXCLUDE_RIGHT: 9, + IN: 10 +}; + +/** + * optional HavingAggregate aggregate = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getAggregate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setAggregate = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearAggregate = function() { + return this.setAggregate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasAggregate = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Operator operator = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getOperator = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setOperator = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional DocumentFieldValue value = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getValue = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional HavingRanking ranking = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getRanking = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setRanking = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearRanking = function() { + return this.setRanking(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasRanking = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_ = [[1,3]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase = { + TARGET_NOT_SET: 0, + FIELD: 1, + AGGREGATE: 3 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getTargetCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + aggregate: (f = msg.getAggregate()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(includeInstance, f), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader); + msg.setAggregate(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getAggregate(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter + ); + } + f = message.getAscending(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setField = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.clearField = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.hasField = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional HavingAggregate aggregate = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getAggregate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setAggregate = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.clearAggregate = function() { + return this.setAggregate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.hasAggregate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool ascending = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 6, + START_AT: 7 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + orderBy: msg.getOrderBy_asB64(), + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOrderBy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAfter(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOrderBy_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getDataContractId())); @@ -24766,7 +26818,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.repeatedFields_ = [10]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.repeatedFields_ = [3,4,9,10,11]; /** * Oneof group definitions for this message. Each group defines the field @@ -24827,15 +26879,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.toObje var f, obj = { dataContractId: msg.getDataContractId_asB64(), documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), + whereClausesList: jspb.Message.toObjectList(msg.getWhereClausesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject, includeInstance), + orderByList: jspb.Message.toObjectList(msg.getOrderByList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject, includeInstance), limit: jspb.Message.getFieldWithDefault(msg, 5, 0), startAfter: msg.getStartAfter_asB64(), startAt: msg.getStartAt_asB64(), prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - select: jspb.Message.getFieldWithDefault(msg, 9, 0), + selectsList: jspb.Message.toObjectList(msg.getSelectsList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject, includeInstance), groupByList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, - having: msg.getHaving_asB64() + havingList: jspb.Message.toObjectList(msg.getHavingList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject, includeInstance), + offset: jspb.Message.getFieldWithDefault(msg, 12, 0) }; if (includeInstance) { @@ -24881,12 +26938,14 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.deseri msg.setDocumentType(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader); + msg.addWhereClauses(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader); + msg.addOrderBy(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); @@ -24905,16 +26964,22 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.deseri msg.setProve(value); break; case 9: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ (reader.readEnum()); - msg.setSelect(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader); + msg.addSelects(value); break; case 10: var value = /** @type {string} */ (reader.readString()); msg.addGroupBy(value); break; case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHaving(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader); + msg.addHaving(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOffset(value); break; default: reader.skipField(); @@ -24959,18 +27024,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getWhere_asU8(); + f = message.getWhereClausesList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter ); } - f = message.getOrderBy_asU8(); + f = message.getOrderByList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 4, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter ); } f = /** @type {number} */ (jspb.Message.getField(message, 5)); @@ -25001,11 +27068,12 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getSelect(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getSelectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 9, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter ); } f = message.getGroupByList(); @@ -25015,10 +27083,142 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getHaving_asU8(); + f = message.getHavingList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 11, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint32( + 12, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject = function(includeInstance, msg) { + var f, obj = { + pb_function: jspb.Message.getFieldWithDefault(msg, 1, 0), + field: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} */ (reader.readEnum()); + msg.setFunction(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFunction(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -25028,11 +27228,51 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select = { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function = { DOCUMENTS: 0, - COUNT: 1 + COUNT: 1, + SUM: 2, + AVG: 3, + MIN: 4, + MAX: 5 +}; + +/** + * optional Function function = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.getFunction = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.setFunction = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + /** * optional bytes data_contract_id = 1; * @return {string} @@ -25094,86 +27334,78 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional bytes where = 3; - * @return {string} + * repeated WhereClause where_clauses = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhereClausesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, 3)); }; /** - * optional bytes where = 3; - * This is a type-conversion wrapper around `getWhere()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWhere())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setWhereClausesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional bytes where = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWhere()` - * @return {!Uint8Array} + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWhere())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addWhereClauses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, opt_index); }; /** - * @param {!(string|Uint8Array)} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setWhere = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearWhereClausesList = function() { + return this.setWhereClausesList([]); }; /** - * optional bytes order_by = 4; - * @return {string} + * repeated OrderClause order_by = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderByList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, 4)); }; /** - * optional bytes order_by = 4; - * This is a type-conversion wrapper around `getOrderBy()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderBy())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOrderByList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional bytes order_by = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderBy()` - * @return {!Uint8Array} + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderBy())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addOrderBy = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, opt_index); }; /** - * @param {!(string|Uint8Array)} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOrderBy = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearOrderByList = function() { + return this.setOrderByList([]); }; @@ -25352,20 +27584,40 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional Select select = 9; + * repeated Select selects = 9; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getSelectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setSelectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select=} opt_value + * @param {number=} opt_index * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getSelect = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addSelects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, opt_index); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setSelect = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearSelectsList = function() { + return this.setSelectsList([]); }; @@ -25407,44 +27659,76 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional bytes having = 11; - * @return {string} + * repeated HavingClause having = 11; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHavingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, 11)); }; /** - * optional bytes having = 11; - * This is a type-conversion wrapper around `getHaving()` - * @return {string} + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setHavingList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHaving())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addHaving = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, opt_index); }; /** - * optional bytes having = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHaving()` - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHaving())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearHavingList = function() { + return this.setHavingList([]); }; /** - * @param {!(string|Uint8Array)} value + * optional uint32 offset = 12; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOffset = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setHaving = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearOffset = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.hasOffset = function() { + return jspb.Message.getField(this, 12) != null; }; diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h index 2e060899e81..97c2b2c9319 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.h @@ -90,8 +90,16 @@ CF_EXTERN_C_BEGIN @class GetDataContractsResponse_DataContractEntry; @class GetDataContractsResponse_DataContracts; @class GetDataContractsResponse_GetDataContractsResponseV0; +@class GetDocumentsRequest_DocumentFieldValue; +@class GetDocumentsRequest_DocumentFieldValue_ValueList; @class GetDocumentsRequest_GetDocumentsRequestV0; @class GetDocumentsRequest_GetDocumentsRequestV1; +@class GetDocumentsRequest_GetDocumentsRequestV1_Select; +@class GetDocumentsRequest_HavingAggregate; +@class GetDocumentsRequest_HavingClause; +@class GetDocumentsRequest_HavingRanking; +@class GetDocumentsRequest_OrderClause; +@class GetDocumentsRequest_WhereClause; @class GetDocumentsResponse_GetDocumentsResponseV0; @class GetDocumentsResponse_GetDocumentsResponseV0_Documents; @class GetDocumentsResponse_GetDocumentsResponseV1; @@ -344,36 +352,156 @@ GPBEnumDescriptor *SecurityLevelMap_KeyKindRequestType_EnumDescriptor(void); **/ BOOL SecurityLevelMap_KeyKindRequestType_IsValidValue(int32_t value); -#pragma mark - Enum GetDocumentsRequest_GetDocumentsRequestV1_Select +#pragma mark - Enum GetDocumentsRequest_WhereOperator /** - * Projection over the matched row set. Determines whether the - * response carries documents or count results. + * Comparison operator for a single `WhereClause`. Wire values + * mirror `drive::query::WhereOperator` 1:1; the server maps the + * enum discriminant directly without re-parsing operator strings. + * + * `BETWEEN*` operators expect the right-hand operand to be a + * 2-element `DocumentFieldValue.list` carrying `[lower, upper]`; + * `IN` expects a `list` of candidate values; all other operators + * expect a scalar `DocumentFieldValue` matching the indexed + * field's type. + **/ +typedef GPB_ENUM(GetDocumentsRequest_WhereOperator) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetDocumentsRequest_WhereOperator_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + GetDocumentsRequest_WhereOperator_Equal = 0, + GetDocumentsRequest_WhereOperator_GreaterThan = 1, + GetDocumentsRequest_WhereOperator_GreaterThanOrEquals = 2, + GetDocumentsRequest_WhereOperator_LessThan = 3, + GetDocumentsRequest_WhereOperator_LessThanOrEquals = 4, + GetDocumentsRequest_WhereOperator_Between = 5, + GetDocumentsRequest_WhereOperator_BetweenExcludeBounds = 6, + GetDocumentsRequest_WhereOperator_BetweenExcludeLeft = 7, + GetDocumentsRequest_WhereOperator_BetweenExcludeRight = 8, + GetDocumentsRequest_WhereOperator_In = 9, + GetDocumentsRequest_WhereOperator_StartsWith = 10, +}; + +GPBEnumDescriptor *GetDocumentsRequest_WhereOperator_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetDocumentsRequest_WhereOperator_IsValidValue(int32_t value); + +#pragma mark - Enum GetDocumentsRequest_HavingAggregate_Function + +typedef GPB_ENUM(GetDocumentsRequest_HavingAggregate_Function) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetDocumentsRequest_HavingAggregate_Function_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + GetDocumentsRequest_HavingAggregate_Function_Count = 0, + GetDocumentsRequest_HavingAggregate_Function_Sum = 1, + GetDocumentsRequest_HavingAggregate_Function_Avg = 2, +}; + +GPBEnumDescriptor *GetDocumentsRequest_HavingAggregate_Function_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetDocumentsRequest_HavingAggregate_Function_IsValidValue(int32_t value); + +#pragma mark - Enum GetDocumentsRequest_HavingRanking_Kind + +typedef GPB_ENUM(GetDocumentsRequest_HavingRanking_Kind) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetDocumentsRequest_HavingRanking_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + GetDocumentsRequest_HavingRanking_Kind_Min = 0, + GetDocumentsRequest_HavingRanking_Kind_Max = 1, + GetDocumentsRequest_HavingRanking_Kind_Top = 2, + GetDocumentsRequest_HavingRanking_Kind_Bottom = 3, +}; + +GPBEnumDescriptor *GetDocumentsRequest_HavingRanking_Kind_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. + **/ +BOOL GetDocumentsRequest_HavingRanking_Kind_IsValidValue(int32_t value); + +#pragma mark - Enum GetDocumentsRequest_HavingClause_Operator + +typedef GPB_ENUM(GetDocumentsRequest_HavingClause_Operator) { + /** + * Value used if any message's field encounters a value that is not defined + * by this enum. The message will also have C functions to get/set the rawValue + * of the field. + **/ + GetDocumentsRequest_HavingClause_Operator_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + GetDocumentsRequest_HavingClause_Operator_Equal = 0, + GetDocumentsRequest_HavingClause_Operator_NotEqual = 1, + GetDocumentsRequest_HavingClause_Operator_GreaterThan = 2, + GetDocumentsRequest_HavingClause_Operator_GreaterThanOrEquals = 3, + GetDocumentsRequest_HavingClause_Operator_LessThan = 4, + GetDocumentsRequest_HavingClause_Operator_LessThanOrEquals = 5, + GetDocumentsRequest_HavingClause_Operator_Between = 6, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeBounds = 7, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeLeft = 8, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeRight = 9, + GetDocumentsRequest_HavingClause_Operator_In = 10, +}; + +GPBEnumDescriptor *GetDocumentsRequest_HavingClause_Operator_EnumDescriptor(void); + +/** + * Checks to see if the given value is defined by the enum or was not known at + * the time this source was generated. **/ -typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_Select) { +BOOL GetDocumentsRequest_HavingClause_Operator_IsValidValue(int32_t value); + +#pragma mark - Enum GetDocumentsRequest_GetDocumentsRequestV1_Select_Function + +typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_Select_Function) { /** * Value used if any message's field encounters a value that is not defined * by this enum. The message will also have C functions to get/set the rawValue * of the field. **/ - GetDocumentsRequest_GetDocumentsRequestV1_Select_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, - /** Return matched documents. `group_by` must be empty. */ - GetDocumentsRequest_GetDocumentsRequestV1_Select_Documents = 0, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Documents = 0, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Count = 1, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Sum = 2, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Avg = 3, /** - * Return a count — single aggregate when `group_by` is empty, - * per-group entries when `group_by` names a field. + * Per-group MIN / MAX — `SELECT MIN(field) GROUP BY + * category` returns the smallest `field` value in each + * category. Semantically distinct from + * `HavingRanking::Min` / `Max` (which are cross-group + * meta-aggregates over group results). MIN/MAX here + * operate over the row values within each group, the + * same way `SUM` and `AVG` do. **/ - GetDocumentsRequest_GetDocumentsRequestV1_Select_Count = 1, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Min = 4, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Max = 5, }; -GPBEnumDescriptor *GetDocumentsRequest_GetDocumentsRequestV1_Select_EnumDescriptor(void); +GPBEnumDescriptor *GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_EnumDescriptor(void); /** * Checks to see if the given value is defined by the enum or was not known at * the time this source was generated. **/ -BOOL GetDocumentsRequest_GetDocumentsRequestV1_Select_IsValidValue(int32_t value); +BOOL GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_IsValidValue(int32_t value); #pragma mark - Enum GetContestedResourceVoteStateRequest_GetContestedResourceVoteStateRequestV0_ResultType @@ -2314,6 +2442,380 @@ GPB_FINAL @interface GetDocumentsRequest : GPBMessage **/ void GetDocumentsRequest_ClearVersionOneOfCase(GetDocumentsRequest *message); +#pragma mark - GetDocumentsRequest_DocumentFieldValue + +typedef GPB_ENUM(GetDocumentsRequest_DocumentFieldValue_FieldNumber) { + GetDocumentsRequest_DocumentFieldValue_FieldNumber_BoolValue = 1, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_Int64Value = 2, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_Uint64Value = 3, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_DoubleValue = 4, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_Text = 5, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_BytesValue = 6, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_List = 7, + GetDocumentsRequest_DocumentFieldValue_FieldNumber_NullValue = 8, +}; + +typedef GPB_ENUM(GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase) { + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_BoolValue = 1, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_Int64Value = 2, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_Uint64Value = 3, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_DoubleValue = 4, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_Text = 5, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_BytesValue = 6, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_List = 7, + GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase_NullValue = 8, +}; + +/** + * Tagged scalar (or list) operand for a `WhereClause`. The + * variant the caller picks names the wire-level primitive type + * only — the **document type's schema** is the source of truth + * for the indexed field's actual type, and the server coerces + * each variant through the schema-driven + * `document_type.serialize_value_for_key(field, value, …)` path + * (the same path the CBOR-shaped v0 request flows through). That + * means: + * + * - Identifier-typed fields accept either a `bytes_value` (raw + * 32 bytes) **or** a `text` (base58-encoded). The schema + * decides; callers don't need a dedicated identifier variant. + * - Fixed-width byte fields (e.g. `Bytes20`/`Bytes36`) accept + * `bytes_value` of the appropriate length; the schema + * validates the size. + * - Numeric fields accept the closest-fit signed (`int64_value`) + * or unsigned (`uint64_value`) variant; the schema coerces to + * the indexed type (`u8` … `u64`/`i8` … `i64`/`u128`/`i128`). + * - String / bool fields accept `text` / `bool_value`. + * + * The `null_value` variant is the typed-wire equivalent of a CBOR + * `null` operand on the v0 path. Callers should NOT use it for + * "no clause" — empty where-clauses are still expressed by + * leaving `GetDocumentsRequestV1.where_clauses` empty. It exists + * for clauses that legitimately compare against `null` (e.g. + * queries on schema-nullable index entries from the v0 wire that + * round-trip through the v1 surface). + **/ +GPB_FINAL @interface GetDocumentsRequest_DocumentFieldValue : GPBMessage + +@property(nonatomic, readonly) GetDocumentsRequest_DocumentFieldValue_Variant_OneOfCase variantOneOfCase; + +@property(nonatomic, readwrite) BOOL boolValue; + +@property(nonatomic, readwrite) int64_t int64Value; + +@property(nonatomic, readwrite) uint64_t uint64Value; + +@property(nonatomic, readwrite) double doubleValue; + +@property(nonatomic, readwrite, copy, null_resettable) NSString *text; + +@property(nonatomic, readwrite, copy, null_resettable) NSData *bytesValue; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_DocumentFieldValue_ValueList *list; + +/** + * `bool` payload is a placeholder — only the discriminant + * matters. Picking the variant means "this operand is null"; + * the bool value itself is ignored on the server. + **/ +@property(nonatomic, readwrite) BOOL nullValue; + +@end + +/** + * Clears whatever value was set for the oneof 'variant'. + **/ +void GetDocumentsRequest_DocumentFieldValue_ClearVariantOneOfCase(GetDocumentsRequest_DocumentFieldValue *message); + +#pragma mark - GetDocumentsRequest_DocumentFieldValue_ValueList + +typedef GPB_ENUM(GetDocumentsRequest_DocumentFieldValue_ValueList_FieldNumber) { + GetDocumentsRequest_DocumentFieldValue_ValueList_FieldNumber_ValuesArray = 1, +}; + +/** + * Recursive list — operand for `IN` (candidate values) and + * `BETWEEN*` (exactly 2 values `[lower, upper]`). Nested + * `list` is structurally allowed but every supported document + * index value-type is currently scalar, so callers should not + * need to nest. + **/ +GPB_FINAL @interface GetDocumentsRequest_DocumentFieldValue_ValueList : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *valuesArray; +/** The number of items in @c valuesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger valuesArray_Count; + +@end + +#pragma mark - GetDocumentsRequest_WhereClause + +typedef GPB_ENUM(GetDocumentsRequest_WhereClause_FieldNumber) { + GetDocumentsRequest_WhereClause_FieldNumber_Field = 1, + GetDocumentsRequest_WhereClause_FieldNumber_Operator_p = 2, + GetDocumentsRequest_WhereClause_FieldNumber_Value = 3, +}; + +/** + * Single `field value` clause. The server reassembles a + * `Vec` from the request's `where_clauses` field, + * runs the same `WhereClause::group_clauses` validator (rejects + * duplicate / conflicting same-field clauses) and the same + * `> AND <` → `between*` canonicalizer the CBOR-shaped path uses, + * then hands the structured clauses to the executor. Wire + * semantics are identical to v0's CBOR `[field, op, value]` + * triples — only the envelope differs. + **/ +GPB_FINAL @interface GetDocumentsRequest_WhereClause : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSString *field; + +@property(nonatomic, readwrite) GetDocumentsRequest_WhereOperator operator_p; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_DocumentFieldValue *value; +/** Test to see if @c value has been set. */ +@property(nonatomic, readwrite) BOOL hasValue; + +@end + +/** + * Fetches the raw value of a @c GetDocumentsRequest_WhereClause's @c operator_p property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetDocumentsRequest_WhereClause_Operator_p_RawValue(GetDocumentsRequest_WhereClause *message); +/** + * Sets the raw value of an @c GetDocumentsRequest_WhereClause's @c operator_p property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetDocumentsRequest_WhereClause_Operator_p_RawValue(GetDocumentsRequest_WhereClause *message, int32_t value); + +#pragma mark - GetDocumentsRequest_HavingAggregate + +typedef GPB_ENUM(GetDocumentsRequest_HavingAggregate_FieldNumber) { + GetDocumentsRequest_HavingAggregate_FieldNumber_Function = 1, + GetDocumentsRequest_HavingAggregate_FieldNumber_Field = 2, +}; + +/** + * Per-group aggregate operand for the left side of a + * `HavingClause`. Only the per-group aggregates live here: + * `MIN` / `MAX` / `TOP` / `BOTTOM` are **cross-group** ranking + * primitives and appear on the right side via `HavingRanking`. + * + * **Field semantics by function**: + * - `COUNT`: empty `field` means `COUNT(*)` (group cardinality); + * non-empty `field` means `COUNT(field)` (count of non-null + * values of `field` in the group). + * - `SUM` / `AVG`: `field` is required. + **/ +GPB_FINAL @interface GetDocumentsRequest_HavingAggregate : GPBMessage + +@property(nonatomic, readwrite) GetDocumentsRequest_HavingAggregate_Function function; + +/** + * Required for every function except `COUNT`; for `COUNT` an + * empty `field` means `COUNT(*)`. + **/ +@property(nonatomic, readwrite, copy, null_resettable) NSString *field; + +@end + +/** + * Fetches the raw value of a @c GetDocumentsRequest_HavingAggregate's @c function property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetDocumentsRequest_HavingAggregate_Function_RawValue(GetDocumentsRequest_HavingAggregate *message); +/** + * Sets the raw value of an @c GetDocumentsRequest_HavingAggregate's @c function property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetDocumentsRequest_HavingAggregate_Function_RawValue(GetDocumentsRequest_HavingAggregate *message, int32_t value); + +#pragma mark - GetDocumentsRequest_HavingRanking + +typedef GPB_ENUM(GetDocumentsRequest_HavingRanking_FieldNumber) { + GetDocumentsRequest_HavingRanking_FieldNumber_Kind = 1, + GetDocumentsRequest_HavingRanking_FieldNumber_N = 2, +}; + +/** + * Cross-group ranking primitive on the right side of a + * `HavingClause`. The ranking is computed over the set of + * group-aggregate results (one per `GROUP BY` row), so + * `HAVING COUNT(*) EQ MAX` selects groups whose count equals + * the maximum count across all groups, and + * `HAVING COUNT(*) IN TOP(5)` selects groups whose count is + * among the five largest. Concise way to express top-N / + * bottom-N selection without window functions or + * `ORDER BY` + `LIMIT`. + * + * **Operator compatibility**: + * - Scalar operators (`=`, `!=`, `<`, `<=`, `>`, `>=`) work + * with `MIN` / `MAX`. `TOP` / `BOTTOM` with scalar operators + * only make sense when `n=1` (the single largest / smallest); + * evaluation rejects other combinations as ambiguous. + * - `IN` works with `TOP(n)` / `BOTTOM(n)` for set membership. + * - `BETWEEN*` doesn't compose meaningfully with rankings and + * is rejected at evaluation time. + **/ +GPB_FINAL @interface GetDocumentsRequest_HavingRanking : GPBMessage + +@property(nonatomic, readwrite) GetDocumentsRequest_HavingRanking_Kind kind; + +/** + * N-th rank for `TOP` / `BOTTOM` (1-indexed: `n=1` is the + * single largest / smallest). Required for those two kinds; + * must be unset for `MIN` / `MAX`. The wire allows setting + * it on `MIN` / `MAX` for forward compatibility, but + * evaluation rejects it as a malformed ranking. + **/ +@property(nonatomic, readwrite) uint64_t n; + +@property(nonatomic, readwrite) BOOL hasN; +@end + +/** + * Fetches the raw value of a @c GetDocumentsRequest_HavingRanking's @c kind property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetDocumentsRequest_HavingRanking_Kind_RawValue(GetDocumentsRequest_HavingRanking *message); +/** + * Sets the raw value of an @c GetDocumentsRequest_HavingRanking's @c kind property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetDocumentsRequest_HavingRanking_Kind_RawValue(GetDocumentsRequest_HavingRanking *message, int32_t value); + +#pragma mark - GetDocumentsRequest_HavingClause + +typedef GPB_ENUM(GetDocumentsRequest_HavingClause_FieldNumber) { + GetDocumentsRequest_HavingClause_FieldNumber_Aggregate = 1, + GetDocumentsRequest_HavingClause_FieldNumber_Operator_p = 2, + GetDocumentsRequest_HavingClause_FieldNumber_Value = 3, + GetDocumentsRequest_HavingClause_FieldNumber_Ranking = 4, +}; + +typedef GPB_ENUM(GetDocumentsRequest_HavingClause_Right_OneOfCase) { + GetDocumentsRequest_HavingClause_Right_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsRequest_HavingClause_Right_OneOfCase_Value = 3, + GetDocumentsRequest_HavingClause_Right_OneOfCase_Ranking = 4, +}; + +/** + * Single `HAVING ` clause. Multiple + * entries in `GetDocumentsRequestV1.having` combine with + * implicit AND — same semantics as multiple `where_clauses` + * entries. `HAVING COUNT(*) > 5 AND SUM(amount) > 100` is two + * `HavingClause` rows, not a tree. + * + * The operator set mirrors `WhereOperator` minus `STARTS_WITH` + * (prefix matching has no natural meaning against a scalar + * aggregate result, even a string-typed one). `BETWEEN*` and + * `IN` operand semantics match `WhereOperator`: `BETWEEN*` + * expects a 2-element `DocumentFieldValue.list` carrying + * `[lower, upper]`, and `IN` expects a `list` of candidate + * values (or a ranking set via `right.ranking`). + * + * The `right` oneof carries either a concrete + * `DocumentFieldValue` (literal comparison target) or a + * `HavingRanking` (cross-group reference). Exactly one is set; + * the wire rejects an unset `right`. + **/ +GPB_FINAL @interface GetDocumentsRequest_HavingClause : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_HavingAggregate *aggregate; +/** Test to see if @c aggregate has been set. */ +@property(nonatomic, readwrite) BOOL hasAggregate; + +@property(nonatomic, readwrite) GetDocumentsRequest_HavingClause_Operator operator_p; + +@property(nonatomic, readonly) GetDocumentsRequest_HavingClause_Right_OneOfCase rightOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_DocumentFieldValue *value; + +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_HavingRanking *ranking; + +@end + +/** + * Fetches the raw value of a @c GetDocumentsRequest_HavingClause's @c operator_p property, even + * if the value was not defined by the enum at the time the code was generated. + **/ +int32_t GetDocumentsRequest_HavingClause_Operator_p_RawValue(GetDocumentsRequest_HavingClause *message); +/** + * Sets the raw value of an @c GetDocumentsRequest_HavingClause's @c operator_p property, allowing + * it to be set to a value that was not defined by the enum at the time the code + * was generated. + **/ +void SetGetDocumentsRequest_HavingClause_Operator_p_RawValue(GetDocumentsRequest_HavingClause *message, int32_t value); + +/** + * Clears whatever value was set for the oneof 'right'. + **/ +void GetDocumentsRequest_HavingClause_ClearRightOneOfCase(GetDocumentsRequest_HavingClause *message); + +#pragma mark - GetDocumentsRequest_OrderClause + +typedef GPB_ENUM(GetDocumentsRequest_OrderClause_FieldNumber) { + GetDocumentsRequest_OrderClause_FieldNumber_Field = 1, + GetDocumentsRequest_OrderClause_FieldNumber_Ascending = 2, + GetDocumentsRequest_OrderClause_FieldNumber_Aggregate = 3, +}; + +typedef GPB_ENUM(GetDocumentsRequest_OrderClause_Target_OneOfCase) { + GetDocumentsRequest_OrderClause_Target_OneOfCase_GPBUnsetOneOfCase = 0, + GetDocumentsRequest_OrderClause_Target_OneOfCase_Field = 1, + GetDocumentsRequest_OrderClause_Target_OneOfCase_Aggregate = 3, +}; + +/** + * Single `ORDER BY field ` clause. Multi-field + * ordering is expressed by repeating this message at the + * request level (`repeated OrderClause order_by = 4`), matching + * SQL's `ORDER BY a ASC, b DESC` shape. + * Single ORDER BY entry. Multi-entry ordering is expressed by + * repeating this message at the request level. + * + * The `target` oneof carries either a plain field name + * (`ORDER BY field`) or an aggregate function applied to a + * field (`ORDER BY COUNT(*)`, `ORDER BY SUM(amount)`) — the + * latter sorts per-group result rows produced by `GROUP BY`, + * useful with `LIMIT` for top-N / bottom-N selection at the + * routing layer (overlapping `HavingRanking::Top` / `Bottom` + * but more general because the ranking field can be any + * aggregate, not just count). + * + * **Aggregate target currently rejected** with + * `Unsupported("ORDER BY on aggregate is not yet implemented")`. + * The wire surface is shipped now so callers can encode the + * shape ahead of server support landing. + **/ +GPB_FINAL @interface GetDocumentsRequest_OrderClause : GPBMessage + +@property(nonatomic, readonly) GetDocumentsRequest_OrderClause_Target_OneOfCase targetOneOfCase; + +/** Plain field name. Today's evaluated form. */ +@property(nonatomic, readwrite, copy, null_resettable) NSString *field; + +/** + * Aggregate function applied to a field, sorted by the + * per-group result. `function = DOCUMENTS` is invalid + * here — DOCUMENTS isn't an aggregate. + **/ +@property(nonatomic, readwrite, strong, null_resettable) GetDocumentsRequest_HavingAggregate *aggregate; + +@property(nonatomic, readwrite) BOOL ascending; + +@end + +/** + * Clears whatever value was set for the oneof 'target'. + **/ +void GetDocumentsRequest_OrderClause_ClearTargetOneOfCase(GetDocumentsRequest_OrderClause *message); + #pragma mark - GetDocumentsRequest_GetDocumentsRequestV0 typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV0_FieldNumber) { @@ -2374,15 +2876,16 @@ void GetDocumentsRequest_GetDocumentsRequestV0_ClearStartOneOfCase(GetDocumentsR typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber) { GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_DataContractId = 1, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_DocumentType = 2, - GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Where = 3, - GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_OrderBy = 4, + GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_WhereClausesArray = 3, + GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_OrderByArray = 4, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Limit = 5, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_StartAfter = 6, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_StartAt = 7, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Prove = 8, - GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Select = 9, + GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_SelectsArray = 9, GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_GroupByArray = 10, - GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Having = 11, + GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_HavingArray = 11, + GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Offset = 12, }; typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_Start_OneOfCase) { @@ -2408,59 +2911,74 @@ typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_Start_OneOfCase) { * * `select = COUNT, group_by = []`: return per-group * `CountEntry` rows. Only supported when the grouping field * matches an `In`-constrained or range-constrained where clause; - * other shapes return `Unsupported` (see Phase 1 notes below). + * other shapes return `Unsupported` (see supported-shape table + * below). * - * `having` is wire-reserved for Phase 2. Any non-empty `having` - * value returns `Unsupported("HAVING clause is not yet - * implemented")` regardless of `select` / `group_by`. + * `having` is wire-reserved for a future server capability. Any + * non-empty `having` list currently returns + * `Unsupported("HAVING clause is not yet implemented")` + * regardless of `select` / `group_by`. The wire shape is + * `repeated WhereClause` so when execution lands the surface is + * already typed end-to-end and callers don't need to re-encode. * - * **Phase 1 supported shapes** (everything else rejects with a - * typed `QuerySyntaxError::Unsupported` so callers can detect - * un-wired capabilities without parsing prose): + * **Supported shapes** (everything else rejects with a typed + * `QuerySyntaxError::Unsupported` so callers can detect un-wired + * capabilities without parsing prose). Bullets are kept + * single-line so the generated Rust doc comments don't trip + * rustdoc's `list_item_without_indent` lint on continuation + * lines. * - * select=DOCUMENTS, group_by=[]: - * any where shape v0 supports. + * `select=DOCUMENTS, group_by=[]`: any where shape v0 supports. * - * select=COUNT, group_by=[]: - * - empty where → `documentsCountable: true` doctype. - * - `==` only → `countable: true` index covering the fields. - * - one `In` → `countable: true` index covering the fields - * (per-In aggregate fan-out). - * - one range → `rangeCountable: true` index. - * - one `In` + one range → `rangeCountable: true` compound - * index (per-In aggregate fan-out on no-proof; rejected on - * prove because the aggregate proof primitive can't fork). + * `select=COUNT, group_by=[]`: + * - empty where → `documentsCountable: true` doctype. + * - `==` only → `countable: true` index covering the fields. + * - one `In` → `countable: true` index covering the fields (per-In aggregate fan-out). + * - one range → `rangeCountable: true` index. + * - one `In` + one range → `rangeCountable: true` compound index (per-In aggregate fan-out on no-proof; rejected on prove because the aggregate proof primitive can't fork). * - * select=COUNT, group_by=[g]: - * - g is the In clause's field → `countable: true` index, - * grouped by g (PerInValue on no-proof, CountTree element - * proof per In branch on prove). - * - g is the range clause's field → `rangeCountable: true` - * index, grouped by g (RangeDistinct on no-proof, distinct - * range proof on prove). + * `select=COUNT, group_by=[g]`: + * - g is the In clause's field → `countable: true` index, grouped by g (PerInValue on no-proof, CountTree element proof per In branch on prove). + * - g is the range clause's field → `rangeCountable: true` index, grouped by g (RangeDistinct on no-proof, distinct range proof on prove). * - * select=COUNT, group_by=[a, b]: - * - a is the In field AND b is the range field, in that order - * → existing compound distinct shape; entries carry both - * `in_key` (= a's value) and `key` (= b's value). + * `select=COUNT, group_by=[a, b]`: + * - a is the In field AND b is the range field, in that order → existing compound distinct shape; entries carry both `in_key` (= a's value) and `key` (= b's value). * - * **Phase 1 rejected shapes** (return `Unsupported`): - * - any non-empty `having` (always). - * - `select=DOCUMENTS` with non-empty `group_by`. - * - `select=COUNT` with `group_by` on a field that is not - * constrained by an `In` or range where clause. - * - `select=COUNT` with `group_by.len() > 2`. - * - `select=COUNT` with 2-field `group_by` that does not match - * the `(in_field, range_field)` shape above. + * **Rejected shapes** (return `Unsupported`): + * - any non-empty `having` (always — pending future server capability). + * - `select=DOCUMENTS` with non-empty `group_by`. + * - `select=COUNT` with `group_by` on a field that is not constrained by an `In` or range where clause. + * - `select=COUNT` with `group_by.len() > 2`. + * - `select=COUNT` with 2-field `group_by` that does not match the `(in_field, range_field)` shape above. * - * **Zero-count entries on `In`-grouped queries**: when + * **Absent-from-tree branches on `In`-grouped queries**: when * `select=COUNT, group_by=[in_field]` and an `In` value has no - * matching documents, v1 emits a `CountEntry { key: in_value, - * count: 0 }` for it — a deliberate divergence from SQL, which - * would skip empty groups. Callers can distinguish "no docs at - * this value" from "value filtered out" without re-querying. - * For range-grouped queries the existing walker only emits keys - * that exist in the index, which IS SQL-conformant; no change. + * matching documents, the underlying merk index has nothing to + * emit (zero-count branches aren't materialized as CountTree + * elements), so the wire `CountEntries.entries` list contains + * only the In values that exist. + * + * The SDK's proof decoder surfaces this by **omission**, not by + * a sentinel `count` value: the current point-lookup path query + * doesn't set `absence_proofs_for_non_existing_searched_keys: + * true`, so grovedb's `verify_query` silently drops absent-Key + * branches from the verified elements stream. The drive-side + * verifier (`verify_point_lookup_count_proof`) therefore emits + * one `SplitCountEntry` per **present** In branch and the SDK + * wraps those into `CountEntry`. Callers that need to detect + * "queried but absent" diff their request's In array against + * the returned entries by `key` (each entry's `key` is the + * serialized In value, recoverable via + * `document_type.serialize_value_for_key(in_field, v, …)`). + * `SplitCountEntry::count`'s `Option` and the `None` + * variant exist for a future absence-proof variant; today the + * wire `CountEntry.count` is plain `uint64`. + * + * For range-grouped queries the walker only emits keys that + * exist in the index, which IS SQL-conformant; no equivalent + * reconstruction step because the range itself is unbounded and + * the caller has no explicit "expected keys" list to compare + * against. **/ GPB_FINAL @interface GetDocumentsRequest_GetDocumentsRequestV1 : GPBMessage @@ -2470,32 +2988,82 @@ GPB_FINAL @interface GetDocumentsRequest_GetDocumentsRequestV1 : GPBMessage /** Document type within the contract */ @property(nonatomic, readwrite, copy, null_resettable) NSString *documentType; -/** CBOR-encoded where clauses (same shape as v0) */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *where; +/** + * Structured where clauses. Empty list = no `WHERE` filter + * (return all matching rows under the document type / contract). + * See top-level `WhereClause` for shape semantics. + **/ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *whereClausesArray; +/** The number of items in @c whereClausesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger whereClausesArray_Count; -/** CBOR-encoded order_by clauses (same shape as v0) */ -@property(nonatomic, readwrite, copy, null_resettable) NSData *orderBy; +/** + * Structured order_by clauses. Empty list = no explicit + * ordering (server applies the index's natural order). Multiple + * entries express SQL's `ORDER BY a ASC, b DESC, …` shape; the + * first entry's direction also governs split-mode entry + * ordering on `select=COUNT` paths. + **/ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *orderByArray; +/** The number of items in @c orderByArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger orderByArray_Count; /** * Maximum number of rows to return. + * + * **Wire semantics on the `optional uint32` field**: `None` + * (unset) requests the server's default; `Some(N)` with `N > 0` + * requests an explicit cap of `N`. `Some(0)` is **rejected with + * `InvalidLimit` across every SELECT mode** — zero-cap is + * structurally meaningless and the legacy v0 `uint32`-with-0-as- + * sentinel mapping doesn't extend to `optional uint32` (the + * whole point of switching is that `None` carries "unset" + * explicitly). Callers must send `None` for "use server default." + * + * Per-mode behavior of `Some(N > 0)`: * - `select=DOCUMENTS`: matched-document cap (same as v0). - * - `select=COUNT, group_by=[]`: ignored (aggregate is one row). - * - `select=COUNT, group_by=[…]`: entries cap. On prove paths - * this is validate-don't-clamp — `limit > max_query_limit` - * returns `InvalidLimit` rather than silent clamping (see - * `RangeDistinctProof`'s contract; unset falls back to the - * SDK-shared `DEFAULT_QUERY_LIMIT` compile-time constant so - * proof bytes are deterministic across operators). + * - `select=COUNT, group_by=[]`: **rejected with `InvalidLimit` + * when set**. Aggregate count is a single row by construction + * — a limit would either be redundant (≥ 1) or silently + * mislead callers if the dispatcher's per-In fan-out honored + * it and returned a partial sum disguised as a total. Omit + * `limit` for aggregate count. + * - `select=COUNT, group_by=[in_field]`: **rejected with + * `InvalidLimit` when set**. The In array is already capped + * at 100 entries by `WhereClause::in_values()`, so the + * result is bounded by construction; a separate `limit` + * would either be redundant or silently truncate the proof + * to fewer In branches than the caller asked for (the + * PointLookupProof shape can't represent a partial-In + * selection in its `SizedQuery`). Narrow the In array + * directly to reduce the result set. + * - `select=COUNT, group_by=[range_field]`: entries cap on + * the distinct-range walk. + * - `select=COUNT, group_by=[in_field, range_field]`: global + * cap over the emitted `(in_key, key)` lex stream — NOT + * per-In-branch. The compound walk pushes one + * `SizedQuery::limit` over the combined tuple stream, so a + * request with `|In| = 3` and `limit = 5` returns at most + * 5 entries total across all In branches (ordered by + * `(in_key, key)`, direction from the first `order_by` + * clause). + * Both range-grouped variants share the same validate-don't- + * clamp policy on prove paths — `limit > max_query_limit` + * returns `InvalidLimit` rather than silent clamping (see + * `RangeDistinctProof`'s contract; unset falls back to the + * SDK-shared `DEFAULT_QUERY_LIMIT` compile-time constant so + * proof bytes are deterministic across operators). **/ @property(nonatomic, readwrite) uint32_t limit; @property(nonatomic, readwrite) BOOL hasLimit; /** - * Pagination cursor. Valid for `select=DOCUMENTS` and for - * `select=COUNT` with non-empty `group_by` (paginate entries by - * the grouping field's serialized key). Rejected on - * `select=COUNT, group_by=[]` — no concept of "start" for a - * single aggregate. + * Pagination cursor. Valid only for `select=DOCUMENTS`. The + * count surface (`select=COUNT`) rejects cursors entirely: + * aggregate counts have no concept of "start," and per-group + * entry paginators would need a new merk walk that doesn't + * exist yet — callers paginate counts by narrowing the + * where-clause range itself instead. **/ @property(nonatomic, readonly) GetDocumentsRequest_GetDocumentsRequestV1_Start_OneOfCase startOneOfCase; @@ -2507,47 +3075,138 @@ GPB_FINAL @interface GetDocumentsRequest_GetDocumentsRequestV1 : GPBMessage @property(nonatomic, readwrite) BOOL prove; /** - * SQL `SELECT` projection. Default `DOCUMENTS` keeps v0 semantics - * for callers that just want documents back. + * SQL `SELECT` projection list. Multiple entries express + * `SELECT f1(a), f2(b), …` — one row per group carrying a + * parallel list of aggregate values in the response. + * + * Empty list defaults to a single `documents()` projection + * for v0-style document fetch — callers that don't opt into + * the SQL-shaped surface get plain row semantics. + * + * **Currently rejected when `selects.len() > 1`** with + * `Unsupported("multi-projection SELECT is not yet + * implemented")`. The single-projection cases (`DOCUMENTS`, + * `COUNT(*)`) are evaluated today; `SUM` / `AVG` / `MIN` / + * `MAX` are rejected at the per-function gate. When + * multi-projection lands the response shape gains a parallel + * `repeated AggregateValue values` field, so caller code + * structured around `repeated Select` doesn't need to be + * rewritten when it does. **/ -@property(nonatomic, readwrite) GetDocumentsRequest_GetDocumentsRequestV1_Select select; +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *selectsArray; +/** The number of items in @c selectsArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger selectsArray_Count; /** * SQL `GROUP BY` field names, in left-to-right order. Empty = - * no explicit grouping (aggregate for `select=COUNT`). See - * message-level docstring for the Phase 1 supported shapes. + * no explicit grouping (aggregate for `select=COUNT`). See the + * message-level docstring for the supported-shape table. **/ @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *groupByArray; /** The number of items in @c groupByArray without causing the array to be created. */ @property(nonatomic, readonly) NSUInteger groupByArray_Count; /** - * SQL `HAVING` clauses, CBOR-encoded the same way as `where`. - * **Phase 1: always rejected when non-empty** with - * `Unsupported("HAVING clause is not yet implemented")`. - * Reserved on the wire so future capability can land without + * SQL `HAVING` clauses — aggregate filters that apply to the + * grouped rows produced by `select=COUNT, group_by=[…]`. The + * wire shape is `HavingClause`, not `WhereClause`, because + * HAVING evaluates against per-group aggregates + * (`COUNT`/`SUM`/`AVG`/`MIN`/`MAX`/`TOP`/`BOTTOM`) rather than + * row field values. Multiple entries combine with implicit + * AND. See `HavingClause` / `HavingAggregate` for the + * operator and aggregate-function catalogs. + * + * **Always rejected when non-empty** today with + * `Unsupported("HAVING clause is not yet implemented")`. The + * wire shape is shipped now so the future server capability + * can land without another version bump — and so callers can + * construct full `HAVING COUNT(*) > 5 AND SUM(amount) > 100` + * requests in their builders even before the server evaluates + * them. + **/ +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *havingArray; +/** The number of items in @c havingArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger havingArray_Count; + +/** + * Row-based pagination offset, on top of the cursor-based + * `start_after` / `start_at` pagination. `OFFSET N` skips the + * first `N` matching rows before applying `limit`. Currently + * **always rejected when non-`None`** with + * `Unsupported("OFFSET pagination is not yet implemented")` + * — the wire surface is shipped now so callers can encode it + * ahead of server support landing without another version + * bump. Cursor pagination via `start_after` / `start_at` + * remains the supported way to page through results. + **/ +@property(nonatomic, readwrite) uint32_t offset; + +@property(nonatomic, readwrite) BOOL hasOffset; +@end + +/** + * Clears whatever value was set for the oneof 'start'. + **/ +void GetDocumentsRequest_GetDocumentsRequestV1_ClearStartOneOfCase(GetDocumentsRequest_GetDocumentsRequestV1 *message); + +#pragma mark - GetDocumentsRequest_GetDocumentsRequestV1_Select + +typedef GPB_ENUM(GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber) { + GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Function = 1, + GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Field = 2, +}; + +/** + * Projection over the matched row set. `(function, field)` + * pair — analogous to `HavingAggregate`'s shape but with an + * additional `DOCUMENTS` variant for the row-fetch path. + * + * Determines what the response carries: + * - `DOCUMENTS`: `ResultData.documents` (matched rows; + * `field` must be empty). + * - `COUNT`: `ResultData.counts` carrying row counts. Empty + * `field` is `COUNT(*)` (group cardinality); non-empty is + * `COUNT(field)` (non-null `field` values). + * - `SUM` / `AVG`: `ResultData` carrying numeric + * aggregate(s); `field` is required and must be a + * numeric-typed schema field. + * + * Single-aggregate vs per-group response shape comes from + * `group_by` (empty → single, non-empty → per-group entries) — + * same rule as today's `COUNT` routing. + * + * **Server capability today**: only `DOCUMENTS` and + * `COUNT(*)` (empty `field`) are evaluated. `SUM` / `AVG` + * and `COUNT(field)` are wire-stable but rejected at routing + * time with `Unsupported("… is not yet implemented")` so the + * surface is shipped first and execution lands later without * another version bump. **/ -@property(nonatomic, readwrite, copy, null_resettable) NSData *having; +GPB_FINAL @interface GetDocumentsRequest_GetDocumentsRequestV1_Select : GPBMessage + +@property(nonatomic, readwrite) GetDocumentsRequest_GetDocumentsRequestV1_Select_Function function; + +/** + * Field the projection function is applied to. See the + * message-level docstring for the per-function requirement + * (empty for `DOCUMENTS`, optional for `COUNT`, required + * for `SUM` / `AVG` / `MIN` / `MAX`). + **/ +@property(nonatomic, readwrite, copy, null_resettable) NSString *field; @end /** - * Fetches the raw value of a @c GetDocumentsRequest_GetDocumentsRequestV1's @c select property, even + * Fetches the raw value of a @c GetDocumentsRequest_GetDocumentsRequestV1_Select's @c function property, even * if the value was not defined by the enum at the time the code was generated. **/ -int32_t GetDocumentsRequest_GetDocumentsRequestV1_Select_RawValue(GetDocumentsRequest_GetDocumentsRequestV1 *message); +int32_t GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_RawValue(GetDocumentsRequest_GetDocumentsRequestV1_Select *message); /** - * Sets the raw value of an @c GetDocumentsRequest_GetDocumentsRequestV1's @c select property, allowing + * Sets the raw value of an @c GetDocumentsRequest_GetDocumentsRequestV1_Select's @c function property, allowing * it to be set to a value that was not defined by the enum at the time the code * was generated. **/ -void SetGetDocumentsRequest_GetDocumentsRequestV1_Select_RawValue(GetDocumentsRequest_GetDocumentsRequestV1 *message, int32_t value); - -/** - * Clears whatever value was set for the oneof 'start'. - **/ -void GetDocumentsRequest_GetDocumentsRequestV1_ClearStartOneOfCase(GetDocumentsRequest_GetDocumentsRequestV1 *message); +void SetGetDocumentsRequest_GetDocumentsRequestV1_Select_Function_RawValue(GetDocumentsRequest_GetDocumentsRequestV1_Select *message, int32_t value); #pragma mark - GetDocumentsResponse diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m index 04fe7e93eb9..b4e1ac60fe9 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbobjc.m @@ -117,8 +117,16 @@ GPBObjCClassDeclaration(GetDataContractsResponse_DataContracts); GPBObjCClassDeclaration(GetDataContractsResponse_GetDataContractsResponseV0); GPBObjCClassDeclaration(GetDocumentsRequest); +GPBObjCClassDeclaration(GetDocumentsRequest_DocumentFieldValue); +GPBObjCClassDeclaration(GetDocumentsRequest_DocumentFieldValue_ValueList); GPBObjCClassDeclaration(GetDocumentsRequest_GetDocumentsRequestV0); GPBObjCClassDeclaration(GetDocumentsRequest_GetDocumentsRequestV1); +GPBObjCClassDeclaration(GetDocumentsRequest_GetDocumentsRequestV1_Select); +GPBObjCClassDeclaration(GetDocumentsRequest_HavingAggregate); +GPBObjCClassDeclaration(GetDocumentsRequest_HavingClause); +GPBObjCClassDeclaration(GetDocumentsRequest_HavingRanking); +GPBObjCClassDeclaration(GetDocumentsRequest_OrderClause); +GPBObjCClassDeclaration(GetDocumentsRequest_WhereClause); GPBObjCClassDeclaration(GetDocumentsResponse); GPBObjCClassDeclaration(GetDocumentsResponse_GetDocumentsResponseV0); GPBObjCClassDeclaration(GetDocumentsResponse_GetDocumentsResponseV0_Documents); @@ -5140,6 +5148,773 @@ void GetDocumentsRequest_ClearVersionOneOfCase(GetDocumentsRequest *message) { GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; GPBClearOneof(message, oneof); } +#pragma mark - Enum GetDocumentsRequest_WhereOperator + +GPBEnumDescriptor *GetDocumentsRequest_WhereOperator_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Equal\000GreaterThan\000GreaterThanOrEquals\000Le" + "ssThan\000LessThanOrEquals\000Between\000BetweenE" + "xcludeBounds\000BetweenExcludeLeft\000BetweenE" + "xcludeRight\000In\000StartsWith\000"; + static const int32_t values[] = { + GetDocumentsRequest_WhereOperator_Equal, + GetDocumentsRequest_WhereOperator_GreaterThan, + GetDocumentsRequest_WhereOperator_GreaterThanOrEquals, + GetDocumentsRequest_WhereOperator_LessThan, + GetDocumentsRequest_WhereOperator_LessThanOrEquals, + GetDocumentsRequest_WhereOperator_Between, + GetDocumentsRequest_WhereOperator_BetweenExcludeBounds, + GetDocumentsRequest_WhereOperator_BetweenExcludeLeft, + GetDocumentsRequest_WhereOperator_BetweenExcludeRight, + GetDocumentsRequest_WhereOperator_In, + GetDocumentsRequest_WhereOperator_StartsWith, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_WhereOperator) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetDocumentsRequest_WhereOperator_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetDocumentsRequest_WhereOperator_IsValidValue(int32_t value__) { + switch (value__) { + case GetDocumentsRequest_WhereOperator_Equal: + case GetDocumentsRequest_WhereOperator_GreaterThan: + case GetDocumentsRequest_WhereOperator_GreaterThanOrEquals: + case GetDocumentsRequest_WhereOperator_LessThan: + case GetDocumentsRequest_WhereOperator_LessThanOrEquals: + case GetDocumentsRequest_WhereOperator_Between: + case GetDocumentsRequest_WhereOperator_BetweenExcludeBounds: + case GetDocumentsRequest_WhereOperator_BetweenExcludeLeft: + case GetDocumentsRequest_WhereOperator_BetweenExcludeRight: + case GetDocumentsRequest_WhereOperator_In: + case GetDocumentsRequest_WhereOperator_StartsWith: + return YES; + default: + return NO; + } +} + +#pragma mark - GetDocumentsRequest_DocumentFieldValue + +@implementation GetDocumentsRequest_DocumentFieldValue + +@dynamic variantOneOfCase; +@dynamic boolValue; +@dynamic int64Value; +@dynamic uint64Value; +@dynamic doubleValue; +@dynamic text; +@dynamic bytesValue; +@dynamic list; +@dynamic nullValue; + +typedef struct GetDocumentsRequest_DocumentFieldValue__storage_ { + uint32_t _has_storage_[2]; + NSString *text; + NSData *bytesValue; + GetDocumentsRequest_DocumentFieldValue_ValueList *list; + int64_t int64Value; + uint64_t uint64Value; + double doubleValue; +} GetDocumentsRequest_DocumentFieldValue__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "boolValue", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_BoolValue, + .hasIndex = -1, + .offset = 0, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + { + .name = "int64Value", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_Int64Value, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, int64Value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeSInt64, + }, + { + .name = "uint64Value", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_Uint64Value, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, uint64Value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + { + .name = "doubleValue", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_DoubleValue, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, doubleValue), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeDouble, + }, + { + .name = "text", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_Text, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, text), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "bytesValue", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_BytesValue, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, bytesValue), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBytes, + }, + { + .name = "list", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_DocumentFieldValue_ValueList), + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_List, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue__storage_, list), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "nullValue", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_DocumentFieldValue_FieldNumber_NullValue, + .hasIndex = -1, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = GPBFieldOptional, + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_DocumentFieldValue class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_DocumentFieldValue__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "variant", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsRequest_DocumentFieldValue_ClearVariantOneOfCase(GetDocumentsRequest_DocumentFieldValue *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_DocumentFieldValue descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsRequest_DocumentFieldValue_ValueList + +@implementation GetDocumentsRequest_DocumentFieldValue_ValueList + +@dynamic valuesArray, valuesArray_Count; + +typedef struct GetDocumentsRequest_DocumentFieldValue_ValueList__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *valuesArray; +} GetDocumentsRequest_DocumentFieldValue_ValueList__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "valuesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_DocumentFieldValue), + .number = GetDocumentsRequest_DocumentFieldValue_ValueList_FieldNumber_ValuesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsRequest_DocumentFieldValue_ValueList__storage_, valuesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_DocumentFieldValue_ValueList class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_DocumentFieldValue_ValueList__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest_DocumentFieldValue)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetDocumentsRequest_WhereClause + +@implementation GetDocumentsRequest_WhereClause + +@dynamic field; +@dynamic operator_p; +@dynamic hasValue, value; + +typedef struct GetDocumentsRequest_WhereClause__storage_ { + uint32_t _has_storage_[1]; + GetDocumentsRequest_WhereOperator operator_p; + NSString *field; + GetDocumentsRequest_DocumentFieldValue *value; +} GetDocumentsRequest_WhereClause__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "field", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_WhereClause_FieldNumber_Field, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsRequest_WhereClause__storage_, field), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + { + .name = "operator_p", + .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_WhereOperator_EnumDescriptor, + .number = GetDocumentsRequest_WhereClause_FieldNumber_Operator_p, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_WhereClause__storage_, operator_p), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "value", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_DocumentFieldValue), + .number = GetDocumentsRequest_WhereClause_FieldNumber_Value, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetDocumentsRequest_WhereClause__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_WhereClause class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_WhereClause__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetDocumentsRequest_WhereClause_Operator_p_RawValue(GetDocumentsRequest_WhereClause *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_WhereClause descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_WhereClause_FieldNumber_Operator_p]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetDocumentsRequest_WhereClause_Operator_p_RawValue(GetDocumentsRequest_WhereClause *message, int32_t value) { + GPBDescriptor *descriptor = [GetDocumentsRequest_WhereClause descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_WhereClause_FieldNumber_Operator_p]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - GetDocumentsRequest_HavingAggregate + +@implementation GetDocumentsRequest_HavingAggregate + +@dynamic function; +@dynamic field; + +typedef struct GetDocumentsRequest_HavingAggregate__storage_ { + uint32_t _has_storage_[1]; + GetDocumentsRequest_HavingAggregate_Function function; + NSString *field; +} GetDocumentsRequest_HavingAggregate__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "function", + .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_HavingAggregate_Function_EnumDescriptor, + .number = GetDocumentsRequest_HavingAggregate_FieldNumber_Function, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingAggregate__storage_, function), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "field", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_HavingAggregate_FieldNumber_Field, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingAggregate__storage_, field), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_HavingAggregate class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_HavingAggregate__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetDocumentsRequest_HavingAggregate_Function_RawValue(GetDocumentsRequest_HavingAggregate *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingAggregate descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingAggregate_FieldNumber_Function]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetDocumentsRequest_HavingAggregate_Function_RawValue(GetDocumentsRequest_HavingAggregate *message, int32_t value) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingAggregate descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingAggregate_FieldNumber_Function]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - Enum GetDocumentsRequest_HavingAggregate_Function + +GPBEnumDescriptor *GetDocumentsRequest_HavingAggregate_Function_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Count\000Sum\000Avg\000"; + static const int32_t values[] = { + GetDocumentsRequest_HavingAggregate_Function_Count, + GetDocumentsRequest_HavingAggregate_Function_Sum, + GetDocumentsRequest_HavingAggregate_Function_Avg, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_HavingAggregate_Function) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetDocumentsRequest_HavingAggregate_Function_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetDocumentsRequest_HavingAggregate_Function_IsValidValue(int32_t value__) { + switch (value__) { + case GetDocumentsRequest_HavingAggregate_Function_Count: + case GetDocumentsRequest_HavingAggregate_Function_Sum: + case GetDocumentsRequest_HavingAggregate_Function_Avg: + return YES; + default: + return NO; + } +} + +#pragma mark - GetDocumentsRequest_HavingRanking + +@implementation GetDocumentsRequest_HavingRanking + +@dynamic kind; +@dynamic hasN, n; + +typedef struct GetDocumentsRequest_HavingRanking__storage_ { + uint32_t _has_storage_[1]; + GetDocumentsRequest_HavingRanking_Kind kind; + uint64_t n; +} GetDocumentsRequest_HavingRanking__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "kind", + .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_HavingRanking_Kind_EnumDescriptor, + .number = GetDocumentsRequest_HavingRanking_FieldNumber_Kind, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingRanking__storage_, kind), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "n", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_HavingRanking_FieldNumber_N, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingRanking__storage_, n), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_HavingRanking class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_HavingRanking__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetDocumentsRequest_HavingRanking_Kind_RawValue(GetDocumentsRequest_HavingRanking *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingRanking descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingRanking_FieldNumber_Kind]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetDocumentsRequest_HavingRanking_Kind_RawValue(GetDocumentsRequest_HavingRanking *message, int32_t value) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingRanking descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingRanking_FieldNumber_Kind]; + GPBSetMessageRawEnumField(message, field, value); +} + +#pragma mark - Enum GetDocumentsRequest_HavingRanking_Kind + +GPBEnumDescriptor *GetDocumentsRequest_HavingRanking_Kind_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Min\000Max\000Top\000Bottom\000"; + static const int32_t values[] = { + GetDocumentsRequest_HavingRanking_Kind_Min, + GetDocumentsRequest_HavingRanking_Kind_Max, + GetDocumentsRequest_HavingRanking_Kind_Top, + GetDocumentsRequest_HavingRanking_Kind_Bottom, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_HavingRanking_Kind) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetDocumentsRequest_HavingRanking_Kind_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetDocumentsRequest_HavingRanking_Kind_IsValidValue(int32_t value__) { + switch (value__) { + case GetDocumentsRequest_HavingRanking_Kind_Min: + case GetDocumentsRequest_HavingRanking_Kind_Max: + case GetDocumentsRequest_HavingRanking_Kind_Top: + case GetDocumentsRequest_HavingRanking_Kind_Bottom: + return YES; + default: + return NO; + } +} + +#pragma mark - GetDocumentsRequest_HavingClause + +@implementation GetDocumentsRequest_HavingClause + +@dynamic rightOneOfCase; +@dynamic hasAggregate, aggregate; +@dynamic operator_p; +@dynamic value; +@dynamic ranking; + +typedef struct GetDocumentsRequest_HavingClause__storage_ { + uint32_t _has_storage_[2]; + GetDocumentsRequest_HavingClause_Operator operator_p; + GetDocumentsRequest_HavingAggregate *aggregate; + GetDocumentsRequest_DocumentFieldValue *value; + GetDocumentsRequest_HavingRanking *ranking; +} GetDocumentsRequest_HavingClause__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "aggregate", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_HavingAggregate), + .number = GetDocumentsRequest_HavingClause_FieldNumber_Aggregate, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingClause__storage_, aggregate), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "operator_p", + .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_HavingClause_Operator_EnumDescriptor, + .number = GetDocumentsRequest_HavingClause_FieldNumber_Operator_p, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingClause__storage_, operator_p), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "value", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_DocumentFieldValue), + .number = GetDocumentsRequest_HavingClause_FieldNumber_Value, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingClause__storage_, value), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "ranking", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_HavingRanking), + .number = GetDocumentsRequest_HavingClause_FieldNumber_Ranking, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_HavingClause__storage_, ranking), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_HavingClause class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_HavingClause__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "right", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetDocumentsRequest_HavingClause_Operator_p_RawValue(GetDocumentsRequest_HavingClause *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingClause descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingClause_FieldNumber_Operator_p]; + return GPBGetMessageRawEnumField(message, field); +} + +void SetGetDocumentsRequest_HavingClause_Operator_p_RawValue(GetDocumentsRequest_HavingClause *message, int32_t value) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingClause descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_HavingClause_FieldNumber_Operator_p]; + GPBSetMessageRawEnumField(message, field, value); +} + +void GetDocumentsRequest_HavingClause_ClearRightOneOfCase(GetDocumentsRequest_HavingClause *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_HavingClause descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - Enum GetDocumentsRequest_HavingClause_Operator + +GPBEnumDescriptor *GetDocumentsRequest_HavingClause_Operator_EnumDescriptor(void) { + static _Atomic(GPBEnumDescriptor*) descriptor = nil; + if (!descriptor) { + static const char *valueNames = + "Equal\000NotEqual\000GreaterThan\000GreaterThanOr" + "Equals\000LessThan\000LessThanOrEquals\000Between" + "\000BetweenExcludeBounds\000BetweenExcludeLeft" + "\000BetweenExcludeRight\000In\000"; + static const int32_t values[] = { + GetDocumentsRequest_HavingClause_Operator_Equal, + GetDocumentsRequest_HavingClause_Operator_NotEqual, + GetDocumentsRequest_HavingClause_Operator_GreaterThan, + GetDocumentsRequest_HavingClause_Operator_GreaterThanOrEquals, + GetDocumentsRequest_HavingClause_Operator_LessThan, + GetDocumentsRequest_HavingClause_Operator_LessThanOrEquals, + GetDocumentsRequest_HavingClause_Operator_Between, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeBounds, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeLeft, + GetDocumentsRequest_HavingClause_Operator_BetweenExcludeRight, + GetDocumentsRequest_HavingClause_Operator_In, + }; + GPBEnumDescriptor *worker = + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_HavingClause_Operator) + valueNames:valueNames + values:values + count:(uint32_t)(sizeof(values) / sizeof(int32_t)) + enumVerifier:GetDocumentsRequest_HavingClause_Operator_IsValidValue]; + GPBEnumDescriptor *expected = nil; + if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { + [worker release]; + } + } + return descriptor; +} + +BOOL GetDocumentsRequest_HavingClause_Operator_IsValidValue(int32_t value__) { + switch (value__) { + case GetDocumentsRequest_HavingClause_Operator_Equal: + case GetDocumentsRequest_HavingClause_Operator_NotEqual: + case GetDocumentsRequest_HavingClause_Operator_GreaterThan: + case GetDocumentsRequest_HavingClause_Operator_GreaterThanOrEquals: + case GetDocumentsRequest_HavingClause_Operator_LessThan: + case GetDocumentsRequest_HavingClause_Operator_LessThanOrEquals: + case GetDocumentsRequest_HavingClause_Operator_Between: + case GetDocumentsRequest_HavingClause_Operator_BetweenExcludeBounds: + case GetDocumentsRequest_HavingClause_Operator_BetweenExcludeLeft: + case GetDocumentsRequest_HavingClause_Operator_BetweenExcludeRight: + case GetDocumentsRequest_HavingClause_Operator_In: + return YES; + default: + return NO; + } +} + +#pragma mark - GetDocumentsRequest_OrderClause + +@implementation GetDocumentsRequest_OrderClause + +@dynamic targetOneOfCase; +@dynamic field; +@dynamic aggregate; +@dynamic ascending; + +typedef struct GetDocumentsRequest_OrderClause__storage_ { + uint32_t _has_storage_[2]; + NSString *field; + GetDocumentsRequest_HavingAggregate *aggregate; +} GetDocumentsRequest_OrderClause__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "field", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_OrderClause_FieldNumber_Field, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_OrderClause__storage_, field), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeString, + }, + { + .name = "ascending", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_OrderClause_FieldNumber_Ascending, + .hasIndex = 0, + .offset = 1, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + { + .name = "aggregate", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_HavingAggregate), + .number = GetDocumentsRequest_OrderClause_FieldNumber_Aggregate, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_OrderClause__storage_, aggregate), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_OrderClause class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_OrderClause__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "target", + }; + [localDescriptor setupOneofs:oneofs + count:(uint32_t)(sizeof(oneofs) / sizeof(char*)) + firstHasIndex:-1]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetDocumentsRequest_OrderClause_ClearTargetOneOfCase(GetDocumentsRequest_OrderClause *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_OrderClause descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} #pragma mark - GetDocumentsRequest_GetDocumentsRequestV0 @implementation GetDocumentsRequest_GetDocumentsRequestV0 @@ -5281,28 +6056,30 @@ @implementation GetDocumentsRequest_GetDocumentsRequestV1 @dynamic startOneOfCase; @dynamic dataContractId; @dynamic documentType; -@dynamic where; -@dynamic orderBy; +@dynamic whereClausesArray, whereClausesArray_Count; +@dynamic orderByArray, orderByArray_Count; @dynamic hasLimit, limit; @dynamic startAfter; @dynamic startAt; @dynamic prove; -@dynamic select; +@dynamic selectsArray, selectsArray_Count; @dynamic groupByArray, groupByArray_Count; -@dynamic having; +@dynamic havingArray, havingArray_Count; +@dynamic hasOffset, offset; typedef struct GetDocumentsRequest_GetDocumentsRequestV1__storage_ { uint32_t _has_storage_[2]; uint32_t limit; - GetDocumentsRequest_GetDocumentsRequestV1_Select select; + uint32_t offset; NSData *dataContractId; NSString *documentType; - NSData *where; - NSData *orderBy; + NSMutableArray *whereClausesArray; + NSMutableArray *orderByArray; NSData *startAfter; NSData *startAt; + NSMutableArray *selectsArray; NSMutableArray *groupByArray; - NSData *having; + NSMutableArray *havingArray; } GetDocumentsRequest_GetDocumentsRequestV1__storage_; // This method is threadsafe because it is initially called @@ -5330,28 +6107,28 @@ + (GPBDescriptor *)descriptor { .dataType = GPBDataTypeString, }, { - .name = "where", - .dataTypeSpecific.clazz = Nil, - .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Where, - .hasIndex = 2, - .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, where), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), - .dataType = GPBDataTypeBytes, + .name = "whereClausesArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_WhereClause), + .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_WhereClausesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, whereClausesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, }, { - .name = "orderBy", - .dataTypeSpecific.clazz = Nil, - .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_OrderBy, - .hasIndex = 3, - .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, orderBy), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), - .dataType = GPBDataTypeBytes, + .name = "orderByArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_OrderClause), + .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_OrderByArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, orderByArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, }, { .name = "limit", .dataTypeSpecific.clazz = Nil, .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Limit, - .hasIndex = 4, + .hasIndex = 2, .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, limit), .flags = GPBFieldOptional, .dataType = GPBDataTypeUInt32, @@ -5378,19 +6155,19 @@ + (GPBDescriptor *)descriptor { .name = "prove", .dataTypeSpecific.clazz = Nil, .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Prove, - .hasIndex = 5, - .offset = 6, // Stored in _has_storage_ to save space. + .hasIndex = 3, + .offset = 4, // Stored in _has_storage_ to save space. .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), .dataType = GPBDataTypeBool, }, { - .name = "select", - .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_GetDocumentsRequestV1_Select_EnumDescriptor, - .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Select, - .hasIndex = 7, - .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, select), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), - .dataType = GPBDataTypeEnum, + .name = "selectsArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_GetDocumentsRequestV1_Select), + .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_SelectsArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, selectsArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, }, { .name = "groupByArray", @@ -5402,13 +6179,22 @@ + (GPBDescriptor *)descriptor { .dataType = GPBDataTypeString, }, { - .name = "having", + .name = "havingArray", + .dataTypeSpecific.clazz = GPBObjCClass(GetDocumentsRequest_HavingClause), + .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_HavingArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, havingArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + { + .name = "offset", .dataTypeSpecific.clazz = Nil, - .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Having, - .hasIndex = 8, - .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, having), - .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), - .dataType = GPBDataTypeBytes, + .number = GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Offset, + .hasIndex = 5, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1__storage_, offset), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt32, }, }; GPBDescriptor *localDescriptor = @@ -5436,40 +6222,101 @@ + (GPBDescriptor *)descriptor { @end -int32_t GetDocumentsRequest_GetDocumentsRequestV1_Select_RawValue(GetDocumentsRequest_GetDocumentsRequestV1 *message) { +void GetDocumentsRequest_GetDocumentsRequestV1_ClearStartOneOfCase(GetDocumentsRequest_GetDocumentsRequestV1 *message) { GPBDescriptor *descriptor = [GetDocumentsRequest_GetDocumentsRequestV1 descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Select]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetDocumentsRequest_GetDocumentsRequestV1_Select + +@implementation GetDocumentsRequest_GetDocumentsRequestV1_Select + +@dynamic function; +@dynamic field; + +typedef struct GetDocumentsRequest_GetDocumentsRequestV1_Select__storage_ { + uint32_t _has_storage_[1]; + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function function; + NSString *field; +} GetDocumentsRequest_GetDocumentsRequestV1_Select__storage_; + +// This method is threadsafe because it is initially called +// in +initialize for each subclass. ++ (GPBDescriptor *)descriptor { + static GPBDescriptor *descriptor = nil; + if (!descriptor) { + static GPBMessageFieldDescription fields[] = { + { + .name = "function", + .dataTypeSpecific.enumDescFunc = GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_EnumDescriptor, + .number = GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Function, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1_Select__storage_, function), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeEnum, + }, + { + .name = "field", + .dataTypeSpecific.clazz = Nil, + .number = GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Field, + .hasIndex = 1, + .offset = (uint32_t)offsetof(GetDocumentsRequest_GetDocumentsRequestV1_Select__storage_, field), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeString, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetDocumentsRequest_GetDocumentsRequestV1_Select class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetDocumentsRequest_GetDocumentsRequestV1_Select__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetDocumentsRequest_GetDocumentsRequestV1)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +int32_t GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_RawValue(GetDocumentsRequest_GetDocumentsRequestV1_Select *message) { + GPBDescriptor *descriptor = [GetDocumentsRequest_GetDocumentsRequestV1_Select descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Function]; return GPBGetMessageRawEnumField(message, field); } -void SetGetDocumentsRequest_GetDocumentsRequestV1_Select_RawValue(GetDocumentsRequest_GetDocumentsRequestV1 *message, int32_t value) { - GPBDescriptor *descriptor = [GetDocumentsRequest_GetDocumentsRequestV1 descriptor]; - GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_GetDocumentsRequestV1_FieldNumber_Select]; +void SetGetDocumentsRequest_GetDocumentsRequestV1_Select_Function_RawValue(GetDocumentsRequest_GetDocumentsRequestV1_Select *message, int32_t value) { + GPBDescriptor *descriptor = [GetDocumentsRequest_GetDocumentsRequestV1_Select descriptor]; + GPBFieldDescriptor *field = [descriptor fieldWithNumber:GetDocumentsRequest_GetDocumentsRequestV1_Select_FieldNumber_Function]; GPBSetMessageRawEnumField(message, field, value); } -void GetDocumentsRequest_GetDocumentsRequestV1_ClearStartOneOfCase(GetDocumentsRequest_GetDocumentsRequestV1 *message) { - GPBDescriptor *descriptor = [GetDocumentsRequest_GetDocumentsRequestV1 descriptor]; - GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; - GPBClearOneof(message, oneof); -} -#pragma mark - Enum GetDocumentsRequest_GetDocumentsRequestV1_Select +#pragma mark - Enum GetDocumentsRequest_GetDocumentsRequestV1_Select_Function -GPBEnumDescriptor *GetDocumentsRequest_GetDocumentsRequestV1_Select_EnumDescriptor(void) { +GPBEnumDescriptor *GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_EnumDescriptor(void) { static _Atomic(GPBEnumDescriptor*) descriptor = nil; if (!descriptor) { static const char *valueNames = - "Documents\000Count\000"; + "Documents\000Count\000Sum\000Avg\000Min\000Max\000"; static const int32_t values[] = { - GetDocumentsRequest_GetDocumentsRequestV1_Select_Documents, - GetDocumentsRequest_GetDocumentsRequestV1_Select_Count, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Documents, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Count, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Sum, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Avg, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Min, + GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Max, }; GPBEnumDescriptor *worker = - [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_GetDocumentsRequestV1_Select) + [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GetDocumentsRequest_GetDocumentsRequestV1_Select_Function) valueNames:valueNames values:values count:(uint32_t)(sizeof(values) / sizeof(int32_t)) - enumVerifier:GetDocumentsRequest_GetDocumentsRequestV1_Select_IsValidValue]; + enumVerifier:GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_IsValidValue]; GPBEnumDescriptor *expected = nil; if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) { [worker release]; @@ -5478,10 +6325,14 @@ void GetDocumentsRequest_GetDocumentsRequestV1_ClearStartOneOfCase(GetDocumentsR return descriptor; } -BOOL GetDocumentsRequest_GetDocumentsRequestV1_Select_IsValidValue(int32_t value__) { +BOOL GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_IsValidValue(int32_t value__) { switch (value__) { - case GetDocumentsRequest_GetDocumentsRequestV1_Select_Documents: - case GetDocumentsRequest_GetDocumentsRequestV1_Select_Count: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Documents: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Count: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Sum: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Avg: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Min: + case GetDocumentsRequest_GetDocumentsRequestV1_Select_Function_Max: return YES; default: return NO; diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h index d1ea38a97c9..113d8bdbf33 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.h @@ -232,13 +232,6 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - */ - (GRPCUnaryProtoCall *)getIdentityByPublicKeyHashWithMessage:(GetIdentityByPublicKeyHashRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; #pragma mark getIdentityByNonUniquePublicKeyHash(GetIdentityByNonUniquePublicKeyHashRequest) returns (GetIdentityByNonUniquePublicKeyHashResponse) @@ -568,26 +561,8 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - * - * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended. - */ - (void)getIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler; -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - * - * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended. - */ - (GRPCProtoCall *)RPCTogetIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler; diff --git a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m index 9869906e900..cb8f4ecbc61 100644 --- a/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m +++ b/packages/dapi-grpc/clients/platform/v0/objective-c/Platform.pbrpc.m @@ -385,41 +385,16 @@ - (GRPCUnaryProtoCall *)getDocumentsWithMessage:(GetDocumentsRequest *)message r #pragma mark getIdentityByPublicKeyHash(GetIdentityByPublicKeyHashRequest) returns (GetIdentityByPublicKeyHashResponse) -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - * - * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended. - */ - (void)getIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler{ [[self RPCTogetIdentityByPublicKeyHashWithRequest:request handler:handler] start]; } // Returns a not-yet-started RPC object. -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - * - * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended. - */ - (GRPCProtoCall *)RPCTogetIdentityByPublicKeyHashWithRequest:(GetIdentityByPublicKeyHashRequest *)request handler:(void(^)(GetIdentityByPublicKeyHashResponse *_Nullable response, NSError *_Nullable error))handler{ return [self RPCToMethod:@"getIdentityByPublicKeyHash" requestsWriter:[GRXWriter writerWithValue:request] responseClass:[GetIdentityByPublicKeyHashResponse class] responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; } -/** - * `getDocumentsCount` removed in v1: callers express counts via - * `getDocuments` with `version.v1.select = COUNT` (optionally - * with `group_by`). See `GetDocumentsRequestV1` for the unified - * SQL-shaped surface. The v0-count endpoint shipped briefly in - * #3623 and never had stable callers; v1 supersedes it entirely. - */ - (GRPCUnaryProtoCall *)getIdentityByPublicKeyHashWithMessage:(GetIdentityByPublicKeyHashRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { return [self RPCToMethod:@"getIdentityByPublicKeyHash" message:message diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py index 2d58d18e9fc..f47628b892b 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xf6\x05\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x12R\n\x02v1\x18\x02 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05start\x1a\xed\x02\n\x15GetDocumentsRequestV1\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\x12\n\x05limit\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x12[\n\x06select\x18\t \x01(\x0e\x32K.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select\x12\x10\n\x08group_by\x18\n \x03(\t\x12\x0e\n\x06having\x18\x0b \x01(\x0c\"\"\n\x06Select\x12\r\n\tDOCUMENTS\x10\x00\x12\t\n\x05\x43OUNT\x10\x01\x42\x07\n\x05startB\x08\n\x06_limitB\t\n\x07version\"\xd2\n\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x12T\n\x02v1\x18\x02 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06result\x1a\xe4\x06\n\x16GetDocumentsResponseV1\x12\x61\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.ResultDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x1aL\n\nCountEntry\x12\x13\n\x06in_key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x03 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07_in_key\x1ar\n\x0c\x43ountEntries\x12\x62\n\x07\x65ntries\x18\x01 \x03(\x0b\x32Q.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountEntry\x1a\xa0\x01\n\x0c\x43ountResults\x12\x1d\n\x0f\x61ggregate_count\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x66\n\x07\x65ntries\x18\x02 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountEntriesH\x00\x42\t\n\x07variant\x1a\xe5\x01\n\nResultData\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.DocumentsH\x00\x12\x65\n\x06\x63ounts\x18\x02 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountResultsH\x00\x42\t\n\x07variantB\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"m\n\x14\x41\x64\x64ressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_balance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1c\n\x0e\x61\x64\x64_to_balance\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x42\x0b\n\toperation\"x\n\x1a\x42lockAddressBalanceChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x02 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"k\n\x1b\x41\x64\x64ressBalanceUpdateEntries\x12L\n\rblock_changes\x18\x01 \x03(\x0b\x32\x35.org.dash.platform.dapi.v0.BlockAddressBalanceChanges\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf0\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1aY\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x03 \x01(\x04\x42\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"\x9e\x02\n%GetRecentAddressBalanceChangesRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0H\x00\x1ar\n\'GetRecentAddressBalanceChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x12\x1e\n\x16start_height_exclusive\x18\x03 \x01(\x08\x42\t\n\x07version\"\xb8\x03\n&GetRecentAddressBalanceChangesResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0H\x00\x1a\x88\x02\n(GetRecentAddressBalanceChangesResponseV0\x12`\n\x1e\x61\x64\x64ress_balance_update_entries\x18\x01 \x01(\x0b\x32\x36.org.dash.platform.dapi.v0.AddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"G\n\x16\x42lockHeightCreditEntry\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x13\n\x07\x63redits\x18\x02 \x01(\x04\x42\x02\x30\x01\"\xb0\x01\n\x1d\x43ompactedAddressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_credits\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12V\n\x19\x61\x64\x64_to_credits_operations\x18\x03 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.AddToCreditsOperationsH\x00\x42\x0b\n\toperation\"\\\n\x16\x41\x64\x64ToCreditsOperations\x12\x42\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x31.org.dash.platform.dapi.v0.BlockHeightCreditEntry\"\xae\x01\n#CompactedBlockAddressBalanceChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12I\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x38.org.dash.platform.dapi.v0.CompactedAddressBalanceChange\"\x87\x01\n$CompactedAddressBalanceUpdateEntries\x12_\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32>.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges\"\xa9\x02\n.GetRecentCompactedAddressBalanceChangesRequest\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0H\x00\x1a\x61\n0GetRecentCompactedAddressBalanceChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf0\x03\n/GetRecentCompactedAddressBalanceChangesResponse\x12\x8a\x01\n\x02v0\x18\x01 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0H\x00\x1a\xa4\x02\n1GetRecentCompactedAddressBalanceChangesResponseV0\x12s\n(compacted_address_balance_update_entries\x18\x01 \x01(\x0b\x32?.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xf4\x01\n GetShieldedEncryptedNotesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest.GetShieldedEncryptedNotesRequestV0H\x00\x1aW\n\"GetShieldedEncryptedNotesRequestV0\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xac\x05\n!GetShieldedEncryptedNotesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0H\x00\x1a\x8b\x04\n#GetShieldedEncryptedNotesResponseV0\x12\x8a\x01\n\x0f\x65ncrypted_notes\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\rEncryptedNote\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x0b\n\x03\x63mx\x18\x02 \x01(\x0c\x12\x16\n\x0e\x65ncrypted_note\x18\x03 \x01(\x0c\x1a\x91\x01\n\x0e\x45ncryptedNotes\x12\x7f\n\x07\x65ntries\x18\x01 \x03(\x0b\x32n.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNoteB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x19GetShieldedAnchorsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest.GetShieldedAnchorsRequestV0H\x00\x1a,\n\x1bGetShieldedAnchorsRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb1\x03\n\x1aGetShieldedAnchorsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0H\x00\x1a\xa5\x02\n\x1cGetShieldedAnchorsResponseV0\x12m\n\x07\x61nchors\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0.AnchorsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x07\x41nchors\x12\x0f\n\x07\x61nchors\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd8\x01\n\"GetMostRecentShieldedAnchorRequest\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest.GetMostRecentShieldedAnchorRequestV0H\x00\x1a\x35\n$GetMostRecentShieldedAnchorRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xdc\x02\n#GetMostRecentShieldedAnchorResponse\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse.GetMostRecentShieldedAnchorResponseV0H\x00\x1a\xb5\x01\n%GetMostRecentShieldedAnchorResponseV0\x12\x10\n\x06\x61nchor\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x01\n\x1bGetShieldedPoolStateRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest.GetShieldedPoolStateRequestV0H\x00\x1a.\n\x1dGetShieldedPoolStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xcb\x02\n\x1cGetShieldedPoolStateResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse.GetShieldedPoolStateResponseV0H\x00\x1a\xb9\x01\n\x1eGetShieldedPoolStateResponseV0\x12\x1b\n\rtotal_balance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd4\x01\n\x1cGetShieldedNullifiersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest.GetShieldedNullifiersRequestV0H\x00\x1a\x43\n\x1eGetShieldedNullifiersRequestV0\x12\x12\n\nnullifiers\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x86\x05\n\x1dGetShieldedNullifiersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0H\x00\x1a\xf1\x03\n\x1fGetShieldedNullifiersResponseV0\x12\x88\x01\n\x12nullifier_statuses\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x0fNullifierStatus\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x10\n\x08is_spent\x18\x02 \x01(\x08\x1a\x8e\x01\n\x11NullifierStatuses\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusB\x08\n\x06resultB\t\n\x07version\"\xe5\x01\n\x1eGetNullifiersTrunkStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest.GetNullifiersTrunkStateRequestV0H\x00\x1aN\n GetNullifiersTrunkStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x42\t\n\x07version\"\xae\x02\n\x1fGetNullifiersTrunkStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse.GetNullifiersTrunkStateResponseV0H\x00\x1a\x93\x01\n!GetNullifiersTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xa1\x02\n\x1fGetNullifiersBranchStateRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest.GetNullifiersBranchStateRequestV0H\x00\x1a\x86\x01\n!GetNullifiersBranchStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x05 \x01(\x04\x42\t\n\x07version\"\xd5\x01\n GetNullifiersBranchStateResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse.GetNullifiersBranchStateResponseV0H\x00\x1a\x38\n\"GetNullifiersBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"E\n\x15\x42lockNullifierChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x02 \x03(\x0c\"a\n\x16NullifierUpdateEntries\x12G\n\rblock_changes\x18\x01 \x03(\x0b\x32\x30.org.dash.platform.dapi.v0.BlockNullifierChanges\"\xea\x01\n GetRecentNullifierChangesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest.GetRecentNullifierChangesRequestV0H\x00\x1aM\n\"GetRecentNullifierChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n!GetRecentNullifierChangesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse.GetRecentNullifierChangesResponseV0H\x00\x1a\xf8\x01\n#GetRecentNullifierChangesResponseV0\x12U\n\x18nullifier_update_entries\x18\x01 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.NullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"r\n\x1e\x43ompactedBlockNullifierChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x03 \x03(\x0c\"}\n\x1f\x43ompactedNullifierUpdateEntries\x12Z\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32\x39.org.dash.platform.dapi.v0.CompactedBlockNullifierChanges\"\x94\x02\n)GetRecentCompactedNullifierChangesRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest.GetRecentCompactedNullifierChangesRequestV0H\x00\x1a\\\n+GetRecentCompactedNullifierChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xd1\x03\n*GetRecentCompactedNullifierChangesResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponse.GetRecentCompactedNullifierChangesResponseV0H\x00\x1a\x94\x02\n,GetRecentCompactedNullifierChangesResponseV0\x12h\n\"compacted_nullifier_update_entries\x18\x01 \x01(\x0b\x32:.org.dash.platform.dapi.v0.CompactedNullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\xb3G\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse\x12\xa5\x01\n\x1egetRecentAddressBalanceChanges\x12@.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest\x1a\x41.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse\x12\xc0\x01\n\'getRecentCompactedAddressBalanceChanges\x12I.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest\x1aJ.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse\x12\x96\x01\n\x19getShieldedEncryptedNotes\x12;.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest\x1a<.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse\x12\x81\x01\n\x12getShieldedAnchors\x12\x34.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest\x1a\x35.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse\x12\x9c\x01\n\x1bgetMostRecentShieldedAnchor\x12=.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest\x1a>.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse\x12\x87\x01\n\x14getShieldedPoolState\x12\x36.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest\x1a\x37.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse\x12\x8a\x01\n\x15getShieldedNullifiers\x12\x37.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest\x1a\x38.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse\x12\x90\x01\n\x17getNullifiersTrunkState\x12\x39.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest\x1a:.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse\x12\x93\x01\n\x18getNullifiersBranchState\x12:.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest\x1a;.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse\x12\x96\x01\n\x19getRecentNullifierChanges\x12;.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest\x1a<.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse\x12\xb1\x01\n\"getRecentCompactedNullifierChanges\x12\x44.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest\x1a\x45.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponseb\x06proto3' + serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xdb\x17\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x12R\n\x02v1\x18\x02 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1H\x00\x1a\xfe\x02\n\x12\x44ocumentFieldValue\x12\x14\n\nbool_value\x18\x01 \x01(\x08H\x00\x12\x19\n\x0bint64_value\x18\x02 \x01(\x12\x42\x02\x30\x01H\x00\x12\x1a\n\x0cuint64_value\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x12\x16\n\x0c\x64ouble_value\x18\x04 \x01(\x01H\x00\x12\x0e\n\x04text\x18\x05 \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x06 \x01(\x0cH\x00\x12[\n\x04list\x18\x07 \x01(\x0b\x32K.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueListH\x00\x12\x14\n\nnull_value\x18\x08 \x01(\x08H\x00\x1a^\n\tValueList\x12Q\n\x06values\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValueB\t\n\x07variant\x1a\xbe\x01\n\x0bWhereClause\x12\r\n\x05\x66ield\x18\x01 \x01(\t\x12N\n\x08operator\x18\x02 \x01(\x0e\x32<.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator\x12P\n\x05value\x18\x03 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue\x1a\xa4\x01\n\x0fHavingAggregate\x12Y\n\x08\x66unction\x18\x01 \x01(\x0e\x32G.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function\x12\r\n\x05\x66ield\x18\x02 \x01(\t\"\'\n\x08\x46unction\x12\t\n\x05\x43OUNT\x10\x00\x12\x07\n\x03SUM\x10\x01\x12\x07\n\x03\x41VG\x10\x02\x1a\xa9\x01\n\rHavingRanking\x12O\n\x04kind\x18\x01 \x01(\x0e\x32\x41.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind\x12\x12\n\x01n\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\"-\n\x04Kind\x12\x07\n\x03MIN\x10\x00\x12\x07\n\x03MAX\x10\x01\x12\x07\n\x03TOP\x10\x02\x12\n\n\x06\x42OTTOM\x10\x03\x42\x04\n\x02_n\x1a\xca\x04\n\x0cHavingClause\x12Q\n\taggregate\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate\x12V\n\x08operator\x18\x02 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator\x12R\n\x05value\x18\x03 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValueH\x00\x12O\n\x07ranking\x18\x04 \x01(\x0b\x32<.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRankingH\x00\"\xe0\x01\n\x08Operator\x12\t\n\x05\x45QUAL\x10\x00\x12\r\n\tNOT_EQUAL\x10\x01\x12\x10\n\x0cGREATER_THAN\x10\x02\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x03\x12\r\n\tLESS_THAN\x10\x04\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x05\x12\x0b\n\x07\x42\x45TWEEN\x10\x06\x12\x1a\n\x16\x42\x45TWEEN_EXCLUDE_BOUNDS\x10\x07\x12\x18\n\x14\x42\x45TWEEN_EXCLUDE_LEFT\x10\x08\x12\x19\n\x15\x42\x45TWEEN_EXCLUDE_RIGHT\x10\t\x12\x06\n\x02IN\x10\nB\x07\n\x05right\x1a\x90\x01\n\x0bOrderClause\x12\x0f\n\x05\x66ield\x18\x01 \x01(\tH\x00\x12S\n\taggregate\x18\x03 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregateH\x00\x12\x11\n\tascending\x18\x02 \x01(\x08\x42\x08\n\x06target\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05start\x1a\xf3\x05\n\x15GetDocumentsRequestV1\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12Q\n\rwhere_clauses\x18\x03 \x03(\x0b\x32:.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause\x12L\n\x08order_by\x18\x04 \x03(\x0b\x32:.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause\x12\x12\n\x05limit\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x12\\\n\x07selects\x18\t \x03(\x0b\x32K.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select\x12\x10\n\x08group_by\x18\n \x03(\t\x12K\n\x06having\x18\x0b \x03(\x0b\x32;.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause\x12\x13\n\x06offset\x18\x0c \x01(\rH\x02\x88\x01\x01\x1a\xc9\x01\n\x06Select\x12\x66\n\x08\x66unction\x18\x01 \x01(\x0e\x32T.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function\x12\r\n\x05\x66ield\x18\x02 \x01(\t\"H\n\x08\x46unction\x12\r\n\tDOCUMENTS\x10\x00\x12\t\n\x05\x43OUNT\x10\x01\x12\x07\n\x03SUM\x10\x02\x12\x07\n\x03\x41VG\x10\x03\x12\x07\n\x03MIN\x10\x04\x12\x07\n\x03MAX\x10\x05\x42\x07\n\x05startB\x08\n\x06_limitB\t\n\x07_offset\"\xe7\x01\n\rWhereOperator\x12\t\n\x05\x45QUAL\x10\x00\x12\x10\n\x0cGREATER_THAN\x10\x01\x12\x1a\n\x16GREATER_THAN_OR_EQUALS\x10\x02\x12\r\n\tLESS_THAN\x10\x03\x12\x17\n\x13LESS_THAN_OR_EQUALS\x10\x04\x12\x0b\n\x07\x42\x45TWEEN\x10\x05\x12\x1a\n\x16\x42\x45TWEEN_EXCLUDE_BOUNDS\x10\x06\x12\x18\n\x14\x42\x45TWEEN_EXCLUDE_LEFT\x10\x07\x12\x19\n\x15\x42\x45TWEEN_EXCLUDE_RIGHT\x10\x08\x12\x06\n\x02IN\x10\t\x12\x0f\n\x0bSTARTS_WITH\x10\nB\t\n\x07version\"\xd2\n\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x12T\n\x02v1\x18\x02 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06result\x1a\xe4\x06\n\x16GetDocumentsResponseV1\x12\x61\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.ResultDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x1aL\n\nCountEntry\x12\x13\n\x06in_key\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x03 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07_in_key\x1ar\n\x0c\x43ountEntries\x12\x62\n\x07\x65ntries\x18\x01 \x03(\x0b\x32Q.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountEntry\x1a\xa0\x01\n\x0c\x43ountResults\x12\x1d\n\x0f\x61ggregate_count\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x66\n\x07\x65ntries\x18\x02 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountEntriesH\x00\x42\t\n\x07variant\x1a\xe5\x01\n\nResultData\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.DocumentsH\x00\x12\x65\n\x06\x63ounts\x18\x02 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV1.CountResultsH\x00\x42\t\n\x07variantB\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"m\n\x14\x41\x64\x64ressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_balance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1c\n\x0e\x61\x64\x64_to_balance\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x42\x0b\n\toperation\"x\n\x1a\x42lockAddressBalanceChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x02 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"k\n\x1b\x41\x64\x64ressBalanceUpdateEntries\x12L\n\rblock_changes\x18\x01 \x03(\x0b\x32\x35.org.dash.platform.dapi.v0.BlockAddressBalanceChanges\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf0\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1aY\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x03 \x01(\x04\x42\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"\x9e\x02\n%GetRecentAddressBalanceChangesRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0H\x00\x1ar\n\'GetRecentAddressBalanceChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x12\x1e\n\x16start_height_exclusive\x18\x03 \x01(\x08\x42\t\n\x07version\"\xb8\x03\n&GetRecentAddressBalanceChangesResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0H\x00\x1a\x88\x02\n(GetRecentAddressBalanceChangesResponseV0\x12`\n\x1e\x61\x64\x64ress_balance_update_entries\x18\x01 \x01(\x0b\x32\x36.org.dash.platform.dapi.v0.AddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"G\n\x16\x42lockHeightCreditEntry\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x13\n\x07\x63redits\x18\x02 \x01(\x04\x42\x02\x30\x01\"\xb0\x01\n\x1d\x43ompactedAddressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_credits\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12V\n\x19\x61\x64\x64_to_credits_operations\x18\x03 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.AddToCreditsOperationsH\x00\x42\x0b\n\toperation\"\\\n\x16\x41\x64\x64ToCreditsOperations\x12\x42\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x31.org.dash.platform.dapi.v0.BlockHeightCreditEntry\"\xae\x01\n#CompactedBlockAddressBalanceChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12I\n\x07\x63hanges\x18\x03 \x03(\x0b\x32\x38.org.dash.platform.dapi.v0.CompactedAddressBalanceChange\"\x87\x01\n$CompactedAddressBalanceUpdateEntries\x12_\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32>.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges\"\xa9\x02\n.GetRecentCompactedAddressBalanceChangesRequest\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0H\x00\x1a\x61\n0GetRecentCompactedAddressBalanceChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf0\x03\n/GetRecentCompactedAddressBalanceChangesResponse\x12\x8a\x01\n\x02v0\x18\x01 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0H\x00\x1a\xa4\x02\n1GetRecentCompactedAddressBalanceChangesResponseV0\x12s\n(compacted_address_balance_update_entries\x18\x01 \x01(\x0b\x32?.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xf4\x01\n GetShieldedEncryptedNotesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest.GetShieldedEncryptedNotesRequestV0H\x00\x1aW\n\"GetShieldedEncryptedNotesRequestV0\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xac\x05\n!GetShieldedEncryptedNotesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0H\x00\x1a\x8b\x04\n#GetShieldedEncryptedNotesResponseV0\x12\x8a\x01\n\x0f\x65ncrypted_notes\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\rEncryptedNote\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x0b\n\x03\x63mx\x18\x02 \x01(\x0c\x12\x16\n\x0e\x65ncrypted_note\x18\x03 \x01(\x0c\x1a\x91\x01\n\x0e\x45ncryptedNotes\x12\x7f\n\x07\x65ntries\x18\x01 \x03(\x0b\x32n.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse.GetShieldedEncryptedNotesResponseV0.EncryptedNoteB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x19GetShieldedAnchorsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest.GetShieldedAnchorsRequestV0H\x00\x1a,\n\x1bGetShieldedAnchorsRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb1\x03\n\x1aGetShieldedAnchorsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0H\x00\x1a\xa5\x02\n\x1cGetShieldedAnchorsResponseV0\x12m\n\x07\x61nchors\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse.GetShieldedAnchorsResponseV0.AnchorsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x07\x41nchors\x12\x0f\n\x07\x61nchors\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd8\x01\n\"GetMostRecentShieldedAnchorRequest\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest.GetMostRecentShieldedAnchorRequestV0H\x00\x1a\x35\n$GetMostRecentShieldedAnchorRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xdc\x02\n#GetMostRecentShieldedAnchorResponse\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse.GetMostRecentShieldedAnchorResponseV0H\x00\x1a\xb5\x01\n%GetMostRecentShieldedAnchorResponseV0\x12\x10\n\x06\x61nchor\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x01\n\x1bGetShieldedPoolStateRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest.GetShieldedPoolStateRequestV0H\x00\x1a.\n\x1dGetShieldedPoolStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xcb\x02\n\x1cGetShieldedPoolStateResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse.GetShieldedPoolStateResponseV0H\x00\x1a\xb9\x01\n\x1eGetShieldedPoolStateResponseV0\x12\x1b\n\rtotal_balance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd4\x01\n\x1cGetShieldedNullifiersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest.GetShieldedNullifiersRequestV0H\x00\x1a\x43\n\x1eGetShieldedNullifiersRequestV0\x12\x12\n\nnullifiers\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x86\x05\n\x1dGetShieldedNullifiersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0H\x00\x1a\xf1\x03\n\x1fGetShieldedNullifiersResponseV0\x12\x88\x01\n\x12nullifier_statuses\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x0fNullifierStatus\x12\x11\n\tnullifier\x18\x01 \x01(\x0c\x12\x10\n\x08is_spent\x18\x02 \x01(\x08\x1a\x8e\x01\n\x11NullifierStatuses\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse.GetShieldedNullifiersResponseV0.NullifierStatusB\x08\n\x06resultB\t\n\x07version\"\xe5\x01\n\x1eGetNullifiersTrunkStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest.GetNullifiersTrunkStateRequestV0H\x00\x1aN\n GetNullifiersTrunkStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x42\t\n\x07version\"\xae\x02\n\x1fGetNullifiersTrunkStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse.GetNullifiersTrunkStateResponseV0H\x00\x1a\x93\x01\n!GetNullifiersTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xa1\x02\n\x1fGetNullifiersBranchStateRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest.GetNullifiersBranchStateRequestV0H\x00\x1a\x86\x01\n!GetNullifiersBranchStateRequestV0\x12\x11\n\tpool_type\x18\x01 \x01(\r\x12\x17\n\x0fpool_identifier\x18\x02 \x01(\x0c\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x04 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x05 \x01(\x04\x42\t\n\x07version\"\xd5\x01\n GetNullifiersBranchStateResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse.GetNullifiersBranchStateResponseV0H\x00\x1a\x38\n\"GetNullifiersBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"E\n\x15\x42lockNullifierChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x02 \x03(\x0c\"a\n\x16NullifierUpdateEntries\x12G\n\rblock_changes\x18\x01 \x03(\x0b\x32\x30.org.dash.platform.dapi.v0.BlockNullifierChanges\"\xea\x01\n GetRecentNullifierChangesRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest.GetRecentNullifierChangesRequestV0H\x00\x1aM\n\"GetRecentNullifierChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n!GetRecentNullifierChangesResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse.GetRecentNullifierChangesResponseV0H\x00\x1a\xf8\x01\n#GetRecentNullifierChangesResponseV0\x12U\n\x18nullifier_update_entries\x18\x01 \x01(\x0b\x32\x31.org.dash.platform.dapi.v0.NullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"r\n\x1e\x43ompactedBlockNullifierChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x12\n\nnullifiers\x18\x03 \x03(\x0c\"}\n\x1f\x43ompactedNullifierUpdateEntries\x12Z\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32\x39.org.dash.platform.dapi.v0.CompactedBlockNullifierChanges\"\x94\x02\n)GetRecentCompactedNullifierChangesRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest.GetRecentCompactedNullifierChangesRequestV0H\x00\x1a\\\n+GetRecentCompactedNullifierChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xd1\x03\n*GetRecentCompactedNullifierChangesResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponse.GetRecentCompactedNullifierChangesResponseV0H\x00\x1a\x94\x02\n,GetRecentCompactedNullifierChangesResponseV0\x12h\n\"compacted_nullifier_update_entries\x18\x01 \x01(\x0b\x32:.org.dash.platform.dapi.v0.CompactedNullifierUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version*Z\n\nKeyPurpose\x12\x12\n\x0e\x41UTHENTICATION\x10\x00\x12\x0e\n\nENCRYPTION\x10\x01\x12\x0e\n\nDECRYPTION\x10\x02\x12\x0c\n\x08TRANSFER\x10\x03\x12\n\n\x06VOTING\x10\x05\x32\xb3G\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse\x12\xa5\x01\n\x1egetRecentAddressBalanceChanges\x12@.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest\x1a\x41.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse\x12\xc0\x01\n\'getRecentCompactedAddressBalanceChanges\x12I.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest\x1aJ.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse\x12\x96\x01\n\x19getShieldedEncryptedNotes\x12;.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesRequest\x1a<.org.dash.platform.dapi.v0.GetShieldedEncryptedNotesResponse\x12\x81\x01\n\x12getShieldedAnchors\x12\x34.org.dash.platform.dapi.v0.GetShieldedAnchorsRequest\x1a\x35.org.dash.platform.dapi.v0.GetShieldedAnchorsResponse\x12\x9c\x01\n\x1bgetMostRecentShieldedAnchor\x12=.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorRequest\x1a>.org.dash.platform.dapi.v0.GetMostRecentShieldedAnchorResponse\x12\x87\x01\n\x14getShieldedPoolState\x12\x36.org.dash.platform.dapi.v0.GetShieldedPoolStateRequest\x1a\x37.org.dash.platform.dapi.v0.GetShieldedPoolStateResponse\x12\x8a\x01\n\x15getShieldedNullifiers\x12\x37.org.dash.platform.dapi.v0.GetShieldedNullifiersRequest\x1a\x38.org.dash.platform.dapi.v0.GetShieldedNullifiersResponse\x12\x90\x01\n\x17getNullifiersTrunkState\x12\x39.org.dash.platform.dapi.v0.GetNullifiersTrunkStateRequest\x1a:.org.dash.platform.dapi.v0.GetNullifiersTrunkStateResponse\x12\x93\x01\n\x18getNullifiersBranchState\x12:.org.dash.platform.dapi.v0.GetNullifiersBranchStateRequest\x1a;.org.dash.platform.dapi.v0.GetNullifiersBranchStateResponse\x12\x96\x01\n\x19getRecentNullifierChanges\x12;.org.dash.platform.dapi.v0.GetRecentNullifierChangesRequest\x1a<.org.dash.platform.dapi.v0.GetRecentNullifierChangesResponse\x12\xb1\x01\n\"getRecentCompactedNullifierChanges\x12\x44.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesRequest\x1a\x45.org.dash.platform.dapi.v0.GetRecentCompactedNullifierChangesResponseb\x06proto3' , dependencies=[google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -62,8 +62,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=63619, - serialized_end=63709, + serialized_start=65896, + serialized_end=65986, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -100,9 +100,144 @@ ) _sym_db.RegisterEnumDescriptor(_SECURITYLEVELMAP_KEYKINDREQUESTTYPE) -_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT = _descriptor.EnumDescriptor( - name='Select', - full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select', +_GETDOCUMENTSREQUEST_HAVINGAGGREGATE_FUNCTION = _descriptor.EnumDescriptor( + name='Function', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='COUNT', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SUM', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AVG', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=11791, + serialized_end=11830, +) +_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_HAVINGAGGREGATE_FUNCTION) + +_GETDOCUMENTSREQUEST_HAVINGRANKING_KIND = _descriptor.EnumDescriptor( + name='Kind', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='MIN', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='TOP', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BOTTOM', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=11951, + serialized_end=11996, +) +_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_HAVINGRANKING_KIND) + +_GETDOCUMENTSREQUEST_HAVINGCLAUSE_OPERATOR = _descriptor.EnumDescriptor( + name='Operator', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='EQUAL', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='NOT_EQUAL', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN_OR_EQUALS', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LESS_THAN', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LESS_THAN_OR_EQUALS', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_BOUNDS', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_LEFT', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_RIGHT', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='IN', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=12358, + serialized_end=12582, +) +_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_HAVINGCLAUSE_OPERATOR) + +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT_FUNCTION = _descriptor.EnumDescriptor( + name='Function', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function', filename=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key, @@ -117,13 +252,103 @@ serialized_options=None, type=None, create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='SUM', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='AVG', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MIN', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='MAX', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=13584, + serialized_end=13656, +) +_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT_FUNCTION) + +_GETDOCUMENTSREQUEST_WHEREOPERATOR = _descriptor.EnumDescriptor( + name='WhereOperator', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='EQUAL', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='GREATER_THAN_OR_EQUALS', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LESS_THAN', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='LESS_THAN_OR_EQUALS', index=4, number=4, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN', index=5, number=5, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_BOUNDS', index=6, number=6, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_LEFT', index=7, number=7, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='BETWEEN_EXCLUDE_RIGHT', index=8, number=8, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='IN', index=9, number=9, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='STARTS_WITH', index=10, number=10, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), ], containing_type=None, serialized_options=None, - serialized_start=11590, - serialized_end=11624, + serialized_start=13689, + serialized_end=13920, ) -_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT) +_sym_db.RegisterEnumDescriptor(_GETDOCUMENTSREQUEST_WHEREOPERATOR) _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_RESULTTYPE = _descriptor.EnumDescriptor( name='ResultType', @@ -150,8 +375,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=24028, - serialized_end=24101, + serialized_start=26305, + serialized_end=26378, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0_RESULTTYPE) @@ -180,8 +405,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=25023, - serialized_end=25102, + serialized_start=27300, + serialized_end=27379, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_FINISHEDVOTEINFO_FINISHEDVOTEOUTCOME) @@ -210,8 +435,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=28731, - serialized_end=28792, + serialized_start=31008, + serialized_end=31069, ) _sym_db.RegisterEnumDescriptor(_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE_VOTECHOICETYPE) @@ -235,8 +460,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=47356, - serialized_end=47394, + serialized_start=49633, + serialized_end=49671, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSREQUEST_ACTIONSTATUS) @@ -260,8 +485,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=48641, - serialized_end=48676, + serialized_start=50918, + serialized_end=50953, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT_ACTIONTYPE) @@ -285,8 +510,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=47356, - serialized_end=47394, + serialized_start=49633, + serialized_end=49671, ) _sym_db.RegisterEnumDescriptor(_GETGROUPACTIONSIGNERSREQUEST_ACTIONSTATUS) @@ -3124,45 +3349,349 @@ ) -_GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0 = _descriptor.Descriptor( - name='GetDataContractHistoryRequestV0', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0', +_GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0 = _descriptor.Descriptor( + name='GetDataContractHistoryRequestV0', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='id', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.id', index=0, + number=1, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='limit', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.limit', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='offset', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.offset', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='start_at_ms', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.start_at_ms', index=3, + number=4, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prove', index=4, + number=5, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10013, + serialized_end=10189, +) + +_GETDATACONTRACTHISTORYREQUEST = _descriptor.Descriptor( + name='GetDataContractHistoryRequest', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=9875, + serialized_end=10200, +) + + +_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY = _descriptor.Descriptor( + name='DataContractHistoryEntry', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='date', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.date', index=0, + number=1, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.value', index=1, + number=2, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10640, + serialized_end=10699, +) + +_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY = _descriptor.Descriptor( + name='DataContractHistory', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data_contract_entries', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.data_contract_entries', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=10702, + serialized_end=10872, +) + +_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0 = _descriptor.Descriptor( + name='GetDataContractHistoryResponseV0', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='data_contract_history', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.data_contract_history', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='proof', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.proof', index=1, + number=2, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='metadata', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY, _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=10344, + serialized_end=10882, +) + +_GETDATACONTRACTHISTORYRESPONSE = _descriptor.Descriptor( + name='GetDataContractHistoryResponse', + full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='v0', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.v0', index=0, + number=1, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=10203, + serialized_end=10893, +) + + +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST = _descriptor.Descriptor( + name='ValueList', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='values', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.values', index=0, + number=1, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=11365, + serialized_end=11459, +) + +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE = _descriptor.Descriptor( + name='DocumentFieldValue', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='id', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.id', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", + name='bool_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.bool_value', index=0, + number=1, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='limit', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.limit', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='int64_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.int64_value', index=1, + number=2, type=18, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='uint64_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.uint64_value', index=2, + number=3, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='double_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.double_value', index=3, + number=4, type=1, cpp_type=5, label=1, + has_default_value=False, default_value=float(0), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='offset', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.offset', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='text', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.text', index=4, + number=5, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='start_at_ms', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.start_at_ms', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, + name='bytes_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.bytes_value', index=5, + number=6, type=12, cpp_type=9, label=1, + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='prove', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0.prove', index=4, - number=5, type=8, cpp_type=7, label=1, + name='list', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.list', index=6, + number=7, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='null_value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.null_value', index=7, + number=8, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -3170,7 +3699,7 @@ ], extensions=[ ], - nested_types=[], + nested_types=[_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST, ], enum_types=[ ], serialized_options=None, @@ -3178,22 +3707,41 @@ syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='variant', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.variant', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=10013, - serialized_end=10189, + serialized_start=11088, + serialized_end=11470, ) -_GETDATACONTRACTHISTORYREQUEST = _descriptor.Descriptor( - name='GetDataContractHistoryRequest', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest', +_GETDOCUMENTSREQUEST_WHERECLAUSE = _descriptor.Descriptor( + name='WhereClause', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='v0', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.v0', index=0, - number=1, type=11, cpp_type=10, label=1, + name='field', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.field', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='operator', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.operator', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.value', index=2, + number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, @@ -3201,7 +3749,7 @@ ], extensions=[ ], - nested_types=[_GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0, ], + nested_types=[], enum_types=[ ], serialized_options=None, @@ -3209,36 +3757,30 @@ syntax='proto3', extension_ranges=[], oneofs=[ - _descriptor.OneofDescriptor( - name='version', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryRequest.version', - index=0, containing_type=None, - create_key=_descriptor._internal_create_key, - fields=[]), ], - serialized_start=9875, - serialized_end=10200, + serialized_start=11473, + serialized_end=11663, ) - -_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY = _descriptor.Descriptor( - name='DataContractHistoryEntry', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry', +_GETDOCUMENTSREQUEST_HAVINGAGGREGATE = _descriptor.Descriptor( + name='HavingAggregate', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='date', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.date', index=0, - number=1, type=4, cpp_type=4, label=1, + name='function', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.function', index=0, + number=1, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, - serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='value', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntry.value', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", + name='field', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.field', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -3247,6 +3789,7 @@ ], nested_types=[], enum_types=[ + _GETDOCUMENTSREQUEST_HAVINGAGGREGATE_FUNCTION, ], serialized_options=None, is_extendable=False, @@ -3254,75 +3797,96 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10640, - serialized_end=10699, + serialized_start=11666, + serialized_end=11830, ) -_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY = _descriptor.Descriptor( - name='DataContractHistory', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory', +_GETDOCUMENTSREQUEST_HAVINGRANKING = _descriptor.Descriptor( + name='HavingRanking', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='data_contract_entries', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistory.data_contract_entries', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], + name='kind', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.kind', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='n', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.n', index=1, + number=2, type=4, cpp_type=4, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _GETDOCUMENTSREQUEST_HAVINGRANKING_KIND, ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ + _descriptor.OneofDescriptor( + name='_n', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking._n', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=10702, - serialized_end=10872, + serialized_start=11833, + serialized_end=12002, ) -_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0 = _descriptor.Descriptor( - name='GetDataContractHistoryResponseV0', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0', +_GETDOCUMENTSREQUEST_HAVINGCLAUSE = _descriptor.Descriptor( + name='HavingClause', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='data_contract_history', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.data_contract_history', index=0, + name='aggregate', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.aggregate', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='proof', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.proof', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, + name='operator', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.operator', index=1, + number=2, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='metadata', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.metadata', index=2, + name='value', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.value', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ranking', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.ranking', index=3, + number=4, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY, _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORY, ], + nested_types=[], enum_types=[ + _GETDOCUMENTSREQUEST_HAVINGCLAUSE_OPERATOR, ], serialized_options=None, is_extendable=False, @@ -3330,34 +3894,48 @@ extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( - name='result', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.result', + name='right', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.right', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10344, - serialized_end=10882, + serialized_start=12005, + serialized_end=12591, ) -_GETDATACONTRACTHISTORYRESPONSE = _descriptor.Descriptor( - name='GetDataContractHistoryResponse', - full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse', +_GETDOCUMENTSREQUEST_ORDERCLAUSE = _descriptor.Descriptor( + name='OrderClause', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( - name='v0', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.v0', index=0, - number=1, type=11, cpp_type=10, label=1, + name='field', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.field', index=0, + number=1, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='aggregate', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.aggregate', index=1, + number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='ascending', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.ascending', index=2, + number=2, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[_GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0, ], + nested_types=[], enum_types=[ ], serialized_options=None, @@ -3366,16 +3944,15 @@ extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( - name='version', full_name='org.dash.platform.dapi.v0.GetDataContractHistoryResponse.version', + name='target', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.target', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=10203, - serialized_end=10893, + serialized_start=12594, + serialized_end=12738, ) - _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0 = _descriptor.Descriptor( name='GetDocumentsRequestV0', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0', @@ -3457,8 +4034,47 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11088, - serialized_end=11275, + serialized_start=12741, + serialized_end=12928, +) + +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT = _descriptor.Descriptor( + name='Select', + full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='function', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.function', index=0, + number=1, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='field', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.field', index=1, + number=2, type=9, cpp_type=9, label=1, + has_default_value=False, default_value=b"".decode('utf-8'), + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT_FUNCTION, + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=13455, + serialized_end=13656, ) _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1 = _descriptor.Descriptor( @@ -3484,16 +4100,16 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='where', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.where', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", + name='where_clauses', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.where_clauses', index=2, + number=3, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='order_by', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.order_by', index=3, - number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", + number=4, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -3526,9 +4142,9 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( - name='select', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.select', index=8, - number=9, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, + name='selects', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.selects', index=8, + number=9, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), @@ -3541,17 +4157,23 @@ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='having', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.having', index=10, - number=11, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=b"", + number=11, type=11, cpp_type=10, label=3, + has_default_value=False, default_value=[], + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='offset', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.offset', index=11, + number=12, type=13, cpp_type=3, label=1, + has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], - nested_types=[], + nested_types=[_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT, ], enum_types=[ - _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT, ], serialized_options=None, is_extendable=False, @@ -3568,9 +4190,14 @@ index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), + _descriptor.OneofDescriptor( + name='_offset', full_name='org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1._offset', + index=2, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), ], - serialized_start=11278, - serialized_end=11643, + serialized_start=12931, + serialized_end=13686, ) _GETDOCUMENTSREQUEST = _descriptor.Descriptor( @@ -3598,8 +4225,9 @@ ], extensions=[ ], - nested_types=[_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0, _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1, ], + nested_types=[_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE, _GETDOCUMENTSREQUEST_WHERECLAUSE, _GETDOCUMENTSREQUEST_HAVINGAGGREGATE, _GETDOCUMENTSREQUEST_HAVINGRANKING, _GETDOCUMENTSREQUEST_HAVINGCLAUSE, _GETDOCUMENTSREQUEST_ORDERCLAUSE, _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0, _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1, ], enum_types=[ + _GETDOCUMENTSREQUEST_WHEREOPERATOR, ], serialized_options=None, is_extendable=False, @@ -3613,7 +4241,7 @@ fields=[]), ], serialized_start=10896, - serialized_end=11654, + serialized_end=13931, ) @@ -3644,8 +4272,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12097, - serialized_end=12127, + serialized_start=14374, + serialized_end=14404, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -3694,8 +4322,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11854, - serialized_end=12137, + serialized_start=14131, + serialized_end=14414, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_DOCUMENTS = _descriptor.Descriptor( @@ -3725,8 +4353,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12097, - serialized_end=12127, + serialized_start=14374, + serialized_end=14404, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_COUNTENTRY = _descriptor.Descriptor( @@ -3775,8 +4403,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12411, - serialized_end=12487, + serialized_start=14688, + serialized_end=14764, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_COUNTENTRIES = _descriptor.Descriptor( @@ -3806,8 +4434,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12489, - serialized_end=12603, + serialized_start=14766, + serialized_end=14880, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_COUNTRESULTS = _descriptor.Descriptor( @@ -3849,8 +4477,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12606, - serialized_end=12766, + serialized_start=14883, + serialized_end=15043, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_RESULTDATA = _descriptor.Descriptor( @@ -3892,8 +4520,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12769, - serialized_end=12998, + serialized_start=15046, + serialized_end=15275, ) _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1 = _descriptor.Descriptor( @@ -3942,8 +4570,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=12140, - serialized_end=13008, + serialized_start=14417, + serialized_end=15285, ) _GETDOCUMENTSRESPONSE = _descriptor.Descriptor( @@ -3985,8 +4613,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=11657, - serialized_end=13019, + serialized_start=13934, + serialized_end=15296, ) @@ -4024,8 +4652,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=13171, - serialized_end=13248, + serialized_start=15448, + serialized_end=15525, ) _GETIDENTITYBYPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -4060,8 +4688,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13022, - serialized_end=13259, + serialized_start=15299, + serialized_end=15536, ) @@ -4111,8 +4739,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13415, - serialized_end=13597, + serialized_start=15692, + serialized_end=15874, ) _GETIDENTITYBYPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -4147,8 +4775,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13262, - serialized_end=13608, + serialized_start=15539, + serialized_end=15885, ) @@ -4198,8 +4826,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13789, - serialized_end=13917, + serialized_start=16066, + serialized_end=16194, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHREQUEST = _descriptor.Descriptor( @@ -4234,8 +4862,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13611, - serialized_end=13928, + serialized_start=15888, + serialized_end=16205, ) @@ -4271,8 +4899,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14541, - serialized_end=14595, + serialized_start=16818, + serialized_end=16872, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSEV0_IDENTITYPROVEDRESPONSE = _descriptor.Descriptor( @@ -4314,8 +4942,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14598, - serialized_end=14764, + serialized_start=16875, + serialized_end=17041, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE_GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSEV0 = _descriptor.Descriptor( @@ -4364,8 +4992,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14112, - serialized_end=14774, + serialized_start=16389, + serialized_end=17051, ) _GETIDENTITYBYNONUNIQUEPUBLICKEYHASHRESPONSE = _descriptor.Descriptor( @@ -4400,8 +5028,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=13931, - serialized_end=14785, + serialized_start=16208, + serialized_end=17062, ) @@ -4439,8 +5067,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=14943, - serialized_end=15028, + serialized_start=17220, + serialized_end=17305, ) _WAITFORSTATETRANSITIONRESULTREQUEST = _descriptor.Descriptor( @@ -4475,8 +5103,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=14788, - serialized_end=15039, + serialized_start=17065, + serialized_end=17316, ) @@ -4526,8 +5154,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15201, - serialized_end=15440, + serialized_start=17478, + serialized_end=17717, ) _WAITFORSTATETRANSITIONRESULTRESPONSE = _descriptor.Descriptor( @@ -4562,8 +5190,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15042, - serialized_end=15451, + serialized_start=17319, + serialized_end=17728, ) @@ -4601,8 +5229,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15579, - serialized_end=15639, + serialized_start=17856, + serialized_end=17916, ) _GETCONSENSUSPARAMSREQUEST = _descriptor.Descriptor( @@ -4637,8 +5265,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15454, - serialized_end=15650, + serialized_start=17731, + serialized_end=17927, ) @@ -4683,8 +5311,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15781, - serialized_end=15861, + serialized_start=18058, + serialized_end=18138, ) _GETCONSENSUSPARAMSRESPONSE_CONSENSUSPARAMSEVIDENCE = _descriptor.Descriptor( @@ -4728,8 +5356,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15863, - serialized_end=15961, + serialized_start=18140, + serialized_end=18238, ) _GETCONSENSUSPARAMSRESPONSE_GETCONSENSUSPARAMSRESPONSEV0 = _descriptor.Descriptor( @@ -4766,8 +5394,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=15964, - serialized_end=16182, + serialized_start=18241, + serialized_end=18459, ) _GETCONSENSUSPARAMSRESPONSE = _descriptor.Descriptor( @@ -4802,8 +5430,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=15653, - serialized_end=16193, + serialized_start=17930, + serialized_end=18470, ) @@ -4834,8 +5462,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16357, - serialized_end=16413, + serialized_start=18634, + serialized_end=18690, ) _GETPROTOCOLVERSIONUPGRADESTATEREQUEST = _descriptor.Descriptor( @@ -4870,8 +5498,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16196, - serialized_end=16424, + serialized_start=18473, + serialized_end=18701, ) @@ -4902,8 +5530,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=16889, - serialized_end=17039, + serialized_start=19166, + serialized_end=19316, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0_VERSIONENTRY = _descriptor.Descriptor( @@ -4940,8 +5568,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17041, - serialized_end=17099, + serialized_start=19318, + serialized_end=19376, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE_GETPROTOCOLVERSIONUPGRADESTATERESPONSEV0 = _descriptor.Descriptor( @@ -4990,8 +5618,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16592, - serialized_end=17109, + serialized_start=18869, + serialized_end=19386, ) _GETPROTOCOLVERSIONUPGRADESTATERESPONSE = _descriptor.Descriptor( @@ -5026,8 +5654,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=16427, - serialized_end=17120, + serialized_start=18704, + serialized_end=19397, ) @@ -5072,8 +5700,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17300, - serialized_end=17403, + serialized_start=19577, + serialized_end=19680, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSREQUEST = _descriptor.Descriptor( @@ -5108,8 +5736,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17123, - serialized_end=17414, + serialized_start=19400, + serialized_end=19691, ) @@ -5140,8 +5768,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=17917, - serialized_end=18092, + serialized_start=20194, + serialized_end=20369, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0_VERSIONSIGNAL = _descriptor.Descriptor( @@ -5178,8 +5806,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18094, - serialized_end=18147, + serialized_start=20371, + serialized_end=20424, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE_GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -5228,8 +5856,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17598, - serialized_end=18157, + serialized_start=19875, + serialized_end=20434, ) _GETPROTOCOLVERSIONUPGRADEVOTESTATUSRESPONSE = _descriptor.Descriptor( @@ -5264,8 +5892,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=17417, - serialized_end=18168, + serialized_start=19694, + serialized_end=20445, ) @@ -5317,8 +5945,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18281, - serialized_end=18405, + serialized_start=20558, + serialized_end=20682, ) _GETEPOCHSINFOREQUEST = _descriptor.Descriptor( @@ -5353,8 +5981,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18171, - serialized_end=18416, + serialized_start=20448, + serialized_end=20693, ) @@ -5385,8 +6013,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18777, - serialized_end=18894, + serialized_start=21054, + serialized_end=21171, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO = _descriptor.Descriptor( @@ -5451,8 +6079,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=18897, - serialized_end=19063, + serialized_start=21174, + serialized_end=21340, ) _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0 = _descriptor.Descriptor( @@ -5501,8 +6129,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18533, - serialized_end=19073, + serialized_start=20810, + serialized_end=21350, ) _GETEPOCHSINFORESPONSE = _descriptor.Descriptor( @@ -5537,8 +6165,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=18419, - serialized_end=19084, + serialized_start=20696, + serialized_end=21361, ) @@ -5597,8 +6225,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19225, - serialized_end=19395, + serialized_start=21502, + serialized_end=21672, ) _GETFINALIZEDEPOCHINFOSREQUEST = _descriptor.Descriptor( @@ -5633,8 +6261,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19087, - serialized_end=19406, + serialized_start=21364, + serialized_end=21683, ) @@ -5665,8 +6293,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19832, - serialized_end=19996, + serialized_start=22109, + serialized_end=22273, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0_FINALIZEDEPOCHINFO = _descriptor.Descriptor( @@ -5780,8 +6408,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=19999, - serialized_end=20542, + serialized_start=22276, + serialized_end=22819, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0_BLOCKPROPOSER = _descriptor.Descriptor( @@ -5818,8 +6446,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=20544, - serialized_end=20601, + serialized_start=22821, + serialized_end=22878, ) _GETFINALIZEDEPOCHINFOSRESPONSE_GETFINALIZEDEPOCHINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -5868,8 +6496,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19550, - serialized_end=20611, + serialized_start=21827, + serialized_end=22888, ) _GETFINALIZEDEPOCHINFOSRESPONSE = _descriptor.Descriptor( @@ -5904,8 +6532,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=19409, - serialized_end=20622, + serialized_start=21686, + serialized_end=22899, ) @@ -5943,8 +6571,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21117, - serialized_end=21186, + serialized_start=23394, + serialized_end=23463, ) _GETCONTESTEDRESOURCESREQUEST_GETCONTESTEDRESOURCESREQUESTV0 = _descriptor.Descriptor( @@ -6040,8 +6668,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20760, - serialized_end=21220, + serialized_start=23037, + serialized_end=23497, ) _GETCONTESTEDRESOURCESREQUEST = _descriptor.Descriptor( @@ -6076,8 +6704,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=20625, - serialized_end=21231, + serialized_start=22902, + serialized_end=23508, ) @@ -6108,8 +6736,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=21673, - serialized_end=21733, + serialized_start=23950, + serialized_end=24010, ) _GETCONTESTEDRESOURCESRESPONSE_GETCONTESTEDRESOURCESRESPONSEV0 = _descriptor.Descriptor( @@ -6158,8 +6786,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21372, - serialized_end=21743, + serialized_start=23649, + serialized_end=24020, ) _GETCONTESTEDRESOURCESRESPONSE = _descriptor.Descriptor( @@ -6194,8 +6822,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21234, - serialized_end=21754, + serialized_start=23511, + serialized_end=24031, ) @@ -6233,8 +6861,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22267, - serialized_end=22340, + serialized_start=24544, + serialized_end=24617, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0_ENDATTIMEINFO = _descriptor.Descriptor( @@ -6271,8 +6899,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22342, - serialized_end=22409, + serialized_start=24619, + serialized_end=24686, ) _GETVOTEPOLLSBYENDDATEREQUEST_GETVOTEPOLLSBYENDDATEREQUESTV0 = _descriptor.Descriptor( @@ -6357,8 +6985,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21892, - serialized_end=22468, + serialized_start=24169, + serialized_end=24745, ) _GETVOTEPOLLSBYENDDATEREQUEST = _descriptor.Descriptor( @@ -6393,8 +7021,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=21757, - serialized_end=22479, + serialized_start=24034, + serialized_end=24756, ) @@ -6432,8 +7060,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=22928, - serialized_end=23014, + serialized_start=25205, + serialized_end=25291, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0_SERIALIZEDVOTEPOLLSBYTIMESTAMPS = _descriptor.Descriptor( @@ -6470,8 +7098,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=23017, - serialized_end=23232, + serialized_start=25294, + serialized_end=25509, ) _GETVOTEPOLLSBYENDDATERESPONSE_GETVOTEPOLLSBYENDDATERESPONSEV0 = _descriptor.Descriptor( @@ -6520,8 +7148,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22620, - serialized_end=23242, + serialized_start=24897, + serialized_end=25519, ) _GETVOTEPOLLSBYENDDATERESPONSE = _descriptor.Descriptor( @@ -6556,8 +7184,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=22482, - serialized_end=23253, + serialized_start=24759, + serialized_end=25530, ) @@ -6595,8 +7223,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=23942, - serialized_end=24026, + serialized_start=26219, + serialized_end=26303, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST_GETCONTESTEDRESOURCEVOTESTATEREQUESTV0 = _descriptor.Descriptor( @@ -6693,8 +7321,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23415, - serialized_end=24140, + serialized_start=25692, + serialized_end=26417, ) _GETCONTESTEDRESOURCEVOTESTATEREQUEST = _descriptor.Descriptor( @@ -6729,8 +7357,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=23256, - serialized_end=24151, + serialized_start=25533, + serialized_end=26428, ) @@ -6802,8 +7430,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24651, - serialized_end=25125, + serialized_start=26928, + serialized_end=27402, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTESTEDRESOURCECONTENDERS = _descriptor.Descriptor( @@ -6869,8 +7497,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25128, - serialized_end=25580, + serialized_start=27405, + serialized_end=27857, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0_CONTENDER = _descriptor.Descriptor( @@ -6924,8 +7552,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25582, - serialized_end=25689, + serialized_start=27859, + serialized_end=27966, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE_GETCONTESTEDRESOURCEVOTESTATERESPONSEV0 = _descriptor.Descriptor( @@ -6974,8 +7602,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24316, - serialized_end=25699, + serialized_start=26593, + serialized_end=27976, ) _GETCONTESTEDRESOURCEVOTESTATERESPONSE = _descriptor.Descriptor( @@ -7010,8 +7638,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=24154, - serialized_end=25710, + serialized_start=26431, + serialized_end=27987, ) @@ -7049,8 +7677,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=23942, - serialized_end=24026, + serialized_start=26219, + serialized_end=26303, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST_GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUESTV0 = _descriptor.Descriptor( @@ -7146,8 +7774,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25897, - serialized_end=26427, + serialized_start=28174, + serialized_end=28704, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYREQUEST = _descriptor.Descriptor( @@ -7182,8 +7810,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=25713, - serialized_end=26438, + serialized_start=27990, + serialized_end=28715, ) @@ -7221,8 +7849,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=26978, - serialized_end=27045, + serialized_start=29255, + serialized_end=29322, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE_GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSEV0 = _descriptor.Descriptor( @@ -7271,8 +7899,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26628, - serialized_end=27055, + serialized_start=28905, + serialized_end=29332, ) _GETCONTESTEDRESOURCEVOTERSFORIDENTITYRESPONSE = _descriptor.Descriptor( @@ -7307,8 +7935,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=26441, - serialized_end=27066, + serialized_start=28718, + serialized_end=29343, ) @@ -7346,8 +7974,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=27615, - serialized_end=27712, + serialized_start=29892, + serialized_end=29989, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST_GETCONTESTEDRESOURCEIDENTITYVOTESREQUESTV0 = _descriptor.Descriptor( @@ -7417,8 +8045,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27240, - serialized_end=27743, + serialized_start=29517, + serialized_end=30020, ) _GETCONTESTEDRESOURCEIDENTITYVOTESREQUEST = _descriptor.Descriptor( @@ -7453,8 +8081,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27069, - serialized_end=27754, + serialized_start=29346, + serialized_end=30031, ) @@ -7492,8 +8120,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28257, - serialized_end=28504, + serialized_start=30534, + serialized_end=30781, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_RESOURCEVOTECHOICE = _descriptor.Descriptor( @@ -7536,8 +8164,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=28507, - serialized_end=28808, + serialized_start=30784, + serialized_end=31085, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0_CONTESTEDRESOURCEIDENTITYVOTE = _descriptor.Descriptor( @@ -7588,8 +8216,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=28811, - serialized_end=29088, + serialized_start=31088, + serialized_end=31365, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE_GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSEV0 = _descriptor.Descriptor( @@ -7638,8 +8266,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27931, - serialized_end=29098, + serialized_start=30208, + serialized_end=31375, ) _GETCONTESTEDRESOURCEIDENTITYVOTESRESPONSE = _descriptor.Descriptor( @@ -7674,8 +8302,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=27757, - serialized_end=29109, + serialized_start=30034, + serialized_end=31386, ) @@ -7713,8 +8341,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29273, - serialized_end=29341, + serialized_start=31550, + serialized_end=31618, ) _GETPREFUNDEDSPECIALIZEDBALANCEREQUEST = _descriptor.Descriptor( @@ -7749,8 +8377,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29112, - serialized_end=29352, + serialized_start=31389, + serialized_end=31629, ) @@ -7800,8 +8428,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29520, - serialized_end=29709, + serialized_start=31797, + serialized_end=31986, ) _GETPREFUNDEDSPECIALIZEDBALANCERESPONSE = _descriptor.Descriptor( @@ -7836,8 +8464,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29355, - serialized_end=29720, + serialized_start=31632, + serialized_end=31997, ) @@ -7868,8 +8496,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=29869, - serialized_end=29920, + serialized_start=32146, + serialized_end=32197, ) _GETTOTALCREDITSINPLATFORMREQUEST = _descriptor.Descriptor( @@ -7904,8 +8532,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29723, - serialized_end=29931, + serialized_start=32000, + serialized_end=32208, ) @@ -7955,8 +8583,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30084, - serialized_end=30268, + serialized_start=32361, + serialized_end=32545, ) _GETTOTALCREDITSINPLATFORMRESPONSE = _descriptor.Descriptor( @@ -7991,8 +8619,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=29934, - serialized_end=30279, + serialized_start=32211, + serialized_end=32556, ) @@ -8037,8 +8665,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30398, - serialized_end=30467, + serialized_start=32675, + serialized_end=32744, ) _GETPATHELEMENTSREQUEST = _descriptor.Descriptor( @@ -8073,8 +8701,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30282, - serialized_end=30478, + serialized_start=32559, + serialized_end=32755, ) @@ -8105,8 +8733,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=30851, - serialized_end=30879, + serialized_start=33128, + serialized_end=33156, ) _GETPATHELEMENTSRESPONSE_GETPATHELEMENTSRESPONSEV0 = _descriptor.Descriptor( @@ -8155,8 +8783,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30601, - serialized_end=30889, + serialized_start=32878, + serialized_end=33166, ) _GETPATHELEMENTSRESPONSE = _descriptor.Descriptor( @@ -8191,8 +8819,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30481, - serialized_end=30900, + serialized_start=32758, + serialized_end=33177, ) @@ -8216,8 +8844,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31001, - serialized_end=31021, + serialized_start=33278, + serialized_end=33298, ) _GETSTATUSREQUEST = _descriptor.Descriptor( @@ -8252,8 +8880,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=30903, - serialized_end=31032, + serialized_start=33180, + serialized_end=33309, ) @@ -8308,8 +8936,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31909, - serialized_end=32003, + serialized_start=34186, + serialized_end=34280, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_TENDERDASH = _descriptor.Descriptor( @@ -8346,8 +8974,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32236, - serialized_end=32276, + serialized_start=34513, + serialized_end=34553, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL_DRIVE = _descriptor.Descriptor( @@ -8391,8 +9019,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32278, - serialized_end=32338, + serialized_start=34555, + serialized_end=34615, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION_PROTOCOL = _descriptor.Descriptor( @@ -8429,8 +9057,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32006, - serialized_end=32338, + serialized_start=34283, + serialized_end=34615, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_VERSION = _descriptor.Descriptor( @@ -8467,8 +9095,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31696, - serialized_end=32338, + serialized_start=33973, + serialized_end=34615, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_TIME = _descriptor.Descriptor( @@ -8534,8 +9162,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=32340, - serialized_end=32467, + serialized_start=34617, + serialized_end=34744, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NODE = _descriptor.Descriptor( @@ -8577,8 +9205,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=32469, - serialized_end=32529, + serialized_start=34746, + serialized_end=34806, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_CHAIN = _descriptor.Descriptor( @@ -8669,8 +9297,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=32532, - serialized_end=32839, + serialized_start=34809, + serialized_end=35116, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_NETWORK = _descriptor.Descriptor( @@ -8714,8 +9342,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32841, - serialized_end=32908, + serialized_start=35118, + serialized_end=35185, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC = _descriptor.Descriptor( @@ -8794,8 +9422,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=32911, - serialized_end=33172, + serialized_start=35188, + serialized_end=35449, ) _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0 = _descriptor.Descriptor( @@ -8860,8 +9488,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=31137, - serialized_end=33172, + serialized_start=33414, + serialized_end=35449, ) _GETSTATUSRESPONSE = _descriptor.Descriptor( @@ -8896,8 +9524,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=31035, - serialized_end=33183, + serialized_start=33312, + serialized_end=35460, ) @@ -8921,8 +9549,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33320, - serialized_end=33352, + serialized_start=35597, + serialized_end=35629, ) _GETCURRENTQUORUMSINFOREQUEST = _descriptor.Descriptor( @@ -8957,8 +9585,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33186, - serialized_end=33363, + serialized_start=35463, + serialized_end=35640, ) @@ -9003,8 +9631,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33503, - serialized_end=33573, + serialized_start=35780, + serialized_end=35850, ) _GETCURRENTQUORUMSINFORESPONSE_VALIDATORSETV0 = _descriptor.Descriptor( @@ -9055,8 +9683,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33576, - serialized_end=33751, + serialized_start=35853, + serialized_end=36028, ) _GETCURRENTQUORUMSINFORESPONSE_GETCURRENTQUORUMSINFORESPONSEV0 = _descriptor.Descriptor( @@ -9114,8 +9742,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=33754, - serialized_end=34028, + serialized_start=36031, + serialized_end=36305, ) _GETCURRENTQUORUMSINFORESPONSE = _descriptor.Descriptor( @@ -9150,8 +9778,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=33366, - serialized_end=34039, + serialized_start=35643, + serialized_end=36316, ) @@ -9196,8 +9824,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=34185, - serialized_end=34275, + serialized_start=36462, + serialized_end=36552, ) _GETIDENTITYTOKENBALANCESREQUEST = _descriptor.Descriptor( @@ -9232,8 +9860,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34042, - serialized_end=34286, + serialized_start=36319, + serialized_end=36563, ) @@ -9276,8 +9904,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34725, - serialized_end=34796, + serialized_start=37002, + serialized_end=37073, ) _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0_TOKENBALANCES = _descriptor.Descriptor( @@ -9307,8 +9935,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=34799, - serialized_end=34953, + serialized_start=37076, + serialized_end=37230, ) _GETIDENTITYTOKENBALANCESRESPONSE_GETIDENTITYTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( @@ -9357,8 +9985,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34436, - serialized_end=34963, + serialized_start=36713, + serialized_end=37240, ) _GETIDENTITYTOKENBALANCESRESPONSE = _descriptor.Descriptor( @@ -9393,8 +10021,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34289, - serialized_end=34974, + serialized_start=36566, + serialized_end=37251, ) @@ -9439,8 +10067,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35126, - serialized_end=35218, + serialized_start=37403, + serialized_end=37495, ) _GETIDENTITIESTOKENBALANCESREQUEST = _descriptor.Descriptor( @@ -9475,8 +10103,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=34977, - serialized_end=35229, + serialized_start=37254, + serialized_end=37506, ) @@ -9519,8 +10147,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35697, - serialized_end=35779, + serialized_start=37974, + serialized_end=38056, ) _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0_IDENTITYTOKENBALANCES = _descriptor.Descriptor( @@ -9550,8 +10178,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=35782, - serialized_end=35965, + serialized_start=38059, + serialized_end=38242, ) _GETIDENTITIESTOKENBALANCESRESPONSE_GETIDENTITIESTOKENBALANCESRESPONSEV0 = _descriptor.Descriptor( @@ -9600,8 +10228,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35385, - serialized_end=35975, + serialized_start=37662, + serialized_end=38252, ) _GETIDENTITIESTOKENBALANCESRESPONSE = _descriptor.Descriptor( @@ -9636,8 +10264,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35232, - serialized_end=35986, + serialized_start=37509, + serialized_end=38263, ) @@ -9682,8 +10310,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36123, - serialized_end=36210, + serialized_start=38400, + serialized_end=38487, ) _GETIDENTITYTOKENINFOSREQUEST = _descriptor.Descriptor( @@ -9718,8 +10346,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=35989, - serialized_end=36221, + serialized_start=38266, + serialized_end=38498, ) @@ -9750,8 +10378,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36635, - serialized_end=36675, + serialized_start=38912, + serialized_end=38952, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( @@ -9793,8 +10421,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36678, - serialized_end=36854, + serialized_start=38955, + serialized_end=39131, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0_TOKENINFOS = _descriptor.Descriptor( @@ -9824,8 +10452,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36857, - serialized_end=36995, + serialized_start=39134, + serialized_end=39272, ) _GETIDENTITYTOKENINFOSRESPONSE_GETIDENTITYTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -9874,8 +10502,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36362, - serialized_end=37005, + serialized_start=38639, + serialized_end=39282, ) _GETIDENTITYTOKENINFOSRESPONSE = _descriptor.Descriptor( @@ -9910,8 +10538,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=36224, - serialized_end=37016, + serialized_start=38501, + serialized_end=39293, ) @@ -9956,8 +10584,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37159, - serialized_end=37248, + serialized_start=39436, + serialized_end=39525, ) _GETIDENTITIESTOKENINFOSREQUEST = _descriptor.Descriptor( @@ -9992,8 +10620,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37019, - serialized_end=37259, + serialized_start=39296, + serialized_end=39536, ) @@ -10024,8 +10652,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=36635, - serialized_end=36675, + serialized_start=38912, + serialized_end=38952, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_TOKENINFOENTRY = _descriptor.Descriptor( @@ -10067,8 +10695,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37746, - serialized_end=37929, + serialized_start=40023, + serialized_end=40206, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0_IDENTITYTOKENINFOS = _descriptor.Descriptor( @@ -10098,8 +10726,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=37932, - serialized_end=38083, + serialized_start=40209, + serialized_end=40360, ) _GETIDENTITIESTOKENINFOSRESPONSE_GETIDENTITIESTOKENINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -10148,8 +10776,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37406, - serialized_end=38093, + serialized_start=39683, + serialized_end=40370, ) _GETIDENTITIESTOKENINFOSRESPONSE = _descriptor.Descriptor( @@ -10184,8 +10812,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=37262, - serialized_end=38104, + serialized_start=39539, + serialized_end=40381, ) @@ -10223,8 +10851,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38226, - serialized_end=38287, + serialized_start=40503, + serialized_end=40564, ) _GETTOKENSTATUSESREQUEST = _descriptor.Descriptor( @@ -10259,8 +10887,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38107, - serialized_end=38298, + serialized_start=40384, + serialized_end=40575, ) @@ -10303,8 +10931,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38688, - serialized_end=38756, + serialized_start=40965, + serialized_end=41033, ) _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0_TOKENSTATUSES = _descriptor.Descriptor( @@ -10334,8 +10962,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=38759, - serialized_end=38895, + serialized_start=41036, + serialized_end=41172, ) _GETTOKENSTATUSESRESPONSE_GETTOKENSTATUSESRESPONSEV0 = _descriptor.Descriptor( @@ -10384,8 +11012,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38424, - serialized_end=38905, + serialized_start=40701, + serialized_end=41182, ) _GETTOKENSTATUSESRESPONSE = _descriptor.Descriptor( @@ -10420,8 +11048,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38301, - serialized_end=38916, + serialized_start=40578, + serialized_end=41193, ) @@ -10459,8 +11087,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39074, - serialized_end=39147, + serialized_start=41351, + serialized_end=41424, ) _GETTOKENDIRECTPURCHASEPRICESREQUEST = _descriptor.Descriptor( @@ -10495,8 +11123,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=38919, - serialized_end=39158, + serialized_start=41196, + serialized_end=41435, ) @@ -10534,8 +11162,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39648, - serialized_end=39699, + serialized_start=41925, + serialized_end=41976, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_PRICINGSCHEDULE = _descriptor.Descriptor( @@ -10565,8 +11193,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39702, - serialized_end=39869, + serialized_start=41979, + serialized_end=42146, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_TOKENDIRECTPURCHASEPRICEENTRY = _descriptor.Descriptor( @@ -10615,8 +11243,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39872, - serialized_end=40100, + serialized_start=42149, + serialized_end=42377, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0_TOKENDIRECTPURCHASEPRICES = _descriptor.Descriptor( @@ -10646,8 +11274,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40103, - serialized_end=40303, + serialized_start=42380, + serialized_end=42580, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE_GETTOKENDIRECTPURCHASEPRICESRESPONSEV0 = _descriptor.Descriptor( @@ -10696,8 +11324,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39320, - serialized_end=40313, + serialized_start=41597, + serialized_end=42590, ) _GETTOKENDIRECTPURCHASEPRICESRESPONSE = _descriptor.Descriptor( @@ -10732,8 +11360,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=39161, - serialized_end=40324, + serialized_start=41438, + serialized_end=42601, ) @@ -10771,8 +11399,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40458, - serialized_end=40522, + serialized_start=42735, + serialized_end=42799, ) _GETTOKENCONTRACTINFOREQUEST = _descriptor.Descriptor( @@ -10807,8 +11435,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40327, - serialized_end=40533, + serialized_start=42604, + serialized_end=42810, ) @@ -10846,8 +11474,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=40945, - serialized_end=41022, + serialized_start=43222, + serialized_end=43299, ) _GETTOKENCONTRACTINFORESPONSE_GETTOKENCONTRACTINFORESPONSEV0 = _descriptor.Descriptor( @@ -10896,8 +11524,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40671, - serialized_end=41032, + serialized_start=42948, + serialized_end=43309, ) _GETTOKENCONTRACTINFORESPONSE = _descriptor.Descriptor( @@ -10932,8 +11560,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=40536, - serialized_end=41043, + serialized_start=42813, + serialized_end=43320, ) @@ -10988,8 +11616,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41476, - serialized_end=41630, + serialized_start=43753, + serialized_end=43907, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST_GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUESTV0 = _descriptor.Descriptor( @@ -11050,8 +11678,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41220, - serialized_end=41658, + serialized_start=43497, + serialized_end=43935, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSREQUEST = _descriptor.Descriptor( @@ -11086,8 +11714,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41046, - serialized_end=41669, + serialized_start=43323, + serialized_end=43946, ) @@ -11125,8 +11753,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42180, - serialized_end=42242, + serialized_start=44457, + serialized_end=44519, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENTIMEDDISTRIBUTIONENTRY = _descriptor.Descriptor( @@ -11163,8 +11791,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42245, - serialized_end=42457, + serialized_start=44522, + serialized_end=44734, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0_TOKENDISTRIBUTIONS = _descriptor.Descriptor( @@ -11194,8 +11822,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42460, - serialized_end=42655, + serialized_start=44737, + serialized_end=44932, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE_GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSEV0 = _descriptor.Descriptor( @@ -11244,8 +11872,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41850, - serialized_end=42665, + serialized_start=44127, + serialized_end=44942, ) _GETTOKENPREPROGRAMMEDDISTRIBUTIONSRESPONSE = _descriptor.Descriptor( @@ -11280,8 +11908,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=41672, - serialized_end=42676, + serialized_start=43949, + serialized_end=44953, ) @@ -11319,8 +11947,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=42865, - serialized_end=42938, + serialized_start=45142, + serialized_end=45215, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUEST_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUESTV0 = _descriptor.Descriptor( @@ -11376,8 +12004,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42941, - serialized_end=43182, + serialized_start=45218, + serialized_end=45459, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMREQUEST = _descriptor.Descriptor( @@ -11412,8 +12040,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=42679, - serialized_end=43193, + serialized_start=44956, + serialized_end=45470, ) @@ -11470,8 +12098,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43714, - serialized_end=43834, + serialized_start=45991, + serialized_end=46111, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSEV0 = _descriptor.Descriptor( @@ -11520,8 +12148,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43386, - serialized_end=43844, + serialized_start=45663, + serialized_end=46121, ) _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE = _descriptor.Descriptor( @@ -11556,8 +12184,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43196, - serialized_end=43855, + serialized_start=45473, + serialized_end=46132, ) @@ -11595,8 +12223,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=43986, - serialized_end=44049, + serialized_start=46263, + serialized_end=46326, ) _GETTOKENTOTALSUPPLYREQUEST = _descriptor.Descriptor( @@ -11631,8 +12259,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=43858, - serialized_end=44060, + serialized_start=46135, + serialized_end=46337, ) @@ -11677,8 +12305,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=44481, - serialized_end=44601, + serialized_start=46758, + serialized_end=46878, ) _GETTOKENTOTALSUPPLYRESPONSE_GETTOKENTOTALSUPPLYRESPONSEV0 = _descriptor.Descriptor( @@ -11727,8 +12355,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44195, - serialized_end=44611, + serialized_start=46472, + serialized_end=46888, ) _GETTOKENTOTALSUPPLYRESPONSE = _descriptor.Descriptor( @@ -11763,8 +12391,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44063, - serialized_end=44622, + serialized_start=46340, + serialized_end=46899, ) @@ -11809,8 +12437,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=44732, - serialized_end=44824, + serialized_start=47009, + serialized_end=47101, ) _GETGROUPINFOREQUEST = _descriptor.Descriptor( @@ -11845,8 +12473,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44625, - serialized_end=44835, + serialized_start=46902, + serialized_end=47112, ) @@ -11884,8 +12512,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45193, - serialized_end=45245, + serialized_start=47470, + serialized_end=47522, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFOENTRY = _descriptor.Descriptor( @@ -11922,8 +12550,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45248, - serialized_end=45400, + serialized_start=47525, + serialized_end=47677, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0_GROUPINFO = _descriptor.Descriptor( @@ -11958,8 +12586,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45403, - serialized_end=45541, + serialized_start=47680, + serialized_end=47818, ) _GETGROUPINFORESPONSE_GETGROUPINFORESPONSEV0 = _descriptor.Descriptor( @@ -12008,8 +12636,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44949, - serialized_end=45551, + serialized_start=47226, + serialized_end=47828, ) _GETGROUPINFORESPONSE = _descriptor.Descriptor( @@ -12044,8 +12672,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=44838, - serialized_end=45562, + serialized_start=47115, + serialized_end=47839, ) @@ -12083,8 +12711,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45675, - serialized_end=45792, + serialized_start=47952, + serialized_end=48069, ) _GETGROUPINFOSREQUEST_GETGROUPINFOSREQUESTV0 = _descriptor.Descriptor( @@ -12145,8 +12773,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45795, - serialized_end=46047, + serialized_start=48072, + serialized_end=48324, ) _GETGROUPINFOSREQUEST = _descriptor.Descriptor( @@ -12181,8 +12809,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=45565, - serialized_end=46058, + serialized_start=47842, + serialized_end=48335, ) @@ -12220,8 +12848,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=45193, - serialized_end=45245, + serialized_start=47470, + serialized_end=47522, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPPOSITIONINFOENTRY = _descriptor.Descriptor( @@ -12265,8 +12893,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46479, - serialized_end=46674, + serialized_start=48756, + serialized_end=48951, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0_GROUPINFOS = _descriptor.Descriptor( @@ -12296,8 +12924,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46677, - serialized_end=46807, + serialized_start=48954, + serialized_end=49084, ) _GETGROUPINFOSRESPONSE_GETGROUPINFOSRESPONSEV0 = _descriptor.Descriptor( @@ -12346,8 +12974,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46175, - serialized_end=46817, + serialized_start=48452, + serialized_end=49094, ) _GETGROUPINFOSRESPONSE = _descriptor.Descriptor( @@ -12382,8 +13010,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46061, - serialized_end=46828, + serialized_start=48338, + serialized_end=49105, ) @@ -12421,8 +13049,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=46947, - serialized_end=47023, + serialized_start=49224, + serialized_end=49300, ) _GETGROUPACTIONSREQUEST_GETGROUPACTIONSREQUESTV0 = _descriptor.Descriptor( @@ -12497,8 +13125,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47026, - serialized_end=47354, + serialized_start=49303, + serialized_end=49631, ) _GETGROUPACTIONSREQUEST = _descriptor.Descriptor( @@ -12534,8 +13162,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=46831, - serialized_end=47405, + serialized_start=49108, + serialized_end=49682, ) @@ -12585,8 +13213,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47787, - serialized_end=47878, + serialized_start=50064, + serialized_end=50155, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_BURNEVENT = _descriptor.Descriptor( @@ -12635,8 +13263,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47880, - serialized_end=47971, + serialized_start=50157, + serialized_end=50248, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_FREEZEEVENT = _descriptor.Descriptor( @@ -12678,8 +13306,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47973, - serialized_end=48047, + serialized_start=50250, + serialized_end=50324, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UNFREEZEEVENT = _descriptor.Descriptor( @@ -12721,8 +13349,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48049, - serialized_end=48125, + serialized_start=50326, + serialized_end=50402, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DESTROYFROZENFUNDSEVENT = _descriptor.Descriptor( @@ -12771,8 +13399,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48127, - serialized_end=48229, + serialized_start=50404, + serialized_end=50506, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_SHAREDENCRYPTEDNOTE = _descriptor.Descriptor( @@ -12816,8 +13444,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=48231, - serialized_end=48331, + serialized_start=50508, + serialized_end=50608, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_PERSONALENCRYPTEDNOTE = _descriptor.Descriptor( @@ -12861,8 +13489,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=48333, - serialized_end=48456, + serialized_start=50610, + serialized_end=50733, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_EMERGENCYACTIONEVENT = _descriptor.Descriptor( @@ -12905,8 +13533,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48459, - serialized_end=48692, + serialized_start=50736, + serialized_end=50969, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENCONFIGUPDATEEVENT = _descriptor.Descriptor( @@ -12948,8 +13576,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48694, - serialized_end=48794, + serialized_start=50971, + serialized_end=51071, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT_PRICEFORQUANTITY = _descriptor.Descriptor( @@ -12986,8 +13614,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=39648, - serialized_end=39699, + serialized_start=41925, + serialized_end=41976, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT_PRICINGSCHEDULE = _descriptor.Descriptor( @@ -13017,8 +13645,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=49086, - serialized_end=49258, + serialized_start=51363, + serialized_end=51535, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_UPDATEDIRECTPURCHASEPRICEEVENT = _descriptor.Descriptor( @@ -13072,8 +13700,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=48797, - serialized_end=49283, + serialized_start=51074, + serialized_end=51560, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONEVENT = _descriptor.Descriptor( @@ -13122,8 +13750,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=49286, - serialized_end=49666, + serialized_start=51563, + serialized_end=51943, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTEVENT = _descriptor.Descriptor( @@ -13158,8 +13786,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=49669, - serialized_end=49808, + serialized_start=51946, + serialized_end=52085, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_DOCUMENTCREATEEVENT = _descriptor.Descriptor( @@ -13189,8 +13817,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=49810, - serialized_end=49857, + serialized_start=52087, + serialized_end=52134, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTUPDATEEVENT = _descriptor.Descriptor( @@ -13220,8 +13848,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=49859, - serialized_end=49906, + serialized_start=52136, + serialized_end=52183, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_CONTRACTEVENT = _descriptor.Descriptor( @@ -13256,8 +13884,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=49909, - serialized_end=50048, + serialized_start=52186, + serialized_end=52325, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_TOKENEVENT = _descriptor.Descriptor( @@ -13341,8 +13969,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=50051, - serialized_end=51028, + serialized_start=52328, + serialized_end=53305, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONENTRY = _descriptor.Descriptor( @@ -13379,8 +14007,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51031, - serialized_end=51178, + serialized_start=53308, + serialized_end=53455, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0_GROUPACTIONS = _descriptor.Descriptor( @@ -13410,8 +14038,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51181, - serialized_end=51313, + serialized_start=53458, + serialized_end=53590, ) _GETGROUPACTIONSRESPONSE_GETGROUPACTIONSRESPONSEV0 = _descriptor.Descriptor( @@ -13460,8 +14088,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47528, - serialized_end=51323, + serialized_start=49805, + serialized_end=53600, ) _GETGROUPACTIONSRESPONSE = _descriptor.Descriptor( @@ -13496,8 +14124,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=47408, - serialized_end=51334, + serialized_start=49685, + serialized_end=53611, ) @@ -13556,8 +14184,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51472, - serialized_end=51678, + serialized_start=53749, + serialized_end=53955, ) _GETGROUPACTIONSIGNERSREQUEST = _descriptor.Descriptor( @@ -13593,8 +14221,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51337, - serialized_end=51729, + serialized_start=53614, + serialized_end=54006, ) @@ -13632,8 +14260,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52161, - serialized_end=52214, + serialized_start=54438, + serialized_end=54491, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0_GROUPACTIONSIGNERS = _descriptor.Descriptor( @@ -13663,8 +14291,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52217, - serialized_end=52362, + serialized_start=54494, + serialized_end=54639, ) _GETGROUPACTIONSIGNERSRESPONSE_GETGROUPACTIONSIGNERSRESPONSEV0 = _descriptor.Descriptor( @@ -13713,8 +14341,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51870, - serialized_end=52372, + serialized_start=54147, + serialized_end=54649, ) _GETGROUPACTIONSIGNERSRESPONSE = _descriptor.Descriptor( @@ -13749,8 +14377,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51732, - serialized_end=52383, + serialized_start=54009, + serialized_end=54660, ) @@ -13788,8 +14416,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52499, - serialized_end=52556, + serialized_start=54776, + serialized_end=54833, ) _GETADDRESSINFOREQUEST = _descriptor.Descriptor( @@ -13824,8 +14452,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52386, - serialized_end=52567, + serialized_start=54663, + serialized_end=54844, ) @@ -13868,8 +14496,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52570, - serialized_end=52703, + serialized_start=54847, + serialized_end=54980, ) @@ -13907,8 +14535,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52705, - serialized_end=52754, + serialized_start=54982, + serialized_end=55031, ) @@ -13939,8 +14567,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52756, - serialized_end=52851, + serialized_start=55033, + serialized_end=55128, ) @@ -13990,8 +14618,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52853, - serialized_end=52962, + serialized_start=55130, + serialized_end=55239, ) @@ -14029,8 +14657,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52964, - serialized_end=53084, + serialized_start=55241, + serialized_end=55361, ) @@ -14061,8 +14689,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53086, - serialized_end=53193, + serialized_start=55363, + serialized_end=55470, ) @@ -14112,8 +14740,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53313, - serialized_end=53538, + serialized_start=55590, + serialized_end=55815, ) _GETADDRESSINFORESPONSE = _descriptor.Descriptor( @@ -14148,8 +14776,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53196, - serialized_end=53549, + serialized_start=55473, + serialized_end=55826, ) @@ -14187,8 +14815,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53674, - serialized_end=53736, + serialized_start=55951, + serialized_end=56013, ) _GETADDRESSESINFOSREQUEST = _descriptor.Descriptor( @@ -14223,8 +14851,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53552, - serialized_end=53747, + serialized_start=55829, + serialized_end=56024, ) @@ -14274,8 +14902,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53876, - serialized_end=54108, + serialized_start=56153, + serialized_end=56385, ) _GETADDRESSESINFOSRESPONSE = _descriptor.Descriptor( @@ -14310,8 +14938,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53750, - serialized_end=54119, + serialized_start=56027, + serialized_end=56396, ) @@ -14335,8 +14963,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54259, - serialized_end=54292, + serialized_start=56536, + serialized_end=56569, ) _GETADDRESSESTRUNKSTATEREQUEST = _descriptor.Descriptor( @@ -14371,8 +14999,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54122, - serialized_end=54303, + serialized_start=56399, + serialized_end=56580, ) @@ -14410,8 +15038,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54447, - serialized_end=54593, + serialized_start=56724, + serialized_end=56870, ) _GETADDRESSESTRUNKSTATERESPONSE = _descriptor.Descriptor( @@ -14446,8 +15074,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54306, - serialized_end=54604, + serialized_start=56583, + serialized_end=56881, ) @@ -14492,8 +15120,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54747, - serialized_end=54836, + serialized_start=57024, + serialized_end=57113, ) _GETADDRESSESBRANCHSTATEREQUEST = _descriptor.Descriptor( @@ -14528,8 +15156,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54607, - serialized_end=54847, + serialized_start=56884, + serialized_end=57124, ) @@ -14560,8 +15188,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=54993, - serialized_end=55048, + serialized_start=57270, + serialized_end=57325, ) _GETADDRESSESBRANCHSTATERESPONSE = _descriptor.Descriptor( @@ -14596,8 +15224,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=54850, - serialized_end=55059, + serialized_start=57127, + serialized_end=57336, ) @@ -14642,8 +15270,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=55223, - serialized_end=55337, + serialized_start=57500, + serialized_end=57614, ) _GETRECENTADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( @@ -14678,8 +15306,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55062, - serialized_end=55348, + serialized_start=57339, + serialized_end=57625, ) @@ -14729,8 +15357,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55516, - serialized_end=55780, + serialized_start=57793, + serialized_end=58057, ) _GETRECENTADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( @@ -14765,8 +15393,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55351, - serialized_end=55791, + serialized_start=57628, + serialized_end=58068, ) @@ -14804,8 +15432,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=55793, - serialized_end=55864, + serialized_start=58070, + serialized_end=58141, ) @@ -14855,8 +15483,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=55867, - serialized_end=56043, + serialized_start=58144, + serialized_end=58320, ) @@ -14887,8 +15515,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56045, - serialized_end=56137, + serialized_start=58322, + serialized_end=58414, ) @@ -14933,8 +15561,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56140, - serialized_end=56314, + serialized_start=58417, + serialized_end=58591, ) @@ -14965,8 +15593,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56317, - serialized_end=56452, + serialized_start=58594, + serialized_end=58729, ) @@ -15004,8 +15632,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=56644, - serialized_end=56741, + serialized_start=58921, + serialized_end=59018, ) _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( @@ -15040,8 +15668,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56455, - serialized_end=56752, + serialized_start=58732, + serialized_end=59029, ) @@ -15091,8 +15719,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56948, - serialized_end=57240, + serialized_start=59225, + serialized_end=59517, ) _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( @@ -15127,8 +15755,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=56755, - serialized_end=57251, + serialized_start=59032, + serialized_end=59528, ) @@ -15173,8 +15801,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=57400, - serialized_end=57487, + serialized_start=59677, + serialized_end=59764, ) _GETSHIELDEDENCRYPTEDNOTESREQUEST = _descriptor.Descriptor( @@ -15209,8 +15837,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57254, - serialized_end=57498, + serialized_start=59531, + serialized_end=59775, ) @@ -15255,8 +15883,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=57945, - serialized_end=58016, + serialized_start=60222, + serialized_end=60293, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE_GETSHIELDEDENCRYPTEDNOTESRESPONSEV0_ENCRYPTEDNOTES = _descriptor.Descriptor( @@ -15286,8 +15914,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58019, - serialized_end=58164, + serialized_start=60296, + serialized_end=60441, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE_GETSHIELDEDENCRYPTEDNOTESRESPONSEV0 = _descriptor.Descriptor( @@ -15336,8 +15964,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57651, - serialized_end=58174, + serialized_start=59928, + serialized_end=60451, ) _GETSHIELDEDENCRYPTEDNOTESRESPONSE = _descriptor.Descriptor( @@ -15372,8 +16000,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=57501, - serialized_end=58185, + serialized_start=59778, + serialized_end=60462, ) @@ -15404,8 +16032,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58313, - serialized_end=58357, + serialized_start=60590, + serialized_end=60634, ) _GETSHIELDEDANCHORSREQUEST = _descriptor.Descriptor( @@ -15440,8 +16068,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58188, - serialized_end=58368, + serialized_start=60465, + serialized_end=60645, ) @@ -15472,8 +16100,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58757, - serialized_end=58783, + serialized_start=61034, + serialized_end=61060, ) _GETSHIELDEDANCHORSRESPONSE_GETSHIELDEDANCHORSRESPONSEV0 = _descriptor.Descriptor( @@ -15522,8 +16150,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58500, - serialized_end=58793, + serialized_start=60777, + serialized_end=61070, ) _GETSHIELDEDANCHORSRESPONSE = _descriptor.Descriptor( @@ -15558,8 +16186,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58371, - serialized_end=58804, + serialized_start=60648, + serialized_end=61081, ) @@ -15590,8 +16218,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=58959, - serialized_end=59012, + serialized_start=61236, + serialized_end=61289, ) _GETMOSTRECENTSHIELDEDANCHORREQUEST = _descriptor.Descriptor( @@ -15626,8 +16254,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=58807, - serialized_end=59023, + serialized_start=61084, + serialized_end=61300, ) @@ -15677,8 +16305,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59182, - serialized_end=59363, + serialized_start=61459, + serialized_end=61640, ) _GETMOSTRECENTSHIELDEDANCHORRESPONSE = _descriptor.Descriptor( @@ -15713,8 +16341,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59026, - serialized_end=59374, + serialized_start=61303, + serialized_end=61651, ) @@ -15745,8 +16373,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=59508, - serialized_end=59554, + serialized_start=61785, + serialized_end=61831, ) _GETSHIELDEDPOOLSTATEREQUEST = _descriptor.Descriptor( @@ -15781,8 +16409,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59377, - serialized_end=59565, + serialized_start=61654, + serialized_end=61842, ) @@ -15832,8 +16460,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59703, - serialized_end=59888, + serialized_start=61980, + serialized_end=62165, ) _GETSHIELDEDPOOLSTATERESPONSE = _descriptor.Descriptor( @@ -15868,8 +16496,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59568, - serialized_end=59899, + serialized_start=61845, + serialized_end=62176, ) @@ -15907,8 +16535,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60036, - serialized_end=60103, + serialized_start=62313, + serialized_end=62380, ) _GETSHIELDEDNULLIFIERSREQUEST = _descriptor.Descriptor( @@ -15943,8 +16571,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=59902, - serialized_end=60114, + serialized_start=62179, + serialized_end=62391, ) @@ -15982,8 +16610,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60543, - serialized_end=60597, + serialized_start=62820, + serialized_end=62874, ) _GETSHIELDEDNULLIFIERSRESPONSE_GETSHIELDEDNULLIFIERSRESPONSEV0_NULLIFIERSTATUSES = _descriptor.Descriptor( @@ -16013,8 +16641,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60600, - serialized_end=60742, + serialized_start=62877, + serialized_end=63019, ) _GETSHIELDEDNULLIFIERSRESPONSE_GETSHIELDEDNULLIFIERSRESPONSEV0 = _descriptor.Descriptor( @@ -16063,8 +16691,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60255, - serialized_end=60752, + serialized_start=62532, + serialized_end=63029, ) _GETSHIELDEDNULLIFIERSRESPONSE = _descriptor.Descriptor( @@ -16099,8 +16727,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60117, - serialized_end=60763, + serialized_start=62394, + serialized_end=63040, ) @@ -16138,8 +16766,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=60906, - serialized_end=60984, + serialized_start=63183, + serialized_end=63261, ) _GETNULLIFIERSTRUNKSTATEREQUEST = _descriptor.Descriptor( @@ -16174,8 +16802,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60766, - serialized_end=60995, + serialized_start=63043, + serialized_end=63272, ) @@ -16213,8 +16841,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61142, - serialized_end=61289, + serialized_start=63419, + serialized_end=63566, ) _GETNULLIFIERSTRUNKSTATERESPONSE = _descriptor.Descriptor( @@ -16249,8 +16877,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=60998, - serialized_end=61300, + serialized_start=63275, + serialized_end=63577, ) @@ -16309,8 +16937,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61447, - serialized_end=61581, + serialized_start=63724, + serialized_end=63858, ) _GETNULLIFIERSBRANCHSTATEREQUEST = _descriptor.Descriptor( @@ -16345,8 +16973,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61303, - serialized_end=61592, + serialized_start=63580, + serialized_end=63869, ) @@ -16377,8 +17005,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61741, - serialized_end=61797, + serialized_start=64018, + serialized_end=64074, ) _GETNULLIFIERSBRANCHSTATERESPONSE = _descriptor.Descriptor( @@ -16413,8 +17041,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61595, - serialized_end=61808, + serialized_start=63872, + serialized_end=64085, ) @@ -16452,8 +17080,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61810, - serialized_end=61879, + serialized_start=64087, + serialized_end=64156, ) @@ -16484,8 +17112,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=61881, - serialized_end=61978, + serialized_start=64158, + serialized_end=64255, ) @@ -16523,8 +17151,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=62127, - serialized_end=62204, + serialized_start=64404, + serialized_end=64481, ) _GETRECENTNULLIFIERCHANGESREQUEST = _descriptor.Descriptor( @@ -16559,8 +17187,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=61981, - serialized_end=62215, + serialized_start=64258, + serialized_end=64492, ) @@ -16610,8 +17238,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=62368, - serialized_end=62616, + serialized_start=64645, + serialized_end=64893, ) _GETRECENTNULLIFIERCHANGESRESPONSE = _descriptor.Descriptor( @@ -16646,8 +17274,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=62218, - serialized_end=62627, + serialized_start=64495, + serialized_end=64904, ) @@ -16692,8 +17320,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=62629, - serialized_end=62743, + serialized_start=64906, + serialized_end=65020, ) @@ -16724,8 +17352,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=62745, - serialized_end=62870, + serialized_start=65022, + serialized_end=65147, ) @@ -16763,8 +17391,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=63046, - serialized_end=63138, + serialized_start=65323, + serialized_end=65415, ) _GETRECENTCOMPACTEDNULLIFIERCHANGESREQUEST = _descriptor.Descriptor( @@ -16799,8 +17427,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=62873, - serialized_end=63149, + serialized_start=65150, + serialized_end=65426, ) @@ -16850,8 +17478,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=63330, - serialized_end=63606, + serialized_start=65607, + serialized_end=65883, ) _GETRECENTCOMPACTEDNULLIFIERCHANGESRESPONSE = _descriptor.Descriptor( @@ -16886,8 +17514,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=63152, - serialized_end=63617, + serialized_start=65429, + serialized_end=65894, ) _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST @@ -17185,6 +17813,66 @@ _GETDATACONTRACTHISTORYRESPONSE.oneofs_by_name['version'].fields.append( _GETDATACONTRACTHISTORYRESPONSE.fields_by_name['v0']) _GETDATACONTRACTHISTORYRESPONSE.fields_by_name['v0'].containing_oneof = _GETDATACONTRACTHISTORYRESPONSE.oneofs_by_name['version'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST.fields_by_name['values'].message_type = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST.containing_type = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['list'].message_type = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['bool_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['bool_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['int64_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['int64_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['uint64_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['uint64_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['double_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['double_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['text']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['text'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['bytes_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['bytes_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['list']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['list'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'].fields.append( + _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['null_value']) +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['null_value'].containing_oneof = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.oneofs_by_name['variant'] +_GETDOCUMENTSREQUEST_WHERECLAUSE.fields_by_name['operator'].enum_type = _GETDOCUMENTSREQUEST_WHEREOPERATOR +_GETDOCUMENTSREQUEST_WHERECLAUSE.fields_by_name['value'].message_type = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE +_GETDOCUMENTSREQUEST_WHERECLAUSE.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_HAVINGAGGREGATE.fields_by_name['function'].enum_type = _GETDOCUMENTSREQUEST_HAVINGAGGREGATE_FUNCTION +_GETDOCUMENTSREQUEST_HAVINGAGGREGATE.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_HAVINGAGGREGATE_FUNCTION.containing_type = _GETDOCUMENTSREQUEST_HAVINGAGGREGATE +_GETDOCUMENTSREQUEST_HAVINGRANKING.fields_by_name['kind'].enum_type = _GETDOCUMENTSREQUEST_HAVINGRANKING_KIND +_GETDOCUMENTSREQUEST_HAVINGRANKING.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_HAVINGRANKING_KIND.containing_type = _GETDOCUMENTSREQUEST_HAVINGRANKING +_GETDOCUMENTSREQUEST_HAVINGRANKING.oneofs_by_name['_n'].fields.append( + _GETDOCUMENTSREQUEST_HAVINGRANKING.fields_by_name['n']) +_GETDOCUMENTSREQUEST_HAVINGRANKING.fields_by_name['n'].containing_oneof = _GETDOCUMENTSREQUEST_HAVINGRANKING.oneofs_by_name['_n'] +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['aggregate'].message_type = _GETDOCUMENTSREQUEST_HAVINGAGGREGATE +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['operator'].enum_type = _GETDOCUMENTSREQUEST_HAVINGCLAUSE_OPERATOR +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['value'].message_type = _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['ranking'].message_type = _GETDOCUMENTSREQUEST_HAVINGRANKING +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_HAVINGCLAUSE_OPERATOR.containing_type = _GETDOCUMENTSREQUEST_HAVINGCLAUSE +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.oneofs_by_name['right'].fields.append( + _GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['value']) +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['value'].containing_oneof = _GETDOCUMENTSREQUEST_HAVINGCLAUSE.oneofs_by_name['right'] +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.oneofs_by_name['right'].fields.append( + _GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['ranking']) +_GETDOCUMENTSREQUEST_HAVINGCLAUSE.fields_by_name['ranking'].containing_oneof = _GETDOCUMENTSREQUEST_HAVINGCLAUSE.oneofs_by_name['right'] +_GETDOCUMENTSREQUEST_ORDERCLAUSE.fields_by_name['aggregate'].message_type = _GETDOCUMENTSREQUEST_HAVINGAGGREGATE +_GETDOCUMENTSREQUEST_ORDERCLAUSE.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_ORDERCLAUSE.oneofs_by_name['target'].fields.append( + _GETDOCUMENTSREQUEST_ORDERCLAUSE.fields_by_name['field']) +_GETDOCUMENTSREQUEST_ORDERCLAUSE.fields_by_name['field'].containing_oneof = _GETDOCUMENTSREQUEST_ORDERCLAUSE.oneofs_by_name['target'] +_GETDOCUMENTSREQUEST_ORDERCLAUSE.oneofs_by_name['target'].fields.append( + _GETDOCUMENTSREQUEST_ORDERCLAUSE.fields_by_name['aggregate']) +_GETDOCUMENTSREQUEST_ORDERCLAUSE.fields_by_name['aggregate'].containing_oneof = _GETDOCUMENTSREQUEST_ORDERCLAUSE.oneofs_by_name['target'] _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.containing_type = _GETDOCUMENTSREQUEST _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.oneofs_by_name['start'].fields.append( _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.fields_by_name['start_after']) @@ -17192,9 +17880,14 @@ _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.oneofs_by_name['start'].fields.append( _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.fields_by_name['start_at']) _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.fields_by_name['start_at'].containing_oneof = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0.oneofs_by_name['start'] -_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['select'].enum_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT -_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.containing_type = _GETDOCUMENTSREQUEST +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT.fields_by_name['function'].enum_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT_FUNCTION _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT.containing_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1 +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT_FUNCTION.containing_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['where_clauses'].message_type = _GETDOCUMENTSREQUEST_WHERECLAUSE +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['order_by'].message_type = _GETDOCUMENTSREQUEST_ORDERCLAUSE +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['selects'].message_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['having'].message_type = _GETDOCUMENTSREQUEST_HAVINGCLAUSE +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.containing_type = _GETDOCUMENTSREQUEST _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['start'].fields.append( _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['start_after']) _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['start_after'].containing_oneof = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['start'] @@ -17204,8 +17897,12 @@ _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['_limit'].fields.append( _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['limit']) _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['limit'].containing_oneof = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['_limit'] +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['_offset'].fields.append( + _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['offset']) +_GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.fields_by_name['offset'].containing_oneof = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1.oneofs_by_name['_offset'] _GETDOCUMENTSREQUEST.fields_by_name['v0'].message_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0 _GETDOCUMENTSREQUEST.fields_by_name['v1'].message_type = _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1 +_GETDOCUMENTSREQUEST_WHEREOPERATOR.containing_type = _GETDOCUMENTSREQUEST _GETDOCUMENTSREQUEST.oneofs_by_name['version'].fields.append( _GETDOCUMENTSREQUEST.fields_by_name['v0']) _GETDOCUMENTSREQUEST.fields_by_name['v0'].containing_oneof = _GETDOCUMENTSREQUEST.oneofs_by_name['version'] @@ -19239,6 +19936,55 @@ GetDocumentsRequest = _reflection.GeneratedProtocolMessageType('GetDocumentsRequest', (_message.Message,), { + 'DocumentFieldValue' : _reflection.GeneratedProtocolMessageType('DocumentFieldValue', (_message.Message,), { + + 'ValueList' : _reflection.GeneratedProtocolMessageType('ValueList', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE_VALUELIST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList) + }) + , + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue) + }) + , + + 'WhereClause' : _reflection.GeneratedProtocolMessageType('WhereClause', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_WHERECLAUSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause) + }) + , + + 'HavingAggregate' : _reflection.GeneratedProtocolMessageType('HavingAggregate', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_HAVINGAGGREGATE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate) + }) + , + + 'HavingRanking' : _reflection.GeneratedProtocolMessageType('HavingRanking', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_HAVINGRANKING, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking) + }) + , + + 'HavingClause' : _reflection.GeneratedProtocolMessageType('HavingClause', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_HAVINGCLAUSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause) + }) + , + + 'OrderClause' : _reflection.GeneratedProtocolMessageType('OrderClause', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_ORDERCLAUSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause) + }) + , + 'GetDocumentsRequestV0' : _reflection.GeneratedProtocolMessageType('GetDocumentsRequestV0', (_message.Message,), { 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV0, '__module__' : 'platform_pb2' @@ -19247,6 +19993,13 @@ , 'GetDocumentsRequestV1' : _reflection.GeneratedProtocolMessageType('GetDocumentsRequestV1', (_message.Message,), { + + 'Select' : _reflection.GeneratedProtocolMessageType('Select', (_message.Message,), { + 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1_SELECT, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select) + }) + , 'DESCRIPTOR' : _GETDOCUMENTSREQUEST_GETDOCUMENTSREQUESTV1, '__module__' : 'platform_pb2' # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1) @@ -19257,8 +20010,16 @@ # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetDocumentsRequest) }) _sym_db.RegisterMessage(GetDocumentsRequest) +_sym_db.RegisterMessage(GetDocumentsRequest.DocumentFieldValue) +_sym_db.RegisterMessage(GetDocumentsRequest.DocumentFieldValue.ValueList) +_sym_db.RegisterMessage(GetDocumentsRequest.WhereClause) +_sym_db.RegisterMessage(GetDocumentsRequest.HavingAggregate) +_sym_db.RegisterMessage(GetDocumentsRequest.HavingRanking) +_sym_db.RegisterMessage(GetDocumentsRequest.HavingClause) +_sym_db.RegisterMessage(GetDocumentsRequest.OrderClause) _sym_db.RegisterMessage(GetDocumentsRequest.GetDocumentsRequestV0) _sym_db.RegisterMessage(GetDocumentsRequest.GetDocumentsRequestV1) +_sym_db.RegisterMessage(GetDocumentsRequest.GetDocumentsRequestV1.Select) GetDocumentsResponse = _reflection.GeneratedProtocolMessageType('GetDocumentsResponse', (_message.Message,), { @@ -21668,6 +22429,9 @@ _GETIDENTITIESBALANCESRESPONSE_GETIDENTITIESBALANCESRESPONSEV0_IDENTITYBALANCE.fields_by_name['balance']._options = None _GETDATACONTRACTHISTORYREQUEST_GETDATACONTRACTHISTORYREQUESTV0.fields_by_name['start_at_ms']._options = None _GETDATACONTRACTHISTORYRESPONSE_GETDATACONTRACTHISTORYRESPONSEV0_DATACONTRACTHISTORYENTRY.fields_by_name['date']._options = None +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['int64_value']._options = None +_GETDOCUMENTSREQUEST_DOCUMENTFIELDVALUE.fields_by_name['uint64_value']._options = None +_GETDOCUMENTSREQUEST_HAVINGRANKING.fields_by_name['n']._options = None _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_COUNTENTRY.fields_by_name['count']._options = None _GETDOCUMENTSRESPONSE_GETDOCUMENTSRESPONSEV1_COUNTRESULTS.fields_by_name['aggregate_count']._options = None _GETEPOCHSINFORESPONSE_GETEPOCHSINFORESPONSEV0_EPOCHINFO.fields_by_name['first_block_height']._options = None @@ -21725,8 +22489,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=63712, - serialized_end=72851, + serialized_start=65989, + serialized_end=75128, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', diff --git a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py index 20c35720dc1..3295ee4abd6 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2_grpc.py @@ -421,12 +421,7 @@ def getDocuments(self, request, context): raise NotImplementedError('Method not implemented!') def getIdentityByPublicKeyHash(self, request, context): - """`getDocumentsCount` removed in v1: callers express counts via - `getDocuments` with `version.v1.select = COUNT` (optionally - with `group_by`). See `GetDocumentsRequestV1` for the unified - SQL-shaped surface. The v0-count endpoint shipped briefly in - #3623 and never had stable callers; v1 supersedes it entirely. - """ + """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts index c977b021788..de1af1db5a1 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.d.ts @@ -2272,6 +2272,304 @@ export namespace GetDocumentsRequest { v1?: GetDocumentsRequest.GetDocumentsRequestV1.AsObject, } + export class DocumentFieldValue extends jspb.Message { + hasBoolValue(): boolean; + clearBoolValue(): void; + getBoolValue(): boolean; + setBoolValue(value: boolean): void; + + hasInt64Value(): boolean; + clearInt64Value(): void; + getInt64Value(): string; + setInt64Value(value: string): void; + + hasUint64Value(): boolean; + clearUint64Value(): void; + getUint64Value(): string; + setUint64Value(value: string): void; + + hasDoubleValue(): boolean; + clearDoubleValue(): void; + getDoubleValue(): number; + setDoubleValue(value: number): void; + + hasText(): boolean; + clearText(): void; + getText(): string; + setText(value: string): void; + + hasBytesValue(): boolean; + clearBytesValue(): void; + getBytesValue(): Uint8Array | string; + getBytesValue_asU8(): Uint8Array; + getBytesValue_asB64(): string; + setBytesValue(value: Uint8Array | string): void; + + hasList(): boolean; + clearList(): void; + getList(): GetDocumentsRequest.DocumentFieldValue.ValueList | undefined; + setList(value?: GetDocumentsRequest.DocumentFieldValue.ValueList): void; + + hasNullValue(): boolean; + clearNullValue(): void; + getNullValue(): boolean; + setNullValue(value: boolean): void; + + getVariantCase(): DocumentFieldValue.VariantCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DocumentFieldValue.AsObject; + static toObject(includeInstance: boolean, msg: DocumentFieldValue): DocumentFieldValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DocumentFieldValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DocumentFieldValue; + static deserializeBinaryFromReader(message: DocumentFieldValue, reader: jspb.BinaryReader): DocumentFieldValue; + } + + export namespace DocumentFieldValue { + export type AsObject = { + boolValue: boolean, + int64Value: string, + uint64Value: string, + doubleValue: number, + text: string, + bytesValue: Uint8Array | string, + list?: GetDocumentsRequest.DocumentFieldValue.ValueList.AsObject, + nullValue: boolean, + } + + export class ValueList extends jspb.Message { + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: GetDocumentsRequest.DocumentFieldValue, index?: number): GetDocumentsRequest.DocumentFieldValue; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ValueList.AsObject; + static toObject(includeInstance: boolean, msg: ValueList): ValueList.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ValueList, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ValueList; + static deserializeBinaryFromReader(message: ValueList, reader: jspb.BinaryReader): ValueList; + } + + export namespace ValueList { + export type AsObject = { + valuesList: Array, + } + } + + export enum VariantCase { + VARIANT_NOT_SET = 0, + BOOL_VALUE = 1, + INT64_VALUE = 2, + UINT64_VALUE = 3, + DOUBLE_VALUE = 4, + TEXT = 5, + BYTES_VALUE = 6, + LIST = 7, + NULL_VALUE = 8, + } + } + + export class WhereClause extends jspb.Message { + getField(): string; + setField(value: string): void; + + getOperator(): GetDocumentsRequest.WhereOperatorMap[keyof GetDocumentsRequest.WhereOperatorMap]; + setOperator(value: GetDocumentsRequest.WhereOperatorMap[keyof GetDocumentsRequest.WhereOperatorMap]): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): GetDocumentsRequest.DocumentFieldValue | undefined; + setValue(value?: GetDocumentsRequest.DocumentFieldValue): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): WhereClause.AsObject; + static toObject(includeInstance: boolean, msg: WhereClause): WhereClause.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: WhereClause, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): WhereClause; + static deserializeBinaryFromReader(message: WhereClause, reader: jspb.BinaryReader): WhereClause; + } + + export namespace WhereClause { + export type AsObject = { + field: string, + operator: GetDocumentsRequest.WhereOperatorMap[keyof GetDocumentsRequest.WhereOperatorMap], + value?: GetDocumentsRequest.DocumentFieldValue.AsObject, + } + } + + export class HavingAggregate extends jspb.Message { + getFunction(): GetDocumentsRequest.HavingAggregate.FunctionMap[keyof GetDocumentsRequest.HavingAggregate.FunctionMap]; + setFunction(value: GetDocumentsRequest.HavingAggregate.FunctionMap[keyof GetDocumentsRequest.HavingAggregate.FunctionMap]): void; + + getField(): string; + setField(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HavingAggregate.AsObject; + static toObject(includeInstance: boolean, msg: HavingAggregate): HavingAggregate.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HavingAggregate, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HavingAggregate; + static deserializeBinaryFromReader(message: HavingAggregate, reader: jspb.BinaryReader): HavingAggregate; + } + + export namespace HavingAggregate { + export type AsObject = { + pb_function: GetDocumentsRequest.HavingAggregate.FunctionMap[keyof GetDocumentsRequest.HavingAggregate.FunctionMap], + field: string, + } + + export interface FunctionMap { + COUNT: 0; + SUM: 1; + AVG: 2; + } + + export const Function: FunctionMap; + } + + export class HavingRanking extends jspb.Message { + getKind(): GetDocumentsRequest.HavingRanking.KindMap[keyof GetDocumentsRequest.HavingRanking.KindMap]; + setKind(value: GetDocumentsRequest.HavingRanking.KindMap[keyof GetDocumentsRequest.HavingRanking.KindMap]): void; + + hasN(): boolean; + clearN(): void; + getN(): string; + setN(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HavingRanking.AsObject; + static toObject(includeInstance: boolean, msg: HavingRanking): HavingRanking.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HavingRanking, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HavingRanking; + static deserializeBinaryFromReader(message: HavingRanking, reader: jspb.BinaryReader): HavingRanking; + } + + export namespace HavingRanking { + export type AsObject = { + kind: GetDocumentsRequest.HavingRanking.KindMap[keyof GetDocumentsRequest.HavingRanking.KindMap], + n: string, + } + + export interface KindMap { + MIN: 0; + MAX: 1; + TOP: 2; + BOTTOM: 3; + } + + export const Kind: KindMap; + } + + export class HavingClause extends jspb.Message { + hasAggregate(): boolean; + clearAggregate(): void; + getAggregate(): GetDocumentsRequest.HavingAggregate | undefined; + setAggregate(value?: GetDocumentsRequest.HavingAggregate): void; + + getOperator(): GetDocumentsRequest.HavingClause.OperatorMap[keyof GetDocumentsRequest.HavingClause.OperatorMap]; + setOperator(value: GetDocumentsRequest.HavingClause.OperatorMap[keyof GetDocumentsRequest.HavingClause.OperatorMap]): void; + + hasValue(): boolean; + clearValue(): void; + getValue(): GetDocumentsRequest.DocumentFieldValue | undefined; + setValue(value?: GetDocumentsRequest.DocumentFieldValue): void; + + hasRanking(): boolean; + clearRanking(): void; + getRanking(): GetDocumentsRequest.HavingRanking | undefined; + setRanking(value?: GetDocumentsRequest.HavingRanking): void; + + getRightCase(): HavingClause.RightCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): HavingClause.AsObject; + static toObject(includeInstance: boolean, msg: HavingClause): HavingClause.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: HavingClause, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): HavingClause; + static deserializeBinaryFromReader(message: HavingClause, reader: jspb.BinaryReader): HavingClause; + } + + export namespace HavingClause { + export type AsObject = { + aggregate?: GetDocumentsRequest.HavingAggregate.AsObject, + operator: GetDocumentsRequest.HavingClause.OperatorMap[keyof GetDocumentsRequest.HavingClause.OperatorMap], + value?: GetDocumentsRequest.DocumentFieldValue.AsObject, + ranking?: GetDocumentsRequest.HavingRanking.AsObject, + } + + export interface OperatorMap { + EQUAL: 0; + NOT_EQUAL: 1; + GREATER_THAN: 2; + GREATER_THAN_OR_EQUALS: 3; + LESS_THAN: 4; + LESS_THAN_OR_EQUALS: 5; + BETWEEN: 6; + BETWEEN_EXCLUDE_BOUNDS: 7; + BETWEEN_EXCLUDE_LEFT: 8; + BETWEEN_EXCLUDE_RIGHT: 9; + IN: 10; + } + + export const Operator: OperatorMap; + + export enum RightCase { + RIGHT_NOT_SET = 0, + VALUE = 3, + RANKING = 4, + } + } + + export class OrderClause extends jspb.Message { + hasField(): boolean; + clearField(): void; + getField(): string; + setField(value: string): void; + + hasAggregate(): boolean; + clearAggregate(): void; + getAggregate(): GetDocumentsRequest.HavingAggregate | undefined; + setAggregate(value?: GetDocumentsRequest.HavingAggregate): void; + + getAscending(): boolean; + setAscending(value: boolean): void; + + getTargetCase(): OrderClause.TargetCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): OrderClause.AsObject; + static toObject(includeInstance: boolean, msg: OrderClause): OrderClause.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: OrderClause, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): OrderClause; + static deserializeBinaryFromReader(message: OrderClause, reader: jspb.BinaryReader): OrderClause; + } + + export namespace OrderClause { + export type AsObject = { + field: string, + aggregate?: GetDocumentsRequest.HavingAggregate.AsObject, + ascending: boolean, + } + + export enum TargetCase { + TARGET_NOT_SET = 0, + FIELD = 1, + AGGREGATE = 3, + } + } + export class GetDocumentsRequestV0 extends jspb.Message { getDataContractId(): Uint8Array | string; getDataContractId_asU8(): Uint8Array; @@ -2350,15 +2648,15 @@ export namespace GetDocumentsRequest { getDocumentType(): string; setDocumentType(value: string): void; - getWhere(): Uint8Array | string; - getWhere_asU8(): Uint8Array; - getWhere_asB64(): string; - setWhere(value: Uint8Array | string): void; + clearWhereClausesList(): void; + getWhereClausesList(): Array; + setWhereClausesList(value: Array): void; + addWhereClauses(value?: GetDocumentsRequest.WhereClause, index?: number): GetDocumentsRequest.WhereClause; - getOrderBy(): Uint8Array | string; - getOrderBy_asU8(): Uint8Array; - getOrderBy_asB64(): string; - setOrderBy(value: Uint8Array | string): void; + clearOrderByList(): void; + getOrderByList(): Array; + setOrderByList(value: Array): void; + addOrderBy(value?: GetDocumentsRequest.OrderClause, index?: number): GetDocumentsRequest.OrderClause; hasLimit(): boolean; clearLimit(): void; @@ -2382,18 +2680,25 @@ export namespace GetDocumentsRequest { getProve(): boolean; setProve(value: boolean): void; - getSelect(): GetDocumentsRequest.GetDocumentsRequestV1.SelectMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.SelectMap]; - setSelect(value: GetDocumentsRequest.GetDocumentsRequestV1.SelectMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.SelectMap]): void; + clearSelectsList(): void; + getSelectsList(): Array; + setSelectsList(value: Array): void; + addSelects(value?: GetDocumentsRequest.GetDocumentsRequestV1.Select, index?: number): GetDocumentsRequest.GetDocumentsRequestV1.Select; clearGroupByList(): void; getGroupByList(): Array; setGroupByList(value: Array): void; addGroupBy(value: string, index?: number): string; - getHaving(): Uint8Array | string; - getHaving_asU8(): Uint8Array; - getHaving_asB64(): string; - setHaving(value: Uint8Array | string): void; + clearHavingList(): void; + getHavingList(): Array; + setHavingList(value: Array): void; + addHaving(value?: GetDocumentsRequest.HavingClause, index?: number): GetDocumentsRequest.HavingClause; + + hasOffset(): boolean; + clearOffset(): void; + getOffset(): number; + setOffset(value: number): void; getStartCase(): GetDocumentsRequestV1.StartCase; serializeBinary(): Uint8Array; @@ -2410,23 +2715,52 @@ export namespace GetDocumentsRequest { export type AsObject = { dataContractId: Uint8Array | string, documentType: string, - where: Uint8Array | string, - orderBy: Uint8Array | string, + whereClausesList: Array, + orderByList: Array, limit: number, startAfter: Uint8Array | string, startAt: Uint8Array | string, prove: boolean, - select: GetDocumentsRequest.GetDocumentsRequestV1.SelectMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.SelectMap], + selectsList: Array, groupByList: Array, - having: Uint8Array | string, + havingList: Array, + offset: number, } - export interface SelectMap { - DOCUMENTS: 0; - COUNT: 1; + export class Select extends jspb.Message { + getFunction(): GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap]; + setFunction(value: GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap]): void; + + getField(): string; + setField(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Select.AsObject; + static toObject(includeInstance: boolean, msg: Select): Select.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Select, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Select; + static deserializeBinaryFromReader(message: Select, reader: jspb.BinaryReader): Select; } - export const Select: SelectMap; + export namespace Select { + export type AsObject = { + pb_function: GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap[keyof GetDocumentsRequest.GetDocumentsRequestV1.Select.FunctionMap], + field: string, + } + + export interface FunctionMap { + DOCUMENTS: 0; + COUNT: 1; + SUM: 2; + AVG: 3; + MIN: 4; + MAX: 5; + } + + export const Function: FunctionMap; + } export enum StartCase { START_NOT_SET = 0, @@ -2435,6 +2769,22 @@ export namespace GetDocumentsRequest { } } + export interface WhereOperatorMap { + EQUAL: 0; + GREATER_THAN: 1; + GREATER_THAN_OR_EQUALS: 2; + LESS_THAN: 3; + LESS_THAN_OR_EQUALS: 4; + BETWEEN: 5; + BETWEEN_EXCLUDE_BOUNDS: 6; + BETWEEN_EXCLUDE_LEFT: 7; + BETWEEN_EXCLUDE_RIGHT: 8; + IN: 9; + STARTS_WITH: 10; + } + + export const WhereOperator: WhereOperatorMap; + export enum VersionCase { VERSION_NOT_SET = 0, V0 = 1, diff --git a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js index 7e9deb3b0c3..4fbca79fcf1 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -151,12 +151,27 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetD goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0.ResultCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDataContractsResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.StartCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.Documents', null, { proto }); @@ -2163,6 +2178,153 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -2205,6 +2367,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.displayName = 'proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -24238,6 +24421,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = fu }; +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator = { + EQUAL: 0, + GREATER_THAN: 1, + GREATER_THAN_OR_EQUALS: 2, + LESS_THAN: 3, + LESS_THAN_OR_EQUALS: 4, + BETWEEN: 5, + BETWEEN_EXCLUDE_BOUNDS: 6, + BETWEEN_EXCLUDE_LEFT: 7, + BETWEEN_EXCLUDE_RIGHT: 8, + IN: 9, + STARTS_WITH: 10 +}; + /** * Oneof group definitions for this message. Each group defines the field @@ -24247,22 +24447,28 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.serializeBinaryToWriter = fu * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_ = [[1,2,3,4,5,6,7,8]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { - START_NOT_SET: 0, - START_AFTER: 6, - START_AT: 7 +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase = { + VARIANT_NOT_SET: 0, + BOOL_VALUE: 1, + INT64_VALUE: 2, + UINT64_VALUE: 3, + DOUBLE_VALUE: 4, + TEXT: 5, + BYTES_VALUE: 6, + LIST: 7, + NULL_VALUE: 8 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getVariantCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.VariantCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0])); }; @@ -24280,8 +24486,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(opt_includeInstance, this); }; @@ -24290,20 +24496,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject = function(includeInstance, msg) { var f, obj = { - dataContractId: msg.getDataContractId_asB64(), - documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), - limit: jspb.Message.getFieldWithDefault(msg, 5, 0), - startAfter: msg.getStartAfter_asB64(), - startAt: msg.getStartAt_asB64(), - prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + int64Value: jspb.Message.getFieldWithDefault(msg, 2, "0"), + uint64Value: jspb.Message.getFieldWithDefault(msg, 3, "0"), + doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + text: jspb.Message.getFieldWithDefault(msg, 5, ""), + bytesValue: msg.getBytesValue_asB64(), + list: (f = msg.getList()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(includeInstance, f), + nullValue: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) }; if (includeInstance) { @@ -24317,23 +24523,23 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObje /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; - return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -24341,36 +24547,37 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setDataContractId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setBoolValue(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setDocumentType(value); + var value = /** @type {string} */ (reader.readSint64String()); + msg.setInt64Value(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setUint64Value(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); + var value = /** @type {number} */ (reader.readDouble()); + msg.setDoubleValue(value); break; case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setLimit(value); + var value = /** @type {string} */ (reader.readString()); + msg.setText(value); break; case 6: var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAfter(value); + msg.setBytesValue(value); break; case 7: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setStartAt(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader); + msg.setList(value); break; case 8: var value = /** @type {boolean} */ (reader.readBool()); - msg.setProve(value); + msg.setNullValue(value); break; default: reader.skipField(); @@ -24385,9 +24592,9 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deseri * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -24395,43 +24602,43 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDataContractId_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( 1, f ); } - f = message.getDocumentType(); - if (f.length > 0) { - writer.writeString( + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeSint64String( 2, f ); } - f = message.getWhere_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64String( 3, f ); } - f = message.getOrderBy_asU8(); - if (f.length > 0) { - writer.writeBytes( + f = /** @type {number} */ (jspb.Message.getField(message, 4)); + if (f != null) { + writer.writeDouble( 4, f ); } - f = message.getLimit(); - if (f !== 0) { - writer.writeUint32( + f = /** @type {string} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeString( 5, f ); @@ -24443,15 +24650,16 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serial f ); } - f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + f = message.getList(); if (f != null) { - writer.writeBytes( + writer.writeMessage( 7, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter ); } - f = message.getProve(); - if (f) { + f = /** @type {boolean} */ (jspb.Message.getField(message, 8)); + if (f != null) { writer.writeBool( 8, f @@ -24460,33 +24668,1877 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serial }; -/** - * optional bytes data_contract_id = 1; - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - /** - * optional bytes data_contract_id = 1; - * This is a type-conversion wrapper around `getDataContractId()` - * @return {string} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getDataContractId())); -}; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bytes data_contract_id = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getDataContractId()` - * @return {!Uint8Array} - */ + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.toObject = function(includeInstance, msg) { + var f, obj = { + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated DocumentFieldValue values = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.setValuesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList.prototype.clearValuesList = function() { + return this.setValuesList([]); +}; + + +/** + * optional bool bool_value = 1; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBoolValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setBoolValue = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearBoolValue = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasBoolValue = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional sint64 int64_value = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getInt64Value = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setInt64Value = function(value) { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearInt64Value = function() { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasInt64Value = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 uint64_value = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getUint64Value = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setUint64Value = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearUint64Value = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasUint64Value = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional double double_value = 4; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getDoubleValue = function() { + return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setDoubleValue = function(value) { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearDoubleValue = function() { + return jspb.Message.setOneofField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasDoubleValue = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional string text = 5; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getText = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setText = function(value) { + return jspb.Message.setOneofField(this, 5, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearText = function() { + return jspb.Message.setOneofField(this, 5, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasText = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional bytes bytes_value = 6; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * optional bytes bytes_value = 6; + * This is a type-conversion wrapper around `getBytesValue()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getBytesValue())); +}; + + +/** + * optional bytes bytes_value = 6; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getBytesValue()` + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getBytesValue_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getBytesValue())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setBytesValue = function(value) { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearBytesValue = function() { + return jspb.Message.setOneofField(this, 6, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasBytesValue = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ValueList list = 7; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getList = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList, 7)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.ValueList|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setList = function(value) { + return jspb.Message.setOneofWrapperField(this, 7, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearList = function() { + return this.setList(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasList = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional bool null_value = 8; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.getNullValue = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.setNullValue = function(value) { + return jspb.Message.setOneofField(this, 8, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.clearNullValue = function() { + return jspb.Message.setOneofField(this, 8, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.prototype.hasNullValue = function() { + return jspb.Message.getField(this, 8) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + operator: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: (f = msg.getValue()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 2: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} */ (reader.readEnum()); + msg.setOperator(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOperator(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional WhereOperator operator = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getOperator = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereOperator} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setOperator = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional DocumentFieldValue value = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.getValue = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.setValue = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.prototype.hasValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject = function(includeInstance, msg) { + var f, obj = { + pb_function: jspb.Message.getFieldWithDefault(msg, 1, 0), + field: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} */ (reader.readEnum()); + msg.setFunction(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFunction(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function = { + COUNT: 0, + SUM: 1, + AVG: 2 +}; + +/** + * optional Function function = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.getFunction = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.Function} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.setFunction = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject = function(includeInstance, msg) { + var f, obj = { + kind: jspb.Message.getFieldWithDefault(msg, 1, 0), + n: jspb.Message.getFieldWithDefault(msg, 2, "0") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} */ (reader.readEnum()); + msg.setKind(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setN(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getKind(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64String( + 2, + f + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind = { + MIN: 0, + MAX: 1, + TOP: 2, + BOTTOM: 3 +}; + +/** + * optional Kind kind = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.getKind = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.Kind} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.setKind = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional uint64 n = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.getN = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.setN = function(value) { + return jspb.Message.setField(this, 2, value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.clearN = function() { + return jspb.Message.setField(this, 2, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.prototype.hasN = function() { + return jspb.Message.getField(this, 2) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_ = [[3,4]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase = { + RIGHT_NOT_SET: 0, + VALUE: 3, + RANKING: 4 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getRightCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.RightCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject = function(includeInstance, msg) { + var f, obj = { + aggregate: (f = msg.getAggregate()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(includeInstance, f), + operator: jspb.Message.getFieldWithDefault(msg, 2, 0), + value: (f = msg.getValue()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.toObject(includeInstance, f), + ranking: (f = msg.getRanking()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader); + msg.setAggregate(value); + break; + case 2: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} */ (reader.readEnum()); + msg.setOperator(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.deserializeBinaryFromReader); + msg.setValue(value); + break; + case 4: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.deserializeBinaryFromReader); + msg.setRanking(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAggregate(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter + ); + } + f = message.getOperator(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getValue(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue.serializeBinaryToWriter + ); + } + f = message.getRanking(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking.serializeBinaryToWriter + ); + } +}; + + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator = { + EQUAL: 0, + NOT_EQUAL: 1, + GREATER_THAN: 2, + GREATER_THAN_OR_EQUALS: 3, + LESS_THAN: 4, + LESS_THAN_OR_EQUALS: 5, + BETWEEN: 6, + BETWEEN_EXCLUDE_BOUNDS: 7, + BETWEEN_EXCLUDE_LEFT: 8, + BETWEEN_EXCLUDE_RIGHT: 9, + IN: 10 +}; + +/** + * optional HavingAggregate aggregate = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getAggregate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setAggregate = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearAggregate = function() { + return this.setAggregate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasAggregate = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional Operator operator = 2; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getOperator = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.Operator} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setOperator = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional DocumentFieldValue value = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getValue = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.DocumentFieldValue|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setValue = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearValue = function() { + return this.setValue(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasValue = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional HavingRanking ranking = 4; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.getRanking = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking, 4)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingRanking|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.setRanking = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.clearRanking = function() { + return this.setRanking(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.prototype.hasRanking = function() { + return jspb.Message.getField(this, 4) != null; +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_ = [[1,3]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase = { + TARGET_NOT_SET: 0, + FIELD: 1, + AGGREGATE: 3 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getTargetCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.TargetCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject = function(includeInstance, msg) { + var f, obj = { + field: jspb.Message.getFieldWithDefault(msg, 1, ""), + aggregate: (f = msg.getAggregate()) && proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.toObject(includeInstance, f), + ascending: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.deserializeBinaryFromReader); + msg.setAggregate(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setAscending(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = /** @type {string} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeString( + 1, + f + ); + } + f = message.getAggregate(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate.serializeBinaryToWriter + ); + } + f = message.getAscending(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional string field = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setField = function(value) { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.clearField = function() { + return jspb.Message.setOneofField(this, 1, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.hasField = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional HavingAggregate aggregate = 3; + * @return {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getAggregate = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate, 3)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingAggregate|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setAggregate = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.clearAggregate = function() { + return this.setAggregate(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.hasAggregate = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional bool ascending = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.getAscending = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.prototype.setAscending = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_ = [[6,7]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase = { + START_NOT_SET: 0, + START_AFTER: 6, + START_AT: 7 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getStartCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.StartCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + dataContractId: msg.getDataContractId_asB64(), + documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), + where: msg.getWhere_asB64(), + orderBy: msg.getOrderBy_asB64(), + limit: jspb.Message.getFieldWithDefault(msg, 5, 0), + startAfter: msg.getStartAfter_asB64(), + startAt: msg.getStartAt_asB64(), + prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setDataContractId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDocumentType(value); + break; + case 3: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setWhere(value); + break; + case 4: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setOrderBy(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint32()); + msg.setLimit(value); + break; + case 6: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAfter(value); + break; + case 7: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setStartAt(value); + break; + case 8: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setProve(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDataContractId_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getDocumentType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWhere_asU8(); + if (f.length > 0) { + writer.writeBytes( + 3, + f + ); + } + f = message.getOrderBy_asU8(); + if (f.length > 0) { + writer.writeBytes( + 4, + f + ); + } + f = message.getLimit(); + if (f !== 0) { + writer.writeUint32( + 5, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeBytes( + 6, + f + ); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); + if (f != null) { + writer.writeBytes( + 7, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 8, + f + ); + } +}; + + +/** + * optional bytes data_contract_id = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes data_contract_id = 1; + * This is a type-conversion wrapper around `getDataContractId()` + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getDataContractId())); +}; + + +/** + * optional bytes data_contract_id = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getDataContractId()` + * @return {!Uint8Array} + */ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.prototype.getDataContractId_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getDataContractId())); @@ -24766,7 +26818,7 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0.protot * @private {!Array} * @const */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.repeatedFields_ = [10]; +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.repeatedFields_ = [3,4,9,10,11]; /** * Oneof group definitions for this message. Each group defines the field @@ -24827,15 +26879,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.toObje var f, obj = { dataContractId: msg.getDataContractId_asB64(), documentType: jspb.Message.getFieldWithDefault(msg, 2, ""), - where: msg.getWhere_asB64(), - orderBy: msg.getOrderBy_asB64(), + whereClausesList: jspb.Message.toObjectList(msg.getWhereClausesList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.toObject, includeInstance), + orderByList: jspb.Message.toObjectList(msg.getOrderByList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.toObject, includeInstance), limit: jspb.Message.getFieldWithDefault(msg, 5, 0), startAfter: msg.getStartAfter_asB64(), startAt: msg.getStartAt_asB64(), prove: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - select: jspb.Message.getFieldWithDefault(msg, 9, 0), + selectsList: jspb.Message.toObjectList(msg.getSelectsList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject, includeInstance), groupByList: (f = jspb.Message.getRepeatedField(msg, 10)) == null ? undefined : f, - having: msg.getHaving_asB64() + havingList: jspb.Message.toObjectList(msg.getHavingList(), + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.toObject, includeInstance), + offset: jspb.Message.getFieldWithDefault(msg, 12, 0) }; if (includeInstance) { @@ -24881,12 +26938,14 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.deseri msg.setDocumentType(value); break; case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setWhere(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.deserializeBinaryFromReader); + msg.addWhereClauses(value); break; case 4: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setOrderBy(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.deserializeBinaryFromReader); + msg.addOrderBy(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); @@ -24905,16 +26964,22 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.deseri msg.setProve(value); break; case 9: - var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ (reader.readEnum()); - msg.setSelect(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader); + msg.addSelects(value); break; case 10: var value = /** @type {string} */ (reader.readString()); msg.addGroupBy(value); break; case 11: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setHaving(value); + var value = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.deserializeBinaryFromReader); + msg.addHaving(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOffset(value); break; default: reader.skipField(); @@ -24959,18 +27024,20 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getWhere_asU8(); + f = message.getWhereClausesList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 3, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause.serializeBinaryToWriter ); } - f = message.getOrderBy_asU8(); + f = message.getOrderByList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 4, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause.serializeBinaryToWriter ); } f = /** @type {number} */ (jspb.Message.getField(message, 5)); @@ -25001,11 +27068,12 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getSelect(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getSelectsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 9, - f + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter ); } f = message.getGroupByList(); @@ -25015,10 +27083,142 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial f ); } - f = message.getHaving_asU8(); + f = message.getHavingList(); if (f.length > 0) { - writer.writeBytes( + writer.writeRepeatedMessage( 11, + f, + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause.serializeBinaryToWriter + ); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint32( + 12, + f + ); + } +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.toObject = function(includeInstance, msg) { + var f, obj = { + pb_function: jspb.Message.getFieldWithDefault(msg, 1, 0), + field: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select; + return proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} */ (reader.readEnum()); + msg.setFunction(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setField(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFunction(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getField(); + if (f.length > 0) { + writer.writeString( + 2, f ); } @@ -25028,11 +27228,51 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.serial /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select = { +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function = { DOCUMENTS: 0, - COUNT: 1 + COUNT: 1, + SUM: 2, + AVG: 3, + MIN: 4, + MAX: 5 +}; + +/** + * optional Function function = 1; + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.getFunction = function() { + return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.Function} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.setFunction = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string field = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.getField = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select.prototype.setField = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + /** * optional bytes data_contract_id = 1; * @return {string} @@ -25094,86 +27334,78 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional bytes where = 3; - * @return {string} + * repeated WhereClause where_clauses = 3; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhereClausesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, 3)); }; /** - * optional bytes where = 3; - * This is a type-conversion wrapper around `getWhere()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getWhere())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setWhereClausesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** - * optional bytes where = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getWhere()` - * @return {!Uint8Array} + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getWhere_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getWhere())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addWhereClauses = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.WhereClause, opt_index); }; /** - * @param {!(string|Uint8Array)} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setWhere = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearWhereClausesList = function() { + return this.setWhereClausesList([]); }; /** - * optional bytes order_by = 4; - * @return {string} + * repeated OrderClause order_by = 4; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderByList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, 4)); }; /** - * optional bytes order_by = 4; - * This is a type-conversion wrapper around `getOrderBy()` - * @return {string} - */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getOrderBy())); + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOrderByList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 4, value); }; /** - * optional bytes order_by = 4; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getOrderBy()` - * @return {!Uint8Array} + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOrderBy_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getOrderBy())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addOrderBy = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.OrderClause, opt_index); }; /** - * @param {!(string|Uint8Array)} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOrderBy = function(value) { - return jspb.Message.setProto3BytesField(this, 4, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearOrderByList = function() { + return this.setOrderByList([]); }; @@ -25352,20 +27584,40 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional Select select = 9; + * repeated Select selects = 9; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getSelectsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, 9)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setSelectsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 9, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select=} opt_value + * @param {number=} opt_index * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getSelect = function() { - return /** @type {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addSelects = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select, opt_index); }; /** - * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.Select} value + * Clears the list making it empty but non-null. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setSelect = function(value) { - return jspb.Message.setProto3EnumField(this, 9, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearSelectsList = function() { + return this.setSelectsList([]); }; @@ -25407,44 +27659,76 @@ proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.protot /** - * optional bytes having = 11; - * @return {string} + * repeated HavingClause having = 11; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHavingList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, 11)); }; /** - * optional bytes having = 11; - * This is a type-conversion wrapper around `getHaving()` - * @return {string} + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this +*/ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setHavingList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause} */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getHaving())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.addHaving = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.org.dash.platform.dapi.v0.GetDocumentsRequest.HavingClause, opt_index); }; /** - * optional bytes having = 11; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getHaving()` - * @return {!Uint8Array} + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getHaving_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getHaving())); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearHavingList = function() { + return this.setHavingList([]); }; /** - * @param {!(string|Uint8Array)} value + * optional uint32 offset = 12; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.getOffset = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setOffset = function(value) { + return jspb.Message.setField(this, 12, value); +}; + + +/** + * Clears the field making it undefined. * @return {!proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1} returns this */ -proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.setHaving = function(value) { - return jspb.Message.setProto3BytesField(this, 11, value); +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.clearOffset = function() { + return jspb.Message.setField(this, 12, undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV1.prototype.hasOffset = function() { + return jspb.Message.getField(this, 12) != null; }; diff --git a/packages/dapi-grpc/protos/platform/v0/platform.proto b/packages/dapi-grpc/protos/platform/v0/platform.proto index e1c0564a280..1a41a68ab80 100644 --- a/packages/dapi-grpc/protos/platform/v0/platform.proto +++ b/packages/dapi-grpc/protos/platform/v0/platform.proto @@ -577,6 +577,221 @@ message GetDataContractHistoryResponse { } message GetDocumentsRequest { + // Comparison operator for a single `WhereClause`. Wire values + // mirror `drive::query::WhereOperator` 1:1; the server maps the + // enum discriminant directly without re-parsing operator strings. + // + // `BETWEEN*` operators expect the right-hand operand to be a + // 2-element `DocumentFieldValue.list` carrying `[lower, upper]`; + // `IN` expects a `list` of candidate values; all other operators + // expect a scalar `DocumentFieldValue` matching the indexed + // field's type. + enum WhereOperator { + EQUAL = 0; + GREATER_THAN = 1; + GREATER_THAN_OR_EQUALS = 2; + LESS_THAN = 3; + LESS_THAN_OR_EQUALS = 4; + BETWEEN = 5; + BETWEEN_EXCLUDE_BOUNDS = 6; + BETWEEN_EXCLUDE_LEFT = 7; + BETWEEN_EXCLUDE_RIGHT = 8; + IN = 9; + STARTS_WITH = 10; + } + + // Tagged scalar (or list) operand for a `WhereClause`. The + // variant the caller picks names the wire-level primitive type + // only — the **document type's schema** is the source of truth + // for the indexed field's actual type, and the server coerces + // each variant through the schema-driven + // `document_type.serialize_value_for_key(field, value, …)` path + // (the same path the CBOR-shaped v0 request flows through). That + // means: + // + // - Identifier-typed fields accept either a `bytes_value` (raw + // 32 bytes) **or** a `text` (base58-encoded). The schema + // decides; callers don't need a dedicated identifier variant. + // - Fixed-width byte fields (e.g. `Bytes20`/`Bytes36`) accept + // `bytes_value` of the appropriate length; the schema + // validates the size. + // - Numeric fields accept the closest-fit signed (`int64_value`) + // or unsigned (`uint64_value`) variant; the schema coerces to + // the indexed type (`u8` … `u64`/`i8` … `i64`/`u128`/`i128`). + // - String / bool fields accept `text` / `bool_value`. + // + // The `null_value` variant is the typed-wire equivalent of a CBOR + // `null` operand on the v0 path. Callers should NOT use it for + // "no clause" — empty where-clauses are still expressed by + // leaving `GetDocumentsRequestV1.where_clauses` empty. It exists + // for clauses that legitimately compare against `null` (e.g. + // queries on schema-nullable index entries from the v0 wire that + // round-trip through the v1 surface). + message DocumentFieldValue { + // Recursive list — operand for `IN` (candidate values) and + // `BETWEEN*` (exactly 2 values `[lower, upper]`). Nested + // `list` is structurally allowed but every supported document + // index value-type is currently scalar, so callers should not + // need to nest. + message ValueList { repeated DocumentFieldValue values = 1; } + + oneof variant { + bool bool_value = 1; + sint64 int64_value = 2 [jstype = JS_STRING]; + uint64 uint64_value = 3 [jstype = JS_STRING]; + double double_value = 4; + string text = 5; + bytes bytes_value = 6; + ValueList list = 7; + // `bool` payload is a placeholder — only the discriminant + // matters. Picking the variant means "this operand is null"; + // the bool value itself is ignored on the server. + bool null_value = 8; + } + } + + // Single `field value` clause. The server reassembles a + // `Vec` from the request's `where_clauses` field, + // runs the same `WhereClause::group_clauses` validator (rejects + // duplicate / conflicting same-field clauses) and the same + // `> AND <` → `between*` canonicalizer the CBOR-shaped path uses, + // then hands the structured clauses to the executor. Wire + // semantics are identical to v0's CBOR `[field, op, value]` + // triples — only the envelope differs. + message WhereClause { + string field = 1; + WhereOperator operator = 2; + DocumentFieldValue value = 3; + } + + // Per-group aggregate operand for the left side of a + // `HavingClause`. Only the per-group aggregates live here: + // `MIN` / `MAX` / `TOP` / `BOTTOM` are **cross-group** ranking + // primitives and appear on the right side via `HavingRanking`. + // + // **Field semantics by function**: + // - `COUNT`: empty `field` means `COUNT(*)` (group cardinality); + // non-empty `field` means `COUNT(field)` (count of non-null + // values of `field` in the group). + // - `SUM` / `AVG`: `field` is required. + message HavingAggregate { + enum Function { + COUNT = 0; + SUM = 1; + AVG = 2; + } + Function function = 1; + // Required for every function except `COUNT`; for `COUNT` an + // empty `field` means `COUNT(*)`. + string field = 2; + } + + // Cross-group ranking primitive on the right side of a + // `HavingClause`. The ranking is computed over the set of + // group-aggregate results (one per `GROUP BY` row), so + // `HAVING COUNT(*) EQ MAX` selects groups whose count equals + // the maximum count across all groups, and + // `HAVING COUNT(*) IN TOP(5)` selects groups whose count is + // among the five largest. Concise way to express top-N / + // bottom-N selection without window functions or + // `ORDER BY` + `LIMIT`. + // + // **Operator compatibility**: + // - Scalar operators (`=`, `!=`, `<`, `<=`, `>`, `>=`) work + // with `MIN` / `MAX`. `TOP` / `BOTTOM` with scalar operators + // only make sense when `n=1` (the single largest / smallest); + // evaluation rejects other combinations as ambiguous. + // - `IN` works with `TOP(n)` / `BOTTOM(n)` for set membership. + // - `BETWEEN*` doesn't compose meaningfully with rankings and + // is rejected at evaluation time. + message HavingRanking { + enum Kind { + MIN = 0; + MAX = 1; + TOP = 2; + BOTTOM = 3; + } + Kind kind = 1; + // N-th rank for `TOP` / `BOTTOM` (1-indexed: `n=1` is the + // single largest / smallest). Required for those two kinds; + // must be unset for `MIN` / `MAX`. The wire allows setting + // it on `MIN` / `MAX` for forward compatibility, but + // evaluation rejects it as a malformed ranking. + optional uint64 n = 2 [jstype = JS_STRING]; + } + + // Single `HAVING ` clause. Multiple + // entries in `GetDocumentsRequestV1.having` combine with + // implicit AND — same semantics as multiple `where_clauses` + // entries. `HAVING COUNT(*) > 5 AND SUM(amount) > 100` is two + // `HavingClause` rows, not a tree. + // + // The operator set mirrors `WhereOperator` minus `STARTS_WITH` + // (prefix matching has no natural meaning against a scalar + // aggregate result, even a string-typed one). `BETWEEN*` and + // `IN` operand semantics match `WhereOperator`: `BETWEEN*` + // expects a 2-element `DocumentFieldValue.list` carrying + // `[lower, upper]`, and `IN` expects a `list` of candidate + // values (or a ranking set via `right.ranking`). + // + // The `right` oneof carries either a concrete + // `DocumentFieldValue` (literal comparison target) or a + // `HavingRanking` (cross-group reference). Exactly one is set; + // the wire rejects an unset `right`. + message HavingClause { + enum Operator { + EQUAL = 0; + NOT_EQUAL = 1; + GREATER_THAN = 2; + GREATER_THAN_OR_EQUALS = 3; + LESS_THAN = 4; + LESS_THAN_OR_EQUALS = 5; + BETWEEN = 6; + BETWEEN_EXCLUDE_BOUNDS = 7; + BETWEEN_EXCLUDE_LEFT = 8; + BETWEEN_EXCLUDE_RIGHT = 9; + IN = 10; + } + HavingAggregate aggregate = 1; + Operator operator = 2; + oneof right { + DocumentFieldValue value = 3; + HavingRanking ranking = 4; + } + } + + // Single `ORDER BY field ` clause. Multi-field + // ordering is expressed by repeating this message at the + // request level (`repeated OrderClause order_by = 4`), matching + // SQL's `ORDER BY a ASC, b DESC` shape. + // Single ORDER BY entry. Multi-entry ordering is expressed by + // repeating this message at the request level. + // + // The `target` oneof carries either a plain field name + // (`ORDER BY field`) or an aggregate function applied to a + // field (`ORDER BY COUNT(*)`, `ORDER BY SUM(amount)`) — the + // latter sorts per-group result rows produced by `GROUP BY`, + // useful with `LIMIT` for top-N / bottom-N selection at the + // routing layer (overlapping `HavingRanking::Top` / `Bottom` + // but more general because the ranking field can be any + // aggregate, not just count). + // + // **Aggregate target currently rejected** with + // `Unsupported("ORDER BY on aggregate is not yet implemented")`. + // The wire surface is shipped now so callers can encode the + // shape ahead of server support landing. + message OrderClause { + oneof target { + // Plain field name. Today's evaluated form. + string field = 1; + // Aggregate function applied to a field, sorted by the + // per-group result. `function = DOCUMENTS` is invalid + // here — DOCUMENTS isn't an aggregate. + HavingAggregate aggregate = 3; + } + bool ascending = 2; + } + message GetDocumentsRequestV0 { bytes data_contract_id = 1; // The ID of the data contract containing the documents @@ -609,16 +824,20 @@ message GetDocumentsRequest { // * `select = COUNT, group_by = []`: return per-group // `CountEntry` rows. Only supported when the grouping field // matches an `In`-constrained or range-constrained where clause; - // other shapes return `Unsupported` (see Phase 1 notes below). + // other shapes return `Unsupported` (see supported-shape table + // below). // - // `having` is wire-reserved for Phase 2. Any non-empty `having` - // value returns `Unsupported("HAVING clause is not yet - // implemented")` regardless of `select` / `group_by`. + // `having` is wire-reserved for a future server capability. Any + // non-empty `having` list currently returns + // `Unsupported("HAVING clause is not yet implemented")` + // regardless of `select` / `group_by`. The wire shape is + // `repeated WhereClause` so when execution lands the surface is + // already typed end-to-end and callers don't need to re-encode. // - // **Phase 1 supported shapes** (everything else rejects with a - // typed `QuerySyntaxError::Unsupported` so callers can detect - // un-wired capabilities without parsing prose). Bullets are - // kept single-line so the generated Rust doc comments don't trip + // **Supported shapes** (everything else rejects with a typed + // `QuerySyntaxError::Unsupported` so callers can detect un-wired + // capabilities without parsing prose). Bullets are kept + // single-line so the generated Rust doc comments don't trip // rustdoc's `list_item_without_indent` lint on continuation // lines. // @@ -638,8 +857,8 @@ message GetDocumentsRequest { // `select=COUNT, group_by=[a, b]`: // - a is the In field AND b is the range field, in that order → existing compound distinct shape; entries carry both `in_key` (= a's value) and `key` (= b's value). // - // **Phase 1 rejected shapes** (return `Unsupported`): - // - any non-empty `having` (always). + // **Rejected shapes** (return `Unsupported`): + // - any non-empty `having` (always — pending future server capability). // - `select=DOCUMENTS` with non-empty `group_by`. // - `select=COUNT` with `group_by` on a field that is not constrained by an `In` or range where clause. // - `select=COUNT` with `group_by.len() > 2`. @@ -674,20 +893,66 @@ message GetDocumentsRequest { // the caller has no explicit "expected keys" list to compare // against. message GetDocumentsRequestV1 { - // Projection over the matched row set. Determines whether the - // response carries documents or count results. - enum Select { - // Return matched documents. `group_by` must be empty. - DOCUMENTS = 0; - // Return a count — single aggregate when `group_by` is empty, - // per-group entries when `group_by` names a field. - COUNT = 1; + // Projection over the matched row set. `(function, field)` + // pair — analogous to `HavingAggregate`'s shape but with an + // additional `DOCUMENTS` variant for the row-fetch path. + // + // Determines what the response carries: + // - `DOCUMENTS`: `ResultData.documents` (matched rows; + // `field` must be empty). + // - `COUNT`: `ResultData.counts` carrying row counts. Empty + // `field` is `COUNT(*)` (group cardinality); non-empty is + // `COUNT(field)` (non-null `field` values). + // - `SUM` / `AVG`: `ResultData` carrying numeric + // aggregate(s); `field` is required and must be a + // numeric-typed schema field. + // + // Single-aggregate vs per-group response shape comes from + // `group_by` (empty → single, non-empty → per-group entries) — + // same rule as today's `COUNT` routing. + // + // **Server capability today**: only `DOCUMENTS` and + // `COUNT(*)` (empty `field`) are evaluated. `SUM` / `AVG` + // and `COUNT(field)` are wire-stable but rejected at routing + // time with `Unsupported("… is not yet implemented")` so the + // surface is shipped first and execution lands later without + // another version bump. + message Select { + enum Function { + DOCUMENTS = 0; + COUNT = 1; + SUM = 2; + AVG = 3; + // Per-group MIN / MAX — `SELECT MIN(field) GROUP BY + // category` returns the smallest `field` value in each + // category. Semantically distinct from + // `HavingRanking::Min` / `Max` (which are cross-group + // meta-aggregates over group results). MIN/MAX here + // operate over the row values within each group, the + // same way `SUM` and `AVG` do. + MIN = 4; + MAX = 5; + } + Function function = 1; + // Field the projection function is applied to. See the + // message-level docstring for the per-function requirement + // (empty for `DOCUMENTS`, optional for `COUNT`, required + // for `SUM` / `AVG` / `MIN` / `MAX`). + string field = 2; } bytes data_contract_id = 1; // The data contract owning the documents string document_type = 2; // Document type within the contract - bytes where = 3; // CBOR-encoded where clauses (same shape as v0) - bytes order_by = 4; // CBOR-encoded order_by clauses (same shape as v0) + // Structured where clauses. Empty list = no `WHERE` filter + // (return all matching rows under the document type / contract). + // See top-level `WhereClause` for shape semantics. + repeated WhereClause where_clauses = 3; + // Structured order_by clauses. Empty list = no explicit + // ordering (server applies the index's natural order). Multiple + // entries express SQL's `ORDER BY a ASC, b DESC, …` shape; the + // first entry's direction also governs split-mode entry + // ordering on `select=COUNT` paths. + repeated OrderClause order_by = 4; // Maximum number of rows to return. // // **Wire semantics on the `optional uint32` field**: `None` @@ -747,21 +1012,58 @@ message GetDocumentsRequest { bool prove = 8; // Request a grovedb proof instead of raw rows - // SQL `SELECT` projection. Default `DOCUMENTS` keeps v0 semantics - // for callers that just want documents back. - Select select = 9; + // SQL `SELECT` projection list. Multiple entries express + // `SELECT f1(a), f2(b), …` — one row per group carrying a + // parallel list of aggregate values in the response. + // + // Empty list defaults to a single `documents()` projection + // for v0-style document fetch — callers that don't opt into + // the SQL-shaped surface get plain row semantics. + // + // **Currently rejected when `selects.len() > 1`** with + // `Unsupported("multi-projection SELECT is not yet + // implemented")`. The single-projection cases (`DOCUMENTS`, + // `COUNT(*)`) are evaluated today; `SUM` / `AVG` / `MIN` / + // `MAX` are rejected at the per-function gate. When + // multi-projection lands the response shape gains a parallel + // `repeated AggregateValue values` field, so caller code + // structured around `repeated Select` doesn't need to be + // rewritten when it does. + repeated Select selects = 9; // SQL `GROUP BY` field names, in left-to-right order. Empty = - // no explicit grouping (aggregate for `select=COUNT`). See - // message-level docstring for the Phase 1 supported shapes. + // no explicit grouping (aggregate for `select=COUNT`). See the + // message-level docstring for the supported-shape table. repeated string group_by = 10; - // SQL `HAVING` clauses, CBOR-encoded the same way as `where`. - // **Phase 1: always rejected when non-empty** with - // `Unsupported("HAVING clause is not yet implemented")`. - // Reserved on the wire so future capability can land without - // another version bump. - bytes having = 11; + // SQL `HAVING` clauses — aggregate filters that apply to the + // grouped rows produced by `select=COUNT, group_by=[…]`. The + // wire shape is `HavingClause`, not `WhereClause`, because + // HAVING evaluates against per-group aggregates + // (`COUNT`/`SUM`/`AVG`/`MIN`/`MAX`/`TOP`/`BOTTOM`) rather than + // row field values. Multiple entries combine with implicit + // AND. See `HavingClause` / `HavingAggregate` for the + // operator and aggregate-function catalogs. + // + // **Always rejected when non-empty** today with + // `Unsupported("HAVING clause is not yet implemented")`. The + // wire shape is shipped now so the future server capability + // can land without another version bump — and so callers can + // construct full `HAVING COUNT(*) > 5 AND SUM(amount) > 100` + // requests in their builders even before the server evaluates + // them. + repeated HavingClause having = 11; + + // Row-based pagination offset, on top of the cursor-based + // `start_after` / `start_at` pagination. `OFFSET N` skips the + // first `N` matching rows before applying `limit`. Currently + // **always rejected when non-`None`** with + // `Unsupported("OFFSET pagination is not yet implemented")` + // — the wire surface is shipped now so callers can encode it + // ahead of server support landing without another version + // bump. Cursor pagination via `start_after` / `start_at` + // remains the supported way to page through results. + optional uint32 offset = 12; } oneof version { diff --git a/packages/rs-drive-abci/src/query/document_query/v0/mod.rs b/packages/rs-drive-abci/src/query/document_query/v0/mod.rs index 45b9868d515..21cc511b73c 100644 --- a/packages/rs-drive-abci/src/query/document_query/v0/mod.rs +++ b/packages/rs-drive-abci/src/query/document_query/v0/mod.rs @@ -16,7 +16,7 @@ use dpp::platform_value::Value; use dpp::validation::ValidationResult; use dpp::version::PlatformVersion; use drive::error::query::QuerySyntaxError; -use drive::query::DriveDocumentQuery; +use drive::query::{DriveDocumentQuery, OrderClause, WhereClause}; use drive::util::grove_operations::GroveDBToUse; impl Platform { @@ -33,6 +33,136 @@ impl Platform { }: GetDocumentsRequestV0, platform_state: &PlatformState, platform_version: &PlatformVersion, + ) -> Result, Error> { + // CBOR-decode the v0 wire fields into `Value` shells. The + // typed-clauses path picks up after this and is shared with + // the v1 handler — see `query_documents_typed` below. + let where_value = if r#where.is_empty() { + Value::Null + } else { + check_validation_result_with_data!(ciborium::de::from_reader(r#where.as_slice()) + .map_err(|_| { + QueryError::Query(QuerySyntaxError::DeserializationError( + "unable to decode 'where' query from cbor".to_string(), + )) + })) + }; + + let order_by_value: Option = if !order_by.is_empty() { + check_validation_result_with_data!(ciborium::de::from_reader(order_by.as_slice()) + .map_err(|_| { + QueryError::Query(QuerySyntaxError::DeserializationError( + "unable to decode 'order_by' query from cbor".to_string(), + )) + })) + } else { + None + }; + + // Parse the decoded `Value` shells into structured clauses. + // `DriveDocumentQuery::from_decomposed_values` historically + // did this internally; lifting the parse into the abci layer + // lets v0 and v1 (whose wire is already typed) share the + // same execution helper without re-encoding bytes. + let where_clauses: Vec = match where_value { + Value::Null => Vec::new(), + Value::Array(clauses) => { + let parsed: Result, _> = clauses + .iter() + .map(|wc| match wc { + Value::Array(components) => WhereClause::from_components(components), + _ => Err(drive::error::Error::Query( + QuerySyntaxError::InvalidFormatWhereClause( + "where clause must be an array".to_string(), + ), + )), + }) + .collect(); + check_validation_result_with_data!(parsed.map_err(|e| QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause(format!( + "invalid where clause components: {e}" + )) + ))) + } + _ => { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidFormatWhereClause( + "where clause must be an array".to_string(), + ), + ))); + } + }; + + let order_by_clauses: Vec = match order_by_value { + None | Some(Value::Null) => Vec::new(), + Some(Value::Array(clauses)) => { + let parsed: Result, _> = clauses + .iter() + .map(|oc| match oc { + Value::Array(components) => OrderClause::from_components(components) + .map_err(|_| { + QueryError::Query(QuerySyntaxError::InvalidOrderByProperties( + "invalid order_by clause components", + )) + }), + _ => Err(QueryError::Query( + QuerySyntaxError::InvalidOrderByProperties( + "order_by clause must be an array", + ), + )), + }) + .collect(); + check_validation_result_with_data!(parsed) + } + _ => { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidOrderByProperties("order_by must be an array"), + ))); + } + }; + + self.query_documents_typed( + data_contract_id, + document_type_name, + where_clauses, + order_by_clauses, + // v0 wire's `uint32` limit: `0` is the sentinel for + // "use server default"; `> u16::MAX` is rejected. + Some(limit), + prove, + start, + platform_state, + platform_version, + ) + } + + /// Shared execution pipeline for `getDocuments` — consumes + /// already-structured `where_clauses` / `order_by_clauses` and + /// reuses the same drive `DriveDocumentQuery` build + execute + /// path under both v0 (CBOR-decoded into typed) and v1 (proto- + /// converted into typed) wire envelopes. + /// + /// `limit_u32` semantics mirror the v0 wire field: + /// - `None` (v1's `optional uint32 = None`) → use the server + /// default (`drive_config.default_query_limit`). + /// - `Some(0)` (v0's "unset" sentinel) → same as `None`. + /// - `Some(N > 0)` → explicit cap; rejected if `N > u16::MAX`. + /// + /// v1 callers map their `Option` directly (None → None, + /// Some(0) is pre-rejected upstream by `validate_and_route` so + /// can't reach this helper). + #[allow(clippy::too_many_arguments)] + pub(super) fn query_documents_typed( + &self, + data_contract_id: Vec, + document_type_name: String, + where_clauses: Vec, + order_by_clauses: Vec, + limit_u32: Option, + prove: bool, + start: Option, + platform_state: &PlatformState, + platform_version: &PlatformVersion, ) -> Result, Error> { let contract_id: Identifier = check_validation_result_with_data!(data_contract_id .try_into() @@ -63,28 +193,6 @@ impl Platform { document_type_name, contract_id )))); - let where_clause = if r#where.is_empty() { - Value::Null - } else { - check_validation_result_with_data!(ciborium::de::from_reader(r#where.as_slice()) - .map_err(|_| { - QueryError::Query(QuerySyntaxError::DeserializationError( - "unable to decode 'where' query from cbor".to_string(), - )) - })) - }; - - let order_by = if !order_by.is_empty() { - check_validation_result_with_data!(ciborium::de::from_reader(order_by.as_slice()) - .map_err(|_| { - QueryError::Query(QuerySyntaxError::DeserializationError( - "unable to decode 'order_by' query from cbor".to_string(), - )) - })) - } else { - None - }; - let (start_at_included, start_at) = if let Some(start) = start { match start { Start::StartAfter(after) => ( @@ -110,21 +218,26 @@ impl Platform { (true, None) }; - if limit > u16::MAX as u32 { - return Ok(QueryValidationResult::new_with_error(QueryError::Query( - QuerySyntaxError::InvalidLimit(format!("limit {} out of bounds", limit)), - ))); - } + // Translate the wire-level `Option` to the `Option` + // `DriveDocumentQuery::from_typed_clauses` expects. Both + // `None` and `Some(0)` map to `Some(default_query_limit)` + // (server default applies); values exceeding `u16::MAX` are + // rejected here so the cast below is safe. + let limit_u16 = match limit_u32 { + Some(n) if n > u16::MAX as u32 => { + return Ok(QueryValidationResult::new_with_error(QueryError::Query( + QuerySyntaxError::InvalidLimit(format!("limit {} out of bounds", n)), + ))); + } + None | Some(0) => Some(self.config.drive.default_query_limit), + Some(n) => Some(n as u16), + }; let drive_query = - check_validation_result_with_data!(DriveDocumentQuery::from_decomposed_values( - where_clause, - order_by, - Some(if limit == 0 { - self.config.drive.default_query_limit - } else { - limit as u16 - }), + check_validation_result_with_data!(DriveDocumentQuery::from_typed_clauses( + where_clauses, + order_by_clauses, + limit_u16, start_at, start_at_included, None, diff --git a/packages/rs-drive-abci/src/query/document_query/v1/conversions.rs b/packages/rs-drive-abci/src/query/document_query/v1/conversions.rs new file mode 100644 index 00000000000..a61152b6171 --- /dev/null +++ b/packages/rs-drive-abci/src/query/document_query/v1/conversions.rs @@ -0,0 +1,398 @@ +//! Wire-protobuf → drive type conversions for the v1 document +//! query surface. +//! +//! Lives next to the v1 handler because rs-drive-abci is the only +//! crate that needs the proto-decode direction (the SDK ships the +//! inverse direction in +//! `rs-sdk/src/platform/documents/document_query.rs`). Keeping the +//! two directions in their respective crates avoids forcing +//! `dapi-grpc` into rs-drive's dependency graph just to host shared +//! conversion code. +//! +//! Conversion contract: +//! - Every fallible case maps to [`QueryError::InvalidArgument`] +//! (malformed wire input, **not** future capability). The v1 +//! handler distinguishes this from +//! [`QuerySyntaxError::Unsupported`] (valid request shape, server +//! capability not yet wired) — see `v1/mod.rs`'s +//! `not_yet_implemented` helper. +//! - Conversion is schema-agnostic. `DocumentFieldValue` variants +//! map 1:1 to `dpp::platform_value::Value` variants without +//! consulting the document type's schema. The schema-driven +//! coercion (`document_type.serialize_value_for_key`) runs +//! downstream as it does for the CBOR-shaped v0 path — a `text` +//! variant against an identifier field decodes via base58, a +//! `bytes_value` against the same field decodes as raw 32-byte +//! identifier, and so on. The wire layer just names the +//! primitive; the schema decides the indexed type. + +use crate::error::query::QueryError; +use dapi_grpc::platform::v0::get_documents_request::{ + document_field_value, + get_documents_request_v1::{select, Select as ProtoSelect}, + having_aggregate, having_clause, having_ranking, order_clause, + DocumentFieldValue as ProtoDocumentFieldValue, HavingAggregate as ProtoHavingAggregate, + HavingClause as ProtoHavingClause, HavingRanking as ProtoHavingRanking, + OrderClause as ProtoOrderClause, WhereClause as ProtoWhereClause, + WhereOperator as ProtoWhereOperator, +}; +use dpp::platform_value::Value; +use drive::query::{ + HavingAggregate, HavingAggregateFunction, HavingClause, HavingOperator, HavingRanking, + HavingRankingKind, HavingRightOperand, OrderClause, SelectFunction, SelectProjection, + WhereClause, WhereOperator, +}; + +/// Map a wire-level [`ProtoWhereOperator`] discriminant onto +/// drive's [`WhereOperator`]. Unknown discriminants are wire-level +/// garbage (no future protocol value would map a malformed integer +/// to a valid behavior), so they surface as +/// [`QueryError::InvalidArgument`] — not `not_yet_implemented`. +pub(super) fn where_operator_from_proto(op: i32) -> Result { + let proto_op = ProtoWhereOperator::try_from(op).map_err(|_| { + QueryError::InvalidArgument(format!( + "unknown WhereOperator discriminant: {} (valid values: 0..=10, see \ + `get_documents_request::WhereOperator`)", + op + )) + })?; + Ok(match proto_op { + ProtoWhereOperator::Equal => WhereOperator::Equal, + ProtoWhereOperator::GreaterThan => WhereOperator::GreaterThan, + ProtoWhereOperator::GreaterThanOrEquals => WhereOperator::GreaterThanOrEquals, + ProtoWhereOperator::LessThan => WhereOperator::LessThan, + ProtoWhereOperator::LessThanOrEquals => WhereOperator::LessThanOrEquals, + ProtoWhereOperator::Between => WhereOperator::Between, + ProtoWhereOperator::BetweenExcludeBounds => WhereOperator::BetweenExcludeBounds, + ProtoWhereOperator::BetweenExcludeLeft => WhereOperator::BetweenExcludeLeft, + ProtoWhereOperator::BetweenExcludeRight => WhereOperator::BetweenExcludeRight, + ProtoWhereOperator::In => WhereOperator::In, + ProtoWhereOperator::StartsWith => WhereOperator::StartsWith, + }) +} + +/// Map a wire [`ProtoDocumentFieldValue`] onto a +/// `dpp::platform_value::Value`. Schema-agnostic — variants map +/// 1:1 by primitive type and recurse for `list` up to a depth of +/// 1 (the only nesting level the query surface needs: `IN` / +/// `BETWEEN*` take a flat list of scalars). Anything deeper is +/// rejected as malformed wire input rather than recursed into, +/// so a hostile client can't blow the call stack with +/// `list(list(list(...)))` before schema validation. +/// +/// `None` (oneof unset on the wire) is rejected — a where-clause +/// operand is always concrete; empty where-clauses are expressed +/// by an empty `where_clauses` field at the request level, not by +/// sending an empty `DocumentFieldValue`. +pub(super) fn value_from_proto(value: ProtoDocumentFieldValue) -> Result { + value_from_proto_at_depth(value, 0) +} + +/// Recursion-bounded form of [`value_from_proto`]. `depth = 0` is +/// the request-level operand; the only legal child shape is a +/// flat list (`depth = 1` for `IN` / `BETWEEN*` candidates), so a +/// `list` encountered at `depth >= 1` is wire-malformed. +fn value_from_proto_at_depth( + value: ProtoDocumentFieldValue, + depth: u8, +) -> Result { + let variant = value.variant.ok_or_else(|| { + QueryError::InvalidArgument( + "DocumentFieldValue has no variant set; a where-clause operand must \ + be a concrete value" + .to_string(), + ) + })?; + Ok(match variant { + document_field_value::Variant::BoolValue(b) => Value::Bool(b), + document_field_value::Variant::Int64Value(i) => Value::I64(i), + document_field_value::Variant::Uint64Value(u) => Value::U64(u), + document_field_value::Variant::DoubleValue(f) => Value::Float(f), + document_field_value::Variant::Text(s) => Value::Text(s), + document_field_value::Variant::BytesValue(b) => Value::Bytes(b), + document_field_value::Variant::List(list) => { + if depth >= 1 { + return Err(QueryError::InvalidArgument( + "nested DocumentFieldValue.list is not supported; the v1 \ + query surface accepts at most one level of nesting \ + (`IN` / `BETWEEN*` candidate lists of scalars)" + .to_string(), + )); + } + Value::Array( + list.values + .into_iter() + .map(|v| value_from_proto_at_depth(v, depth + 1)) + .collect::, _>>()?, + ) + } + // The bool payload is a placeholder — picking the + // `null_value` variant means "this operand is null" and + // the bool itself is ignored. See the proto-side comment + // on the field for the rationale. + document_field_value::Variant::NullValue(_) => Value::Null, + }) +} + +/// Map a wire [`ProtoWhereClause`] onto drive's structured +/// [`WhereClause`]. Errors surface as +/// [`QueryError::InvalidArgument`] for both operator-discriminant +/// and value-shape failures. +pub(super) fn where_clause_from_proto(clause: ProtoWhereClause) -> Result { + let operator = where_operator_from_proto(clause.operator)?; + let value = clause.value.ok_or_else(|| { + QueryError::InvalidArgument(format!( + "WhereClause on field '{}' has no value set; every clause must carry a \ + concrete `DocumentFieldValue`", + clause.field + )) + })?; + let value = value_from_proto(value)?; + Ok(WhereClause { + field: clause.field, + operator, + value, + }) +} + +/// Plural form of [`where_clause_from_proto`] for the request-level +/// `repeated WhereClause` field. Returns an error on the first +/// malformed clause; the v1 handler surfaces this through +/// `QueryValidationResult::new_with_error` so the caller sees the +/// rejection on the same response shape as a downstream validation +/// failure. +pub(super) fn where_clauses_from_proto( + clauses: Vec, +) -> Result, QueryError> { + clauses.into_iter().map(where_clause_from_proto).collect() +} + +/// Map a wire [`ProtoOrderClause`] onto drive's [`OrderClause`]. +/// +/// The `target` oneof currently has two variants on the wire: +/// `field` (plain column name — evaluated today) and `aggregate` +/// (aggregate function applied to a field — wire-only, rejected +/// at routing time with `Unsupported("ORDER BY on aggregate …")`). +/// Unset (`None`) is rejected as malformed wire input. +pub(super) fn order_clause_from_proto(clause: ProtoOrderClause) -> Result { + let ascending = clause.ascending; + match clause.target { + Some(order_clause::Target::Field(field)) => Ok(OrderClause { field, ascending }), + Some(order_clause::Target::Aggregate(_)) => Err(QueryError::Query( + drive::error::query::QuerySyntaxError::Unsupported( + "ORDER BY on aggregate keys is not yet implemented".to_string(), + ), + )), + None => Err(QueryError::InvalidArgument( + "OrderClause has no target set; every clause must carry either a \ + `field` (plain column name) or an `aggregate` (aggregate-function \ + ordering target)" + .to_string(), + )), + } +} + +/// Plural form of [`order_clause_from_proto`] for the request-level +/// `repeated OrderClause` field. Returns the first error +/// encountered. +pub(super) fn order_clauses_from_proto( + clauses: Vec, +) -> Result, QueryError> { + clauses.into_iter().map(order_clause_from_proto).collect() +} + +// The `having_*_from_proto` family below is currently dead code: +// the v1 handler short-circuits non-empty HAVING with +// `not_yet_implemented` before decoding (see `query_documents_v1`). +// The helpers stay in tree so HAVING execution can land with just +// the gate-flip + a single call into `having_clauses_from_proto`; +// no separate decoder needs to be written then. The +// `#[allow(dead_code)]` is per-function rather than module-wide so +// any future addition outside this family still trips the lint. + +/// Map a wire [`having_aggregate::Function`] discriminant onto +/// drive's [`HavingAggregateFunction`]. Unknown discriminants are +/// wire-level garbage (no future protocol value would map a +/// malformed integer to a valid behavior), so they surface as +/// [`QueryError::InvalidArgument`]. +#[allow(dead_code)] +fn having_function_from_proto(function: i32) -> Result { + let proto = having_aggregate::Function::try_from(function).map_err(|_| { + QueryError::InvalidArgument(format!( + "unknown HavingAggregate.Function discriminant: {} (valid values: 0..=2, see \ + `get_documents_request::having_aggregate::Function`)", + function + )) + })?; + Ok(match proto { + having_aggregate::Function::Count => HavingAggregateFunction::Count, + having_aggregate::Function::Sum => HavingAggregateFunction::Sum, + having_aggregate::Function::Avg => HavingAggregateFunction::Avg, + }) +} + +/// Map a wire [`having_ranking::Kind`] discriminant onto drive's +/// [`HavingRankingKind`]. +#[allow(dead_code)] +fn having_ranking_kind_from_proto(kind: i32) -> Result { + let proto = having_ranking::Kind::try_from(kind).map_err(|_| { + QueryError::InvalidArgument(format!( + "unknown HavingRanking.Kind discriminant: {} (valid values: 0..=3, see \ + `get_documents_request::having_ranking::Kind`)", + kind + )) + })?; + Ok(match proto { + having_ranking::Kind::Min => HavingRankingKind::Min, + having_ranking::Kind::Max => HavingRankingKind::Max, + having_ranking::Kind::Top => HavingRankingKind::Top, + having_ranking::Kind::Bottom => HavingRankingKind::Bottom, + }) +} + +/// Map a wire [`ProtoHavingRanking`] onto drive's [`HavingRanking`]. +/// The `kind` ↔ `n` consistency check (e.g. `n` required for +/// `Top` / `Bottom`, forbidden on `Min` / `Max`) runs inside the +/// evaluator when HAVING execution lands; this converter only +/// enforces that the proto shape is well-formed. +#[allow(dead_code)] +fn having_ranking_from_proto(ranking: ProtoHavingRanking) -> Result { + Ok(HavingRanking { + kind: having_ranking_kind_from_proto(ranking.kind)?, + n: ranking.n, + }) +} + +/// Map a wire [`having_clause::Operator`] discriminant onto +/// drive's [`HavingOperator`]. Same error contract as +/// [`having_function_from_proto`]. +#[allow(dead_code)] +fn having_operator_from_proto(operator: i32) -> Result { + let proto = having_clause::Operator::try_from(operator).map_err(|_| { + QueryError::InvalidArgument(format!( + "unknown HavingClause.Operator discriminant: {} (valid values: 0..=10, see \ + `get_documents_request::having_clause::Operator`)", + operator + )) + })?; + Ok(match proto { + having_clause::Operator::Equal => HavingOperator::Equal, + having_clause::Operator::NotEqual => HavingOperator::NotEqual, + having_clause::Operator::GreaterThan => HavingOperator::GreaterThan, + having_clause::Operator::GreaterThanOrEquals => HavingOperator::GreaterThanOrEquals, + having_clause::Operator::LessThan => HavingOperator::LessThan, + having_clause::Operator::LessThanOrEquals => HavingOperator::LessThanOrEquals, + having_clause::Operator::Between => HavingOperator::Between, + having_clause::Operator::BetweenExcludeBounds => HavingOperator::BetweenExcludeBounds, + having_clause::Operator::BetweenExcludeLeft => HavingOperator::BetweenExcludeLeft, + having_clause::Operator::BetweenExcludeRight => HavingOperator::BetweenExcludeRight, + having_clause::Operator::In => HavingOperator::In, + }) +} + +/// Map a wire [`ProtoHavingAggregate`] onto drive's +/// [`HavingAggregate`]. The aggregate-function ↔ field +/// consistency check (`field` required for everything except +/// `Count`) runs inside the evaluator when HAVING execution +/// lands; the converter only enforces that the proto shape is +/// well-formed. +#[allow(dead_code)] +fn having_aggregate_from_proto( + aggregate: ProtoHavingAggregate, +) -> Result { + Ok(HavingAggregate { + function: having_function_from_proto(aggregate.function)?, + field: aggregate.field, + }) +} + +/// Map a wire [`ProtoHavingClause`] onto drive's structured +/// [`HavingClause`]. Errors surface as +/// [`QueryError::InvalidArgument`] for any wire-level +/// malformation: unknown discriminant on the aggregate function, +/// operator, or ranking kind; missing aggregate; missing right +/// operand (oneof unset on the wire); inner value-shape failures +/// on the literal-value branch. +#[allow(dead_code)] +pub(super) fn having_clause_from_proto( + clause: ProtoHavingClause, +) -> Result { + let aggregate = clause.aggregate.ok_or_else(|| { + QueryError::InvalidArgument( + "HavingClause has no aggregate set; every clause must carry an \ + aggregate function + field operand" + .to_string(), + ) + })?; + let aggregate = having_aggregate_from_proto(aggregate)?; + let operator = having_operator_from_proto(clause.operator)?; + let right = clause.right.ok_or_else(|| { + QueryError::InvalidArgument( + "HavingClause has no right operand set; every clause must carry \ + either a concrete `DocumentFieldValue` (`right.value`) or a \ + cross-group ranking reference (`right.ranking`)" + .to_string(), + ) + })?; + let right = match right { + having_clause::Right::Value(v) => HavingRightOperand::Value(value_from_proto(v)?), + having_clause::Right::Ranking(r) => { + HavingRightOperand::Ranking(having_ranking_from_proto(r)?) + } + }; + Ok(HavingClause { + aggregate, + operator, + right, + }) +} + +/// Plural form of [`having_clause_from_proto`] for the request- +/// level `repeated HavingClause` field. Returns an error on the +/// first malformed clause. +#[allow(dead_code)] +pub(super) fn having_clauses_from_proto( + clauses: Vec, +) -> Result, QueryError> { + clauses.into_iter().map(having_clause_from_proto).collect() +} + +/// Map a wire [`select::Function`] discriminant onto drive's +/// [`SelectFunction`]. Unknown discriminants are wire-level +/// garbage (no future protocol value would map a malformed +/// integer to a valid behavior), so they surface as +/// [`QueryError::InvalidArgument`]. +fn select_function_from_proto(function: i32) -> Result { + let proto = select::Function::try_from(function).map_err(|_| { + QueryError::InvalidArgument(format!( + "unknown Select.Function discriminant: {} (valid values: 0..=5, see \ + `get_documents_request::get_documents_request_v1::select::Function`)", + function + )) + })?; + Ok(match proto { + select::Function::Documents => SelectFunction::Documents, + select::Function::Count => SelectFunction::Count, + select::Function::Sum => SelectFunction::Sum, + select::Function::Avg => SelectFunction::Avg, + select::Function::Min => SelectFunction::Min, + select::Function::Max => SelectFunction::Max, + }) +} + +/// Map a wire [`ProtoSelect`] onto drive's [`SelectProjection`]. +/// An unset `select` field on the request decodes as the proto- +/// default `Select { function: DOCUMENTS, field: "" }`, which +/// maps to [`SelectProjection::documents()`] — keeps callers that +/// don't set the field on the v0-style document-fetch path. +/// +/// Per-function field constraints (e.g. `DOCUMENTS` must have +/// empty `field`, `SUM`/`AVG` require non-empty) are checked at +/// routing time in `validate_and_route`, not here, so the +/// converter only enforces well-formed proto. +pub(super) fn select_from_proto(select: ProtoSelect) -> Result { + Ok(SelectProjection { + function: select_function_from_proto(select.function)?, + field: select.field, + }) +} diff --git a/packages/rs-drive-abci/src/query/document_query/v1/mod.rs b/packages/rs-drive-abci/src/query/document_query/v1/mod.rs index aa5a31a1acb..c79ebade4ce 100644 --- a/packages/rs-drive-abci/src/query/document_query/v1/mod.rs +++ b/packages/rs-drive-abci/src/query/document_query/v1/mod.rs @@ -5,15 +5,14 @@ //! //! ## What this handler is //! -//! **Wire-format unification.** Phase 1 ships no new server-side -//! execution capability: every supported request shape reaches an -//! existing drive executor (`DriveDocumentQuery` for `DOCUMENTS`, -//! `Drive::execute_document_count_request` for `COUNT`) and produces -//! the same proof bytes / response data the now-removed -//! `getDocumentsCount` v0 endpoint did. The v1 surface just makes -//! the SQL semantics explicit on the wire so callers don't have to -//! reverse-engineer "this where clause shape happens to produce -//! per-value entries." +//! **Wire-format unification.** Every supported request shape +//! reaches an existing drive executor (`DriveDocumentQuery` for +//! `DOCUMENTS`, `Drive::execute_document_count_request` for +//! `COUNT`) and produces the same proof bytes / response data +//! the now-removed `getDocumentsCount` v0 endpoint did. The v1 +//! surface just makes the SQL semantics explicit on the wire so +//! callers don't have to reverse-engineer "this where clause +//! shape happens to produce per-value entries." //! //! ## What it rejects //! @@ -25,8 +24,9 @@ //! can keep these requests around in code and they'll start working //! once the capability lands without a wire-format change. See the //! message-level docstring on `GetDocumentsRequestV1` in -//! `platform.proto` for the full Phase 1 supported/rejected shape -//! table. +//! `platform.proto` for the full supported / rejected shape table. + +mod conversions; use crate::error::query::QueryError; use crate::error::Error; @@ -35,12 +35,8 @@ use crate::platform_types::platform_state::PlatformState; use crate::query::response_metadata::CheckpointUsed; use crate::query::QueryValidationResult; use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v0::Start as RequestV0Start; -use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::{ - Select, Start as RequestV1Start, -}; -use dapi_grpc::platform::v0::get_documents_request::{ - GetDocumentsRequestV0, GetDocumentsRequestV1, -}; +use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Start as RequestV1Start; +use dapi_grpc::platform::v0::get_documents_request::GetDocumentsRequestV1; use dapi_grpc::platform::v0::get_documents_response::get_documents_response_v1::{ count_results, result_data, CountEntries, CountEntry, CountResults, Documents, ResultData, }; @@ -50,20 +46,19 @@ use dapi_grpc::platform::v0::get_documents_response::{ use dpp::check_validation_result_with_data; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::identifier::Identifier; -use dpp::platform_value::Value; use dpp::validation::ValidationResult; use dpp::version::PlatformVersion; use drive::error::query::QuerySyntaxError; use drive::query::{ - CountMode, DocumentCountRequest, DocumentCountResponse, SplitCountEntry, WhereClause, - WhereOperator, + CountMode, DocumentCountRequest, DocumentCountResponse, OrderClause, SelectFunction, + SelectProjection, SplitCountEntry, WhereClause, WhereOperator, }; use drive::util::grove_operations::GroveDBToUse; /// Build a `QuerySyntaxError::Unsupported` carrying a stable /// " is not yet implemented" message. The wording is -/// deliberate — Phase 1 of v1 publishes a SQL-shaped surface that -/// the server only partially implements; the rejected shapes signal +/// deliberate — v1 publishes a SQL-shaped surface that the server +/// only partially implements today; the rejected shapes signal /// future capability, not malformed requests, and callers can keep /// the request structure unchanged when the capability lands. fn not_yet_implemented(feature: &str) -> QueryError { @@ -73,92 +68,19 @@ fn not_yet_implemented(feature: &str) -> QueryError { ))) } -/// Parse the raw CBOR-encoded `where` bytes into structured -/// [`WhereClause`]s. v1 needs the structured form to enforce -/// `group_by` ↔ where-field cross-checks before delegating. -fn decode_where_clauses(where_bytes: &[u8]) -> Result, QueryError> { - if where_bytes.is_empty() { - return Ok(Vec::new()); - } - let value: Value = ciborium::de::from_reader(where_bytes).map_err(|_| { - QueryError::Query(QuerySyntaxError::DeserializationError( - "unable to decode 'where' query from cbor".to_string(), - )) - })?; - let array = match value { - Value::Array(a) => a, - Value::Null => return Ok(Vec::new()), - _ => { - return Err(QueryError::Query( - QuerySyntaxError::InvalidFormatWhereClause( - "where clause must be an array".to_string(), - ), - )); - } - }; - let mut clauses = Vec::with_capacity(array.len()); - for entry in array { - let components = match entry { - Value::Array(c) => c, - _ => { - return Err(QueryError::Query( - QuerySyntaxError::InvalidFormatWhereClause( - "where clause must be an array".to_string(), - ), - )); - } - }; - let clause = WhereClause::from_components(&components).map_err(|e| { - QueryError::Query(QuerySyntaxError::InvalidFormatWhereClause(format!( - "invalid where clause components: {e}" - ))) - })?; - clauses.push(clause); - } - Ok(clauses) -} - -/// Re-decode the CBOR-encoded `order_by` bytes into a `Value` for -/// drive's count dispatcher (which accepts the raw `Value` form to -/// avoid re-imposing a parse). `Value::Null` (empty `order_by` on -/// the wire) → no clauses. -fn decode_order_by_value(order_by_bytes: &[u8]) -> Result { - if order_by_bytes.is_empty() { - return Ok(Value::Null); - } - ciborium::de::from_reader(order_by_bytes).map_err(|_| { - QueryError::Query(QuerySyntaxError::DeserializationError( - "unable to decode 'order_by' query from cbor".to_string(), - )) - }) -} - /// Validate the `select` × `group_by` × `having` combination -/// against the Phase 1 supported-shape table. Returns the routing -/// decision so the handler knows whether to dispatch to the -/// documents-fetch path or the count path, and which response -/// shape to produce. +/// against the supported-shape table (see the message-level +/// docstring on `GetDocumentsRequestV1` in `platform.proto`). +/// Returns the routing decision so the handler knows whether to +/// dispatch to the documents-fetch path or the count path, and +/// which response shape to produce. fn validate_and_route( - request_v1: &GetDocumentsRequestV1, + select: &SelectProjection, + limit: Option, + having_non_empty: bool, + group_by: &[String], where_clauses: &[WhereClause], ) -> Result { - // An unknown integer here is malformed wire input (a - // discriminant the `Select` proto enum doesn't define), NOT a - // future capability — there's no future protocol value that - // would map a garbage integer to a valid behavior. Use - // `InvalidArgument` so clients can distinguish "garbage in this - // field" from `not_yet_implemented`'s "valid request shape, just - // not wired yet" contract (see [`not_yet_implemented`] above). - let select = Select::try_from(request_v1.select).map_err(|_| { - QueryError::InvalidArgument(format!( - "select value {} is not a valid `Select` enum discriminant \ - (expected {} = DOCUMENTS or {} = COUNT)", - request_v1.select, - Select::Documents as i32, - Select::Count as i32, - )) - })?; - // Centralized `limit: Some(0)` rejection. // // `limit` is `optional uint32` on the wire, so `Some(0)` is a @@ -182,7 +104,7 @@ fn validate_and_route( // at the validation boundary so callers see a single, // mode-independent contract: `None` for "use server default", // `Some(N > 0)` for an explicit cap, `Some(0)` is invalid. - if request_v1.limit == Some(0) { + if limit == Some(0) { return Err(QueryError::Query(QuerySyntaxError::InvalidLimit( "limit = 0 is not a valid wire value on the v1 \ `optional uint32` field; omit `limit` (None) to use the \ @@ -193,83 +115,159 @@ fn validate_and_route( ))); } - if !request_v1.having.is_empty() { + if having_non_empty { return Err(not_yet_implemented("HAVING clause")); } - match select { - Select::Documents => { - if !request_v1.group_by.is_empty() { - return Err(not_yet_implemented( - "GROUP BY with SELECT DOCUMENTS (use SELECT COUNT with GROUP BY \ - for per-group counts, or SELECT DOCUMENTS without GROUP BY for \ - matched documents)", - )); + match select.function { + SelectFunction::Documents => { + if !select.field.is_empty() { + return Err(QueryError::InvalidArgument(format!( + "SELECT DOCUMENTS does not accept a projection field; \ + got field='{}' (omit the field for plain document fetch, \ + or use SELECT COUNT / SUM / AVG to project a value)", + select.field + ))); + } + if !group_by.is_empty() { + // GROUP BY with SELECT DOCUMENTS is structurally + // nonsensical — GROUP BY produces one row per + // distinct key, but SELECT DOCUMENTS returns the + // underlying rows; the two contracts can't be + // reconciled. Callers wanting per-group output use + // SELECT COUNT / SUM / AVG / MIN / MAX. Classify + // as `InvalidArgument` rather than + // `not_yet_implemented` because this isn't a + // future capability — no protocol version will + // make this combination meaningful. + return Err(QueryError::InvalidArgument(format!( + "GROUP BY with SELECT DOCUMENTS is not a valid SQL shape: \ + GROUP BY produces one row per distinct key, but SELECT \ + DOCUMENTS returns the underlying rows themselves. Use \ + SELECT COUNT / SUM / AVG / MIN / MAX with GROUP BY for \ + per-group output, or SELECT DOCUMENTS without GROUP BY \ + for plain document fetch. Got group_by={:?}.", + group_by + ))); } Ok(RoutingDecision::Documents) } - Select::Count => { - let in_field: Option<&str> = where_clauses - .iter() - .find(|wc| wc.operator == WhereOperator::In) - .map(|wc| wc.field.as_str()); - let range_field: Option<&str> = where_clauses - .iter() - .find(|wc| { - matches!( - wc.operator, - WhereOperator::GreaterThan - | WhereOperator::GreaterThanOrEquals - | WhereOperator::LessThan - | WhereOperator::LessThanOrEquals - | WhereOperator::Between - | WhereOperator::BetweenExcludeBounds - | WhereOperator::BetweenExcludeLeft - | WhereOperator::BetweenExcludeRight - | WhereOperator::StartsWith - ) - }) - .map(|wc| wc.field.as_str()); + SelectFunction::Sum => Err(not_yet_implemented( + "SELECT SUM (the wire surface accepts SUM(field) so callers \ + can encode it ahead of server support landing, but the \ + server doesn't yet evaluate numeric aggregates other than \ + COUNT)", + )), + SelectFunction::Avg => Err(not_yet_implemented( + "SELECT AVG (the wire surface accepts AVG(field) so callers \ + can encode it ahead of server support landing, but the \ + server doesn't yet evaluate numeric aggregates other than \ + COUNT)", + )), + SelectFunction::Min => Err(not_yet_implemented( + "SELECT MIN (the wire surface accepts MIN(field) so callers \ + can encode it ahead of server support landing, but the \ + server doesn't yet evaluate per-group MIN; semantically \ + distinct from `HavingRanking::Min` which is a cross-group \ + ranking primitive)", + )), + SelectFunction::Max => Err(not_yet_implemented( + "SELECT MAX (the wire surface accepts MAX(field) so callers \ + can encode it ahead of server support landing, but the \ + server doesn't yet evaluate per-group MAX; semantically \ + distinct from `HavingRanking::Max` which is a cross-group \ + ranking primitive)", + )), + SelectFunction::Count => { + if !select.field.is_empty() { + return Err(not_yet_implemented( + "SELECT COUNT(field) — counting non-null values of a \ + specific field (the wire surface accepts the field so \ + callers can encode it ahead of server support landing, \ + but today only COUNT(*) — empty `field` — is evaluated)", + )); + } + // Field-membership predicates on the request's where + // clauses. **Match-any, not match-first** — a request + // may carry two range clauses on different fields + // (the executor's `RangeAggregateCarrierProof` path + // is built for exactly that shape; see + // `outer_range_plus_inner_range_with_prove_and_group_by_range_routes_to_carrier_proof` + // in `drive/query/drive_document_count_query/tests.rs`). + // A `find(...).map(field).map(eq)` test against a + // hard-coded first range clause would make the routing + // decision depend on clause ordering on the wire, + // which is wrong — `WHERE a > x AND b > y GROUP BY a` + // and `WHERE b > y AND a > x GROUP BY a` must produce + // the same routing. + // + // For `In` the practical effect is the same because + // `validate_and_canonicalize_where_clauses` rejects + // multiple `In` clauses upstream (`MultipleInClauses`), + // but the `any` shape is used here too so the routing + // logic doesn't bake in an assumption that could go + // stale if that validator's contract ever relaxes. + let is_range_op = |op: WhereOperator| { + matches!( + op, + WhereOperator::GreaterThan + | WhereOperator::GreaterThanOrEquals + | WhereOperator::LessThan + | WhereOperator::LessThanOrEquals + | WhereOperator::Between + | WhereOperator::BetweenExcludeBounds + | WhereOperator::BetweenExcludeLeft + | WhereOperator::BetweenExcludeRight + | WhereOperator::StartsWith + ) + }; + let is_in_field = |field: &str| { + where_clauses + .iter() + .any(|wc| wc.operator == WhereOperator::In && wc.field == field) + }; + let is_range_field = |field: &str| { + where_clauses + .iter() + .any(|wc| is_range_op(wc.operator) && wc.field == field) + }; // Compute the SQL-shape mode from `(group_by, where)` // first; check `limit` validity against the mode after // so the rejection lives in one place keyed off // `CountMode::accepts_limit()`. - let mode = match request_v1.group_by.as_slice() { + let mode = match group_by { [] => CountMode::Aggregate, [field] => { - if Some(field.as_str()) == in_field { - // Single-field GROUP BY on the `In` field is - // only well-defined when no range clause is - // also constraining the result; otherwise - // Drive's compound walk emits unmerged - // `(in_key, key)` entries that don't match - // the caller's stated grouping. Force them - // to spell out the compound shape with a - // two-element `group_by`. - if range_field.is_some() { - return Err(not_yet_implemented( - "single-field GROUP BY when both `In` and range \ - clauses are present (use a two-element GROUP BY \ - `[in_field, range_field]` for the compound shape, \ - or drop the other constraint)", - )); - } + if is_in_field(field) { + // Single-field GROUP BY on an `In`-constrained + // field routes to `CountMode::GroupByIn`. + // When a range clause is also present, + // drive's [`detect_mode`] picks the right + // submode — `RangeAggregateCarrierProof` + // on the prove path (one count per In + // branch via the grovedb #663 carrier + // primitive) or `RangeNoProof` on the + // no-prove path (per-In-branch entries + // from the range walk). Both produce + // entries that line up with the + // caller-stated GROUP BY shape, so no + // additional gating here is needed. CountMode::GroupByIn - } else if Some(field.as_str()) == range_field { - // Same compound-shape concern as the In - // branch above — `group_by=[range_field]` - // with an active `In` clause produces - // compound rows from Drive that don't match - // the caller's grouping. - if in_field.is_some() { - return Err(not_yet_implemented( - "single-field GROUP BY when both `In` and range \ - clauses are present (use a two-element GROUP BY \ - `[in_field, range_field]` for the compound shape, \ - or drop the other constraint)", - )); - } + } else if is_range_field(field) { + // Symmetric to the In branch above: + // `group_by=[range_field]` routes to + // `CountMode::GroupByRange`. With a + // *second* range clause on a different + // field this drives the + // `RangeAggregateCarrierProof` carrier + // shape (drive's outer-range + inner-ACOR + // primitive). With an `In` on a different + // field it's `RangeDistinctProof` on the + // prove path (per-distinct-value counts + // with In-fanout on the prefix) or + // `RangeNoProof` distinct on the no-prove + // path. CountMode::GroupByRange } else { return Err(not_yet_implemented(&format!( @@ -280,7 +278,7 @@ fn validate_and_route( } } [first, second] => { - if Some(first.as_str()) == in_field && Some(second.as_str()) == range_field { + if is_in_field(first) && is_range_field(second) { CountMode::GroupByCompound } else { return Err(not_yet_implemented( @@ -301,7 +299,7 @@ fn validate_and_route( // selection in its `SizedQuery`. Either way silent // truncation or fan-out summing would mislead callers // who set a `limit`. - if request_v1.limit.is_some() && !mode.accepts_limit() { + if limit.is_some() && !mode.accepts_limit() { let reason = match mode { CountMode::Aggregate => { "`limit` is not valid for SELECT COUNT with empty GROUP BY \ @@ -341,13 +339,77 @@ enum RoutingDecision { } /// Test-only: expose the routing decision for unit tests without -/// needing a full `Platform` setup. +/// needing a full `Platform` setup. Mirrors **both the rejection +/// messages and the gate ordering** of [`Platform::query_documents_v1`] +/// so a test that pins a first-fail message also pins the order +/// gates fire in, not just which gate eventually fires. +/// +/// Sequence (same as the real handler at +/// [`Platform::query_documents_v1`]): +/// 1. `offset.is_some()` → `not_yet_implemented("OFFSET …")` +/// 2. `where_clauses_from_proto` → propagate `InvalidArgument` / +/// `Unsupported` decode errors +/// 3. `order_clauses_from_proto` → propagate aggregate-target +/// rejection / `InvalidArgument` decode errors +/// 4. `selects.len() > 1` → `not_yet_implemented("multi-projection …")` +/// 5. `select_from_proto` (first element, or default documents) +/// 6. [`validate_and_route`] — which itself runs `limit == Some(0)` +/// → `having_non_empty` → per-function gates → mode pick. +/// +/// Treats an unset `select` (proto-default) the same way the +/// handler does — as `SelectProjection::documents()`. #[cfg(test)] pub(super) fn validate_and_route_for_tests( request_v1: &GetDocumentsRequestV1, where_clauses: &[WhereClause], ) -> Result<&'static str, QueryError> { - validate_and_route(request_v1, where_clauses).map(|d| match d { + // 1. OFFSET pagination — rejected before any decoding. + if request_v1.offset.is_some() { + return Err(not_yet_implemented( + "OFFSET pagination (use cursor pagination via `start_after` / \ + `start_at` instead)", + )); + } + // 2. WHERE decoding — wire-malformed shapes (unknown operator + // discriminant, nested `DocumentFieldValue.list` beyond + // depth 1, …) reject as `InvalidArgument`. Runs even + // though the caller passes a separate pre-decoded + // `where_clauses` slice for the routing decision, because + // the depth-cap and similar decode-time contracts aren't + // exercisable otherwise. + conversions::where_clauses_from_proto(request_v1.where_clauses.clone())?; + // 3. ORDER BY decoding — aggregate-target reject as + // `Unsupported("ORDER BY on aggregate keys …")`. + conversions::order_clauses_from_proto(request_v1.order_by.clone())?; + // 4. Multi-projection SELECT rejection. + if request_v1.selects.len() > 1 { + return Err(not_yet_implemented( + "multi-projection SELECT (the wire accepts `repeated Select` so \ + callers can encode `SELECT COUNT(*), SUM(amount), AVG(rating)` \ + ahead of server support landing, but today only single-projection \ + requests are evaluated; the response shape will gain a parallel \ + `repeated AggregateValue values` field when multi-projection \ + lands)", + )); + } + // 5. Decode the single Select (or default to documents). + let select = request_v1 + .selects + .first() + .cloned() + .map(conversions::select_from_proto) + .transpose()? + .unwrap_or_else(SelectProjection::documents); + // 6. `validate_and_route` runs the inner `limit` / `having` / + // per-function gates. + validate_and_route( + &select, + request_v1.limit, + !request_v1.having.is_empty(), + &request_v1.group_by, + where_clauses, + ) + .map(|d| match d { RoutingDecision::Documents => "documents", RoutingDecision::Count(CountMode::Aggregate) => "count_aggregate", RoutingDecision::Count(CountMode::GroupByIn) => "count_entries_via_in_field", @@ -363,57 +425,158 @@ impl Platform { platform_state: &PlatformState, platform_version: &PlatformVersion, ) -> Result, Error> { - let where_clauses = match decode_where_clauses(&request_v1.r#where) { + // Destructure the proto request once; the rest of the + // pipeline consumes the individual fields by name. + let GetDocumentsRequestV1 { + data_contract_id, + document_type, + where_clauses: proto_where_clauses, + order_by: proto_order_by, + limit, + start, + prove, + selects: proto_selects, + group_by, + having, + offset, + } = request_v1; + + // OFFSET pagination is not yet implemented — cursor + // pagination via `start_after` / `start_at` is the + // supported path today. Reject any non-None offset + // before doing further work; same `not_yet_implemented` + // contract as HAVING / SUM / AVG. + if offset.is_some() { + return Ok(QueryValidationResult::new_with_error(not_yet_implemented( + "OFFSET pagination (use cursor pagination via `start_after` / \ + `start_at` instead)", + ))); + } + + // Decode the proto-typed `repeated WhereClause` / `repeated + // OrderClause` into drive's structured forms once, up + // front. Both the routing decision and the downstream + // executor consume the typed clauses directly — no CBOR + // envelope on the v1 path. + // + // `having` is checked for non-empty before decoding rather + // than after: the server rejects non-empty HAVING + // wholesale today, so decoding the clauses just to + // discard them is pure overhead and the downstream + // dispatchers don't accept the decoded vec yet. When + // HAVING execution lands, the `is_empty()` short-circuit + // gives way to a full `having_clauses_from_proto` call + // that threads into the dispatchers — and at that point + // wire-malformed HAVING (bad discriminant, missing + // aggregate, …) starts surfacing as `InvalidArgument` + // automatically. + let where_clauses = match conversions::where_clauses_from_proto(proto_where_clauses) { Ok(c) => c, Err(e) => return Ok(QueryValidationResult::new_with_error(e)), }; - - let routing = match validate_and_route(&request_v1, &where_clauses) { - Ok(r) => r, + let order_by_clauses = match conversions::order_clauses_from_proto(proto_order_by) { + Ok(c) => c, Err(e) => return Ok(QueryValidationResult::new_with_error(e)), }; + let having_non_empty = !having.is_empty(); + + // `selects` is `repeated Select` on the wire. Empty + // list → default-construct a `documents()` projection + // (keeps v0-style callers that don't opt into SELECT on + // the documents path). `len > 1` is wire-only today — + // multi-projection routing + response shape are deferred + // to a follow-up; reject here with the standard + // `not_yet_implemented` contract. + if proto_selects.len() > 1 { + return Ok(QueryValidationResult::new_with_error(not_yet_implemented( + "multi-projection SELECT (the wire accepts `repeated Select` so \ + callers can encode `SELECT COUNT(*), SUM(amount), AVG(rating)` \ + ahead of server support landing, but today only single-projection \ + requests are evaluated; the response shape will gain a parallel \ + `repeated AggregateValue values` field when multi-projection \ + lands)", + ))); + } + let select = match proto_selects.into_iter().next() { + Some(s) => match conversions::select_from_proto(s) { + Ok(s) => s, + Err(e) => return Ok(QueryValidationResult::new_with_error(e)), + }, + None => SelectProjection::documents(), + }; + + let routing = + match validate_and_route(&select, limit, having_non_empty, &group_by, &where_clauses) { + Ok(r) => r, + Err(e) => return Ok(QueryValidationResult::new_with_error(e)), + }; match routing { - RoutingDecision::Documents => { - self.dispatch_documents_v1(request_v1, platform_state, platform_version) - } - RoutingDecision::Count(mode) => { - self.dispatch_count_v1(request_v1, mode, platform_state, platform_version) - } + RoutingDecision::Documents => self.dispatch_documents_v1( + data_contract_id, + document_type, + where_clauses, + order_by_clauses, + limit, + start, + prove, + platform_state, + platform_version, + ), + RoutingDecision::Count(mode) => self.dispatch_count_v1( + data_contract_id, + document_type, + where_clauses, + order_by_clauses, + limit, + start, + prove, + mode, + platform_state, + platform_version, + ), } } - /// Forward a `select = DOCUMENTS` request through the v0 - /// handler. v1 doesn't add any documents-side capability — the - /// SQL-shaped fields (`select`, `group_by`, `having`) are all - /// validated as documents-compatible above (empty `group_by`, - /// empty `having`, etc.) before reaching here. + /// Forward a `select = DOCUMENTS` request through the shared + /// `query_documents_typed` helper that v0 also dispatches into. + /// v1 doesn't add any documents-side capability — the SQL-shaped + /// fields (`select`, `group_by`, `having`) are all validated as + /// documents-compatible above (empty `group_by`, empty `having`, + /// etc.) before reaching here. + #[allow(clippy::too_many_arguments)] fn dispatch_documents_v1( &self, - request_v1: GetDocumentsRequestV1, + data_contract_id: Vec, + document_type: String, + where_clauses: Vec, + order_by_clauses: Vec, + limit: Option, + start: Option, + prove: bool, platform_state: &PlatformState, platform_version: &PlatformVersion, ) -> Result, Error> { - let start = request_v1.start.map(|s| match s { + let start = start.map(|s| match s { RequestV1Start::StartAfter(b) => RequestV0Start::StartAfter(b), RequestV1Start::StartAt(b) => RequestV0Start::StartAt(b), }); - // `limit` is `optional uint32` on v1 vs unwrapped `uint32` - // (default 0) on v0. `None` on v1 → 0 on v0 (v0 reads `0` - // as "use the server's `default_query_limit`"). `Some(0)` + // `limit` is `optional uint32` on v1; the typed helper takes + // `Option` directly (`None` → server default). `Some(0)` // can't reach here — `validate_and_route` rejects it for // every SELECT mode so the v1 contract is uniform; only // `None` or `Some(N > 0)` survive. - let request_v0 = GetDocumentsRequestV0 { - data_contract_id: request_v1.data_contract_id, - document_type: request_v1.document_type, - r#where: request_v1.r#where, - order_by: request_v1.order_by, - limit: request_v1.limit.unwrap_or(0), - prove: request_v1.prove, + let result = self.query_documents_typed( + data_contract_id, + document_type, + where_clauses, + order_by_clauses, + limit, + prove, start, - }; - let result = self.query_documents_v0(request_v0, platform_state, platform_version)?; + platform_state, + platform_version, + )?; Ok(result.map(translate_documents_v0_to_v1)) } @@ -425,26 +588,33 @@ impl Platform { /// group entries. The wire response is `GetDocumentsResponseV1` /// with the inner `ResultData.counts` variant for non-proof /// results. + #[allow(clippy::too_many_arguments)] fn dispatch_count_v1( &self, - request_v1: GetDocumentsRequestV1, + data_contract_id: Vec, + document_type_name: String, + where_clauses: Vec, + order_clauses: Vec, + limit: Option, + start: Option, + prove: bool, mode: CountMode, platform_state: &PlatformState, platform_version: &PlatformVersion, ) -> Result, Error> { - if request_v1.start.is_some() { + if start.is_some() { return Ok(QueryValidationResult::new_with_error(not_yet_implemented( "start_after / start_at with SELECT COUNT (paginate by narrowing the \ range clause itself)", ))); } - let contract_id: Identifier = check_validation_result_with_data!(request_v1 - .data_contract_id - .try_into() - .map_err(|_| QueryError::InvalidArgument( - "id must be a valid identifier (32 bytes long)".to_string() - ))); + let contract_id: Identifier = + check_validation_result_with_data!(data_contract_id.try_into().map_err(|_| { + QueryError::InvalidArgument( + "id must be a valid identifier (32 bytes long)".to_string(), + ) + })); let (_, contract_fetch_info) = self.drive.get_contract_with_fetch_info_and_fee( contract_id.to_buffer(), @@ -460,37 +630,20 @@ impl Platform { )); let contract_ref = &contract_fetch_info.contract; let document_type = check_validation_result_with_data!(contract_ref - .document_type_for_name(request_v1.document_type.as_str()) + .document_type_for_name(document_type_name.as_str()) .map_err(|_| QueryError::InvalidArgument(format!( "document type {} not found for contract {}", - request_v1.document_type, contract_id + document_type_name, contract_id )))); - let where_value = if request_v1.r#where.is_empty() { - Value::Null - } else { - check_validation_result_with_data!(ciborium::de::from_reader( - request_v1.r#where.as_slice() - ) - .map_err( - |_| QueryError::Query(QuerySyntaxError::DeserializationError( - "unable to decode 'where' query from cbor".to_string() - )) - )) - }; - let order_by_value = match decode_order_by_value(&request_v1.order_by) { - Ok(v) => v, - Err(e) => return Ok(QueryValidationResult::new_with_error(e)), - }; - let drive_request = DocumentCountRequest { contract: contract_ref, document_type, - raw_where_value: where_value, - raw_order_by_value: order_by_value, + where_clauses, + order_clauses, mode, - limit: request_v1.limit, - prove: request_v1.prove, + limit, + prove, drive_config: &self.config.drive, }; let drive_response = diff --git a/packages/rs-drive-abci/src/query/document_query/v1/tests.rs b/packages/rs-drive-abci/src/query/document_query/v1/tests.rs index a636d4ccc57..a7a8fb0cb0b 100644 --- a/packages/rs-drive-abci/src/query/document_query/v1/tests.rs +++ b/packages/rs-drive-abci/src/query/document_query/v1/tests.rs @@ -12,25 +12,137 @@ use super::*; use crate::query::tests::{setup_platform, store_data_contract, store_document}; use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::{ - Select as V1Select, Start as V1Start, + select as v1_select, Select as V1Select, Start as V1Start, +}; +use dapi_grpc::platform::v0::get_documents_request::{ + document_field_value, having_aggregate, having_clause, order_clause, + DocumentFieldValue as ProtoDocumentFieldValue, GetDocumentsRequestV0, + HavingAggregate as ProtoHavingAggregate, HavingClause as ProtoHavingClause, + OrderClause as ProtoOrderClause, WhereClause as ProtoWhereClause, + WhereOperator as ProtoWhereOperator, }; use dpp::dashcore::Network; use dpp::data_contract::accessors::v0::DataContractV0Getters; use dpp::data_contract::document_type::random_document::CreateRandomDocument; -use dpp::platform_value::platform_value; +use dpp::platform_value::{platform_value, Value}; + +/// Build a `ProtoDocumentFieldValue` from a `dpp::platform_value::Value` +/// for use inside this test module only. **Subset of the SDK's +/// `value_to_proto`** — covers the primitive types these tests +/// actually construct: `Bool` / signed + unsigned integers / +/// `Float` / `Text` / `Bytes` / `Array` / `Null`. Variants the +/// SDK supports but the tests don't need (`Bytes20/32/36`, +/// `Identifier`, `U128`/`I128` → decimal text) are intentionally +/// omitted here — a test trying to use one panics so the gap is +/// loud rather than silent. Wider fidelity lives in the SDK at +/// `rs-sdk/src/platform/documents/document_query.rs::value_to_proto`. +fn pv(value: Value) -> ProtoDocumentFieldValue { + let variant = match value { + Value::Bool(b) => document_field_value::Variant::BoolValue(b), + Value::I8(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I16(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I32(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I64(i) => document_field_value::Variant::Int64Value(i), + Value::U8(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U16(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U32(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U64(u) => document_field_value::Variant::Uint64Value(u), + Value::Float(f) => document_field_value::Variant::DoubleValue(f), + Value::Text(s) => document_field_value::Variant::Text(s), + Value::Bytes(b) => document_field_value::Variant::BytesValue(b), + Value::Array(items) => { + document_field_value::Variant::List(document_field_value::ValueList { + values: items.into_iter().map(pv).collect(), + }) + } + // Picking the variant means "this operand is null"; the + // bool payload is a placeholder per the proto-side comment + // on the `null_value` field. + Value::Null => document_field_value::Variant::NullValue(true), + other => panic!("pv: unsupported test-value variant {:?}", other), + }; + ProtoDocumentFieldValue { + variant: Some(variant), + } +} + +/// Build a proto `WhereClause` triple `(field, operator, value)`. +fn wc(field: &str, operator: ProtoWhereOperator, value: Value) -> ProtoWhereClause { + ProtoWhereClause { + field: field.to_string(), + operator: operator as i32, + value: Some(pv(value)), + } +} + +/// Build a proto `OrderClause` (field, ascending) — field-target +/// variant of the wire's `target` oneof. +fn oc(field: &str, ascending: bool) -> ProtoOrderClause { + ProtoOrderClause { + target: Some(order_clause::Target::Field(field.to_string())), + ascending, + } +} + +/// Build a proto `HavingClause` with a literal-value right +/// operand `(aggregate, operator, value)`. Convenience for the +/// rejection tests — the server rejects any non-empty `having` +/// wholesale today, so the specific aggregate function / operator +/// / value here don't need to be domain-meaningful, only +/// well-formed. Tests that need the ranking right-operand +/// (`COUNT EQ MAX`, `COUNT IN TOP(5)`, …) should build the +/// `ProtoHavingClause` inline with `having_clause::Right::Ranking` +/// rather than route through this helper. +fn hc( + function: having_aggregate::Function, + field: &str, + operator: having_clause::Operator, + value: Value, +) -> ProtoHavingClause { + ProtoHavingClause { + aggregate: Some(ProtoHavingAggregate { + function: function as i32, + field: field.to_string(), + }), + operator: operator as i32, + right: Some(having_clause::Right::Value(pv(value))), + } +} + +/// Build the proto `selects` field for the common single-projection +/// tests. Wraps a single `Select { function, field }` in a +/// one-element vec — the wire field is `repeated Select`, the +/// `documents` / `count_star` helpers cover the bulk of test cases. +/// Tests that need the multi-projection or unknown-discriminant +/// shapes should build the vec inline. +fn select_with(function: v1_select::Function) -> Vec { + vec![V1Select { + function: function as i32, + field: String::new(), + }] +} + +fn select_documents() -> Vec { + select_with(v1_select::Function::Documents) +} + +fn select_count_star() -> Vec { + select_with(v1_select::Function::Count) +} fn empty_v1_request() -> GetDocumentsRequestV1 { GetDocumentsRequestV1 { data_contract_id: vec![0u8; 32], document_type: "widget".to_string(), - r#where: Vec::new(), + where_clauses: Vec::new(), order_by: Vec::new(), limit: None, start: None, prove: false, - select: V1Select::Documents as i32, + selects: select_documents(), group_by: Vec::new(), having: Vec::new(), + offset: None, } } @@ -53,20 +165,29 @@ fn assert_not_yet_implemented(result: Result<&'static str, QueryError>, expected #[test] fn reject_having_non_empty() { + // Non-empty `having` is rejected wholesale until the server + // gains HAVING-evaluation capability. The clause shape itself + // doesn't matter (server doesn't decode it past the `is_empty()` + // check), so a single placeholder clause is sufficient. let request = GetDocumentsRequestV1 { - having: vec![0x01, 0x02], + having: vec![hc( + having_aggregate::Function::Count, + "", + having_clause::Operator::GreaterThan, + Value::U64(0), + )], ..empty_v1_request() }; assert_not_yet_implemented(validate_and_route_for_tests(&request, &[]), "HAVING clause"); } -/// Unknown `Select` enum discriminants (e.g. `42`) are malformed +/// Unknown `Select.Function` discriminants (e.g. `42`) are malformed /// wire input, not future capability. The handler must classify /// them as [`QueryError::InvalidArgument`] — `not_yet_implemented` /// carries the contract "valid request shape, caller can keep it /// unchanged when capability lands" which is wrong for garbage /// enum discriminants (no future protocol value would make `42` -/// meaningful for `Select`). +/// meaningful for `Select.Function`). /// /// Pins the discriminator so a future refactor that re-collapses /// the two error classes back together (e.g. someone replaces the @@ -77,8 +198,11 @@ fn reject_having_non_empty() { fn reject_unknown_select_enum_value_as_invalid_argument() { let request = GetDocumentsRequestV1 { // Neither 0 (DOCUMENTS) nor 1 (COUNT); a discriminant - // outside the `Select` enum's defined set. - select: 42, + // outside the `Select.Function` enum's defined set. + selects: vec![V1Select { + function: 42, + field: String::new(), + }], ..empty_v1_request() }; match validate_and_route_for_tests(&request, &[]) { @@ -91,7 +215,7 @@ fn reject_unknown_select_enum_value_as_invalid_argument() { ); } Err(QueryError::Query(QuerySyntaxError::Unsupported(msg))) => panic!( - "expected InvalidArgument for unknown Select discriminant; got \ + "expected InvalidArgument for unknown Select.Function discriminant; got \ not_yet_implemented(\"{}\"). The two error classes carry different \ contracts (malformed input vs. future capability) and must not be \ collapsed.", @@ -119,6 +243,189 @@ fn reject_unknown_select_enum_value_as_invalid_argument() { /// All five modes must return `QuerySyntaxError::InvalidLimit` /// with the centralized message — not five different rejection /// reasons. +/// Non-`None` `offset` is rejected as `not_yet_implemented` before +/// any other routing happens. Pins the contract for all SELECT +/// modes (DOCUMENTS / COUNT / SUM / AVG / MIN / MAX) since the +/// rejection lives in the handler entry, not the per-function +/// gate. +#[test] +fn reject_offset_uniformly_across_select_modes() { + for select_helper in [select_documents(), select_count_star()] { + let request = GetDocumentsRequestV1 { + selects: select_helper, + offset: Some(10), + ..empty_v1_request() + }; + assert_not_yet_implemented( + validate_and_route_for_tests(&request, &[]), + "OFFSET pagination", + ); + } +} + +/// `selects.len() > 1` is rejected as `not_yet_implemented` — +/// multi-projection routing + response shape are deferred to a +/// follow-up. The wire stays `repeated` so the surface is stable +/// when execution lands. +#[test] +fn reject_multi_projection_selects() { + let request = GetDocumentsRequestV1 { + selects: vec![ + V1Select { + function: v1_select::Function::Count as i32, + field: String::new(), + }, + V1Select { + function: v1_select::Function::Sum as i32, + field: "amount".to_string(), + }, + ], + ..empty_v1_request() + }; + assert_not_yet_implemented( + validate_and_route_for_tests(&request, &[]), + "multi-projection SELECT", + ); +} + +/// `SELECT MIN(field)` / `MAX(field)` are wire-accepted but +/// rejected at routing — execution lives in a follow-up. +#[test] +fn reject_select_min_max() { + for (function, expected_msg) in [ + (v1_select::Function::Min, "SELECT MIN"), + (v1_select::Function::Max, "SELECT MAX"), + ] { + let request = GetDocumentsRequestV1 { + selects: vec![V1Select { + function: function as i32, + field: "amount".to_string(), + }], + ..empty_v1_request() + }; + assert_not_yet_implemented(validate_and_route_for_tests(&request, &[]), expected_msg); + } +} + +/// `ORDER BY ` (wire `OrderClause.target.aggregate`) is +/// rejected at proto-decode time — drive's `OrderClause` only +/// carries a plain field name today. +#[test] +fn reject_order_by_aggregate_target() { + let request = GetDocumentsRequestV1 { + order_by: vec![ProtoOrderClause { + target: Some(order_clause::Target::Aggregate(ProtoHavingAggregate { + function: having_aggregate::Function::Count as i32, + field: String::new(), + })), + ascending: false, + }], + ..empty_v1_request() + }; + assert_not_yet_implemented( + validate_and_route_for_tests(&request, &[]), + "ORDER BY on aggregate keys", + ); +} + +/// `validate_and_route_for_tests` must mirror the real +/// handler's gate ordering, not just its rejection messages, so +/// a request that hits multiple gates fails on the same one in +/// tests as in production. +/// +/// Real-handler order: +/// `offset → where_clauses decode → order_by decode → selects.len > 1 → select decode → validate_and_route`. +/// +/// This test builds a request that is *both* multi-projection +/// AND carries an aggregate-target order_by; the order_by gate +/// must fire first (matches the real handler), not the +/// multi-projection one. +#[test] +fn validate_and_route_for_tests_matches_real_handler_gate_order() { + let request = GetDocumentsRequestV1 { + // Multi-projection: would trip `selects.len > 1` gate. + selects: vec![ + V1Select { + function: v1_select::Function::Count as i32, + field: String::new(), + }, + V1Select { + function: v1_select::Function::Sum as i32, + field: "amount".to_string(), + }, + ], + // ORDER BY on aggregate: trips order_by decode (earlier + // in the sequence than `selects.len > 1`). + order_by: vec![ProtoOrderClause { + target: Some(order_clause::Target::Aggregate(ProtoHavingAggregate { + function: having_aggregate::Function::Count as i32, + field: String::new(), + })), + ascending: false, + }], + ..empty_v1_request() + }; + // Real handler decodes order_by before checking + // `selects.len > 1`, so the order-by-aggregate rejection + // must surface first. + assert_not_yet_implemented( + validate_and_route_for_tests(&request, &[]), + "ORDER BY on aggregate keys", + ); +} + +/// `value_from_proto`'s recursion-depth cap is the only +/// structural defense against deeply-nested wire payloads on the +/// v1 surface before schema validation runs. Pin the contract +/// with a depth-2 `DocumentFieldValue` so a future refactor that +/// reorders the depth check or restores the naive recursion +/// fails this test loudly rather than silently widening the +/// attack surface. +/// +/// The malformed clause is delivered via a real `WhereClause` +/// because the conversion entry point on the routing path is +/// `where_clauses_from_proto`; the inner `value_from_proto_at_depth` +/// is the actual unit under test. +#[test] +fn nested_list_rejected_at_depth_two() { + let nested_list_value = ProtoDocumentFieldValue { + variant: Some(document_field_value::Variant::List( + document_field_value::ValueList { + values: vec![ProtoDocumentFieldValue { + variant: Some(document_field_value::Variant::List( + document_field_value::ValueList { + values: vec![ProtoDocumentFieldValue { + variant: Some(document_field_value::Variant::Int64Value(1)), + }], + }, + )), + }], + }, + )), + }; + let nested_clause = ProtoWhereClause { + field: "any".to_string(), + operator: ProtoWhereOperator::In as i32, + value: Some(nested_list_value), + }; + let request = GetDocumentsRequestV1 { + where_clauses: vec![nested_clause], + ..empty_v1_request() + }; + match validate_and_route_for_tests(&request, &[]) { + Err(QueryError::InvalidArgument(msg)) => { + assert!( + msg.contains("nested DocumentFieldValue.list"), + "expected nested-list rejection message, got: {msg}" + ); + } + other => panic!( + "expected InvalidArgument for nested DocumentFieldValue.list, got {:?}", + other + ), + } +} + #[test] fn reject_limit_some_zero_uniformly_across_select_modes() { let in_clauses = || { @@ -155,7 +462,7 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { ( "SELECT DOCUMENTS, group_by=[]", GetDocumentsRequestV1 { - select: V1Select::Documents as i32, + selects: select_documents(), limit: Some(0), ..empty_v1_request() }, @@ -164,7 +471,7 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { ( "SELECT COUNT, group_by=[] (Aggregate) with In clause", GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), limit: Some(0), ..empty_v1_request() }, @@ -173,7 +480,7 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { ( "SELECT COUNT, group_by=[in_field] (GroupByIn)", GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["brand".to_string()], limit: Some(0), ..empty_v1_request() @@ -183,7 +490,7 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { ( "SELECT COUNT, group_by=[range_field] (GroupByRange)", GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["color".to_string()], limit: Some(0), ..empty_v1_request() @@ -193,7 +500,7 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { ( "SELECT COUNT, group_by=[in_field, range_field] (GroupByCompound)", GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["brand".to_string(), "color".to_string()], limit: Some(0), ..empty_v1_request() @@ -224,23 +531,44 @@ fn reject_limit_some_zero_uniformly_across_select_modes() { } } +/// GROUP BY with SELECT DOCUMENTS is structurally nonsensical +/// (GROUP BY → one row per key; DOCUMENTS → underlying rows), +/// so the rejection uses `InvalidArgument`, not +/// `not_yet_implemented`. There's no protocol version where the +/// combination becomes meaningful — callers want SELECT COUNT / +/// SUM / etc. for per-group output. Pin the discriminator so a +/// future refactor that collapses this back into the +/// not-yet-implemented family fails loudly. #[test] -fn reject_group_by_with_documents() { +fn reject_group_by_with_documents_as_invalid_argument() { let request = GetDocumentsRequestV1 { - select: V1Select::Documents as i32, + selects: select_documents(), group_by: vec!["color".to_string()], ..empty_v1_request() }; - assert_not_yet_implemented( - validate_and_route_for_tests(&request, &[]), - "GROUP BY with SELECT DOCUMENTS", - ); + match validate_and_route_for_tests(&request, &[]) { + Err(QueryError::InvalidArgument(msg)) => { + assert!( + msg.contains("GROUP BY with SELECT DOCUMENTS") + && msg.contains("not a valid SQL shape"), + "expected SQL-shape-mismatch message, got: {msg}" + ); + } + Err(QueryError::Query(QuerySyntaxError::Unsupported(msg))) => panic!( + "expected InvalidArgument for GROUP BY + SELECT DOCUMENTS; got \ + not_yet_implemented(\"{msg}\"). The two error classes carry different \ + contracts (malformed input vs. future capability) and must not be \ + collapsed — GROUP BY + DOCUMENTS is structurally invalid, not \ + future capability." + ), + other => panic!("expected InvalidArgument, got {:?}", other), + } } #[test] fn reject_group_by_field_not_in_where_clauses() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["color".to_string()], ..empty_v1_request() }; @@ -253,7 +581,7 @@ fn reject_group_by_field_not_in_where_clauses() { #[test] fn reject_group_by_more_than_two_fields() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["a".to_string(), "b".to_string(), "c".to_string()], ..empty_v1_request() }; @@ -266,7 +594,7 @@ fn reject_group_by_more_than_two_fields() { #[test] fn reject_two_field_group_by_outside_compound_shape() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["color".to_string(), "brand".to_string()], ..empty_v1_request() }; @@ -291,7 +619,7 @@ fn reject_two_field_group_by_outside_compound_shape() { #[test] fn accept_count_with_empty_group_by_routes_to_aggregate() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), ..empty_v1_request() }; assert_eq!( @@ -306,7 +634,7 @@ fn reject_count_aggregate_with_limit() { // meaningless and previously caused Drive's per-In fan-out // to honor it and return a partial sum disguised as a total. let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), limit: Some(1), ..empty_v1_request() }; @@ -337,7 +665,7 @@ fn reject_count_group_by_in_with_limit() { // before reaching the path-query builder. Reject upstream // to make the contract explicit. let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["age".to_string()], limit: Some(1), ..empty_v1_request() @@ -359,14 +687,15 @@ fn reject_count_group_by_in_with_limit() { } #[test] -fn reject_single_field_group_by_on_in_field_when_range_also_constrained() { - // `group_by=[in_field]` looks well-formed in isolation, but - // the simultaneous range clause forces Drive's compound walk - // to emit `(in_key, key)` rows that don't match the caller's - // single-field grouping. Caller must spell out the compound - // shape explicitly with `[in_field, range_field]`. +fn accept_single_field_group_by_on_in_field_with_range_routes_to_in_entries() { + // `group_by=[in_field]` with an additional range clause is + // valid: drive's `detect_mode` picks + // `RangeAggregateCarrierProof` (grovedb #663) on the prove + // path and `RangeNoProof` per-In-branch on the no-prove path — + // both produce entries that line up with the caller's + // single-field GROUP BY shape. let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["brand".to_string()], ..empty_v1_request() }; @@ -382,18 +711,22 @@ fn reject_single_field_group_by_on_in_field_when_range_also_constrained() { value: platform_value!("blue"), }, ]; - assert_not_yet_implemented( - validate_and_route_for_tests(&request, &where_clauses), - "single-field GROUP BY when both `In` and range clauses are present", + assert_eq!( + validate_and_route_for_tests(&request, &where_clauses).unwrap(), + "count_entries_via_in_field" ); } #[test] -fn reject_single_field_group_by_on_range_field_when_in_also_constrained() { - // Mirror of the above for the range-field branch: same - // compound-shape mismatch, different `group_by` entry. +fn accept_single_field_group_by_on_range_field_with_in_routes_to_range_entries() { + // Mirror of the above: `group_by=[range_field]` with an + // active In on the prefix routes to + // `CountMode::GroupByRange`, and drive picks + // `RangeDistinctProof` (with In-fanout via subquery) on the + // prove path or `RangeNoProof` distinct on the no-prove + // path. let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["color".to_string()], ..empty_v1_request() }; @@ -409,16 +742,63 @@ fn reject_single_field_group_by_on_range_field_when_in_also_constrained() { value: platform_value!("blue"), }, ]; - assert_not_yet_implemented( - validate_and_route_for_tests(&request, &where_clauses), - "single-field GROUP BY when both `In` and range clauses are present", + assert_eq!( + validate_and_route_for_tests(&request, &where_clauses).unwrap(), + "count_entries_via_range_field" + ); +} + +/// Routing decision must not depend on `where_clauses` element +/// order when two range clauses are present. Pins the +/// `is_range_field` / `is_in_field` membership-test contract +/// (match-any, not match-first) so a future refactor that swaps +/// back to a `.find(...).map(...) == Some(...)` shape fails +/// loudly rather than re-introducing the bug. +/// +/// Drive's executor explicitly supports the two-range +/// `GroupByRange + prove` shape (see +/// `outer_range_plus_inner_range_with_prove_and_group_by_range_routes_to_carrier_proof` +/// in `rs-drive`); the router must reach it regardless of +/// which range clause the caller wrote first. +#[test] +fn group_by_routing_is_independent_of_two_range_clause_order() { + let make_request = |where_clauses: Vec| { + let request = GetDocumentsRequestV1 { + selects: select_count_star(), + group_by: vec!["brand".to_string()], + ..empty_v1_request() + }; + validate_and_route_for_tests(&request, &where_clauses).unwrap() + }; + + let brand_range = WhereClause { + field: "brand".to_string(), + operator: WhereOperator::GreaterThan, + value: platform_value!("acme"), + }; + let color_range = WhereClause { + field: "color".to_string(), + operator: WhereOperator::GreaterThan, + value: platform_value!("blue"), + }; + + // GROUP BY brand: both orderings must route the same way. + assert_eq!( + make_request(vec![brand_range.clone(), color_range.clone()]), + "count_entries_via_range_field", + "GROUP BY brand routing must not depend on whether brand or color is first", + ); + assert_eq!( + make_request(vec![color_range, brand_range]), + "count_entries_via_range_field", + "GROUP BY brand routing must not depend on whether brand or color is first", ); } #[test] fn accept_count_group_by_in_field_routes_to_in_entries() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["brand".to_string()], ..empty_v1_request() }; @@ -436,7 +816,7 @@ fn accept_count_group_by_in_field_routes_to_in_entries() { #[test] fn accept_count_group_by_range_field_routes_to_range_entries() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["color".to_string()], ..empty_v1_request() }; @@ -454,7 +834,7 @@ fn accept_count_group_by_range_field_routes_to_range_entries() { #[test] fn accept_count_group_by_compound_routes_to_compound_entries() { let request = GetDocumentsRequestV1 { - select: V1Select::Count as i32, + selects: select_count_star(), group_by: vec!["brand".to_string(), "color".to_string()], ..empty_v1_request() }; @@ -544,14 +924,15 @@ fn e2e_documents_select_matches_v0() { let request_v1 = GetDocumentsRequestV1 { data_contract_id: contract.id().to_vec(), document_type: "widget".to_string(), - r#where: Vec::new(), + where_clauses: Vec::new(), order_by: Vec::new(), limit: None, start: None, prove: false, - select: V1Select::Documents as i32, + selects: select_documents(), group_by: Vec::new(), having: Vec::new(), + offset: None, }; let v1_result = platform .query_documents_v1(request_v1, &state, version) @@ -574,14 +955,20 @@ fn e2e_having_rejection_surfaces_in_response() { let request = GetDocumentsRequestV1 { data_contract_id: vec![0u8; 32], document_type: "anything".to_string(), - r#where: Vec::new(), + where_clauses: Vec::new(), order_by: Vec::new(), limit: None, start: None, prove: false, - select: V1Select::Count as i32, + selects: select_count_star(), group_by: Vec::new(), - having: vec![0xFF, 0xFE], + having: vec![hc( + having_aggregate::Function::Sum, + "amount", + having_clause::Operator::GreaterThan, + Value::U64(100), + )], + offset: None, }; let result = platform .query_documents_v1(request, &state, version) @@ -608,14 +995,15 @@ fn reject_start_with_select_count() { let request = GetDocumentsRequestV1 { data_contract_id: vec![0u8; 32], document_type: "widget".to_string(), - r#where: Vec::new(), + where_clauses: Vec::new(), order_by: Vec::new(), limit: None, start: Some(V1Start::StartAfter(vec![1u8; 32])), prove: false, - select: V1Select::Count as i32, + selects: select_count_star(), group_by: Vec::new(), having: Vec::new(), + offset: None, }; let result = platform .query_documents_v1(request, &state, version) @@ -654,11 +1042,17 @@ mod ported_v0_count_tests { // so the inner module sees `validate_and_route_for_tests`, // `GetDocumentsRequestV1`, etc. directly. use super::super::*; + use super::{oc, select_count_star, select_documents, wc}; use crate::query::tests::{setup_platform, store_data_contract, store_document}; use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select as V1Select; + use dapi_grpc::platform::v0::get_documents_request::{ + OrderClause as ProtoOrderClause, WhereClause as ProtoWhereClause, + WhereOperator as ProtoWhereOperator, + }; use dpp::dashcore::Network; use dpp::data_contract::document_type::random_document::CreateRandomDocument; use dpp::document::DocumentV0Setters; + use dpp::platform_value::Value; use dpp::tests::json_document::json_document_to_contract_with_ids; use rand::rngs::StdRng; use rand::SeedableRng; @@ -696,15 +1090,6 @@ mod ported_v0_count_tests { .data_contract_owned() } - fn serialize_where_clauses_to_cbor(where_clauses: Vec) -> Vec { - use ciborium::value::Value as CborValue; - let cbor: CborValue = TryInto::::try_into(Value::Array(where_clauses)) - .expect("expected to convert where clauses to cbor value"); - let mut out = Vec::new(); - ciborium::ser::into_writer(&cbor, &mut out).expect("expected to serialize where clauses"); - out - } - fn store_person_document( platform: &crate::test::helpers::setup::TempPlatform, data_contract: &dpp::prelude::DataContract, @@ -759,8 +1144,8 @@ mod ported_v0_count_tests { fn count_v1_request( data_contract_id: Vec, document_type: &str, - where_bytes: Vec, - order_by_bytes: Vec, + where_clauses: Vec, + order_by: Vec, group_by: Vec, limit: Option, prove: bool, @@ -768,14 +1153,15 @@ mod ported_v0_count_tests { GetDocumentsRequestV1 { data_contract_id, document_type: document_type.to_string(), - r#where: where_bytes, - order_by: order_by_bytes, + where_clauses, + order_by, limit, start: None, prove, - select: V1Select::Count as i32, + selects: select_count_star(), group_by, having: Vec::new(), + offset: None, } } @@ -923,16 +1309,16 @@ mod ported_v0_count_tests { ); } - let where_clauses = vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text("in".to_string()), + let where_clauses = vec![wc( + "age", + ProtoWhereOperator::In, Value::Array(vec![Value::U64(30), Value::U64(40)]), - ])]; + )]; let request = count_v1_request( data_contract.id().to_vec(), "person", - serialize_where_clauses_to_cbor(where_clauses), + where_clauses, Vec::new(), vec!["age".to_string()], None, @@ -1014,16 +1400,16 @@ mod ported_v0_count_tests { ); } - let where_clauses = vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text("in".to_string()), + let where_clauses = vec![wc( + "age", + ProtoWhereOperator::In, Value::Array(vec![Value::U64(30), Value::U64(40)]), - ])]; + )]; let request = count_v1_request( data_contract.id().to_vec(), "person", - serialize_where_clauses_to_cbor(where_clauses), + where_clauses, Vec::new(), /* group_by = */ Vec::new(), /* limit = */ None, @@ -1071,16 +1457,12 @@ mod ported_v0_count_tests { .expect("expected to get json based contract"); store_data_contract(&platform, &data_contract, version); - let where_clauses = vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text(">".to_string()), - Value::U64(20), - ])]; + let where_clauses = vec![wc("age", ProtoWhereOperator::GreaterThan, Value::U64(20))]; let request = count_v1_request( data_contract.id().to_vec(), "person", - serialize_where_clauses_to_cbor(where_clauses), + where_clauses, Vec::new(), Vec::new(), None, @@ -1145,16 +1527,16 @@ mod ported_v0_count_tests { ); } - let where_clauses = vec![Value::Array(vec![ - Value::Text("firstName".to_string()), - Value::Text("==".to_string()), + let where_clauses = vec![wc( + "firstName", + ProtoWhereOperator::Equal, Value::Text("Alice".to_string()), - ])]; + )]; let request = count_v1_request( data_contract.id().to_vec(), "person", - serialize_where_clauses_to_cbor(where_clauses), + where_clauses, Vec::new(), Vec::new(), None, @@ -1261,21 +1643,18 @@ mod ported_v0_count_tests { ); } - let where_clauses = vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text("in".to_string()), + let where_clauses = vec![wc( + "age", + ProtoWhereOperator::In, Value::Array(vec![Value::U64(30), Value::U64(40)]), - ])]; - let order_by = vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text("asc".to_string()), - ])]; + )]; + let order_by = vec![oc("age", /* ascending = */ true)]; let request = count_v1_request( data_contract.id().to_vec(), "person", - serialize_where_clauses_to_cbor(where_clauses), - serialize_where_clauses_to_cbor(order_by), + where_clauses, + order_by, vec!["age".to_string()], None, true, @@ -1362,23 +1741,20 @@ mod ported_v0_count_tests { } let make_request = |group_by: Vec, limit: Option, ascending: Option| { - let where_clauses = vec![Value::Array(vec![ - Value::Text("color".to_string()), - Value::Text(">".to_string()), + let where_clauses = vec![wc( + "color", + ProtoWhereOperator::GreaterThan, Value::Text("blue".to_string()), - ])]; - let order_by_bytes = match ascending { - Some(asc) => serialize_where_clauses_to_cbor(vec![Value::Array(vec![ - Value::Text("color".to_string()), - Value::Text(if asc { "asc" } else { "desc" }.to_string()), - ])]), + )]; + let order_by = match ascending { + Some(asc) => vec![oc("color", asc)], None => Vec::new(), }; count_v1_request( contract.id().to_vec(), "widget", - serialize_where_clauses_to_cbor(where_clauses), - order_by_bytes, + where_clauses, + order_by, group_by, limit, false, @@ -1493,15 +1869,15 @@ mod ported_v0_count_tests { store_document(&platform, &contract, document_type, &doc, platform_version); } - let where_clauses = vec![Value::Array(vec![ - Value::Text("color".to_string()), - Value::Text(">".to_string()), + let where_clauses = vec![wc( + "color", + ProtoWhereOperator::GreaterThan, Value::Text("blue".to_string()), - ])]; + )]; let request = count_v1_request( contract.id().to_vec(), "widget", - serialize_where_clauses_to_cbor(where_clauses), + where_clauses, Vec::new(), vec!["color".to_string()], None, diff --git a/packages/rs-drive-proof-verifier/src/lib.rs b/packages/rs-drive-proof-verifier/src/lib.rs index cece98edd60..86392109d75 100644 --- a/packages/rs-drive-proof-verifier/src/lib.rs +++ b/packages/rs-drive-proof-verifier/src/lib.rs @@ -10,7 +10,8 @@ pub mod types; mod verify; pub use error::Error; pub use proof::document_count::{ - verify_aggregate_count_proof, verify_distinct_count_proof, verify_point_lookup_count_proof, + verify_aggregate_count_proof, verify_carrier_aggregate_count_proof, + verify_distinct_count_proof, verify_point_lookup_count_proof, verify_primary_key_count_tree_proof, DocumentCount, }; pub use proof::document_split_count::DocumentSplitCounts; diff --git a/packages/rs-drive-proof-verifier/src/proof/document_count.rs b/packages/rs-drive-proof-verifier/src/proof/document_count.rs index 4fa1fc970a4..395feb6de69 100644 --- a/packages/rs-drive-proof-verifier/src/proof/document_count.rs +++ b/packages/rs-drive-proof-verifier/src/proof/document_count.rs @@ -222,6 +222,77 @@ pub fn verify_primary_key_count_tree_proof( Ok(count) } +/// Verify a **carrier** `AggregateCountOnRange` proof against a +/// `rangeCountable: true` index and return the per-`In`-branch +/// counts. +/// +/// Thin tenderdash-composition wrapper over +/// [`DriveDocumentCountQuery::verify_carrier_aggregate_count_proof`] +/// in rs-drive. Used by the prove path when the request shape +/// is `select=COUNT, group_by=[in_field], where = In(in_field) + +/// range(other_field), prove=true` — drive's `detect_mode` routes +/// that shape to `DocumentCountMode::RangeAggregateCarrierProof` +/// (grovedb PR #663's carrier-ACOR primitive), which collapses +/// each In branch's range into a single committed `u64` rather +/// than emitting per-distinct-key entries. Result is one +/// [`SplitCountEntry`] per **present** In branch: +/// `in_key = `, `key = []` (no terminator — +/// the count is for the whole range slice under that In branch), +/// `count = Some(n)`. Absent In branches are omitted; callers +/// that need to surface "queried but absent" diff their In array +/// against the returned `in_key`s. +/// +/// ## Trade-off vs. `verify_distinct_count_proof` +/// +/// Both shapes verify range-count queries with an In on the +/// prefix. The distinct variant emits one `KVCount` op per +/// `(in_key, range_key)` pair — proof size scales with the +/// number of distinct values matched. The carrier variant emits +/// one `u64` per In branch — proof size scales with `|In|`, +/// independent of how many distinct range values each branch +/// covers. Drive picks between them based on whether the caller +/// asked for distinct entries (`GroupByCompound`) or per-In +/// aggregates (`GroupByIn`). +/// +/// ## Limit semantics +/// +/// `limit: Option` mirrors the prover's `SizedQuery::limit` +/// — caps the per-branch carrier walk. The verifier +/// reconstructs the same path query bytes from `(query, limit)`, +/// so the value passed here must match what the server used to +/// generate the proof (validate-don't-clamp on the prove path, +/// same contract as `verify_distinct_count_proof`). +pub fn verify_carrier_aggregate_count_proof( + query: &DriveDocumentCountQuery, + proof: &Proof, + mtd: &ResponseMetadata, + limit: Option, + platform_version: &PlatformVersion, + provider: &dyn ContextProvider, +) -> Result, Error> { + let (root_hash, per_key_counts) = query + .verify_carrier_aggregate_count_proof(&proof.grovedb_proof, limit, platform_version) + .map_drive_error(proof, mtd)?; + + verify_tenderdash_proof(proof, mtd, &root_hash, provider)?; + + // Map drive's `Vec<(Vec, u64)>` carrier shape onto the + // SDK's `Vec` so the call sites can stay + // uniform across `verify_distinct_count_proof` / + // `verify_point_lookup_count_proof` / this. `key` is empty + // because the carrier variant doesn't emit terminator keys — + // each entry's `in_key` is the only routable handle. + let entries = per_key_counts + .into_iter() + .map(|(in_key, count)| SplitCountEntry { + in_key: Some(in_key), + key: Vec::new(), + count: Some(count), + }) + .collect(); + Ok(entries) +} + #[cfg(test)] mod tests { //! Local-only tests for parts of this module that don't need a diff --git a/packages/rs-drive/benches/document_count_worst_case.rs b/packages/rs-drive/benches/document_count_worst_case.rs index 0853ffef95f..c4b0558cf02 100644 --- a/packages/rs-drive/benches/document_count_worst_case.rs +++ b/packages/rs-drive/benches/document_count_worst_case.rs @@ -2032,16 +2032,31 @@ fn count_request<'a>( limit: Option, prove: bool, ) -> DocumentCountRequest<'a> { + use drive::query::drive_document_count_query::drive_dispatcher::{ + order_clauses_from_value, where_clauses_from_value, + }; + let document_type = fixture .data_contract .document_type_for_name(DOCUMENT_TYPE_NAME) .expect("expected widget document type"); + // The bench fixtures express where/order_by as `Value::Array` + // shapes (matching the wire-CBOR layout). Parse them into + // structured `Vec` / `Vec` here so the + // bench keeps its compact fixture vocabulary while the + // dispatcher consumes the same typed form the v1 ABCI handler + // produces. + let where_clauses = where_clauses_from_value(&raw_where_value) + .expect("bench fixture builds a valid `where` shape"); + let order_clauses = order_clauses_from_value(&raw_order_by_value) + .expect("bench fixture builds a valid `order_by` shape"); + DocumentCountRequest { contract: &fixture.data_contract, document_type, - raw_where_value, - raw_order_by_value, + where_clauses, + order_clauses, mode, limit, prove, diff --git a/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs b/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs index cf55b2c65c4..35ebfabe4a3 100644 --- a/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs +++ b/packages/rs-drive/src/drive/contract/insert/insert_contract/v0/mod.rs @@ -3938,14 +3938,15 @@ mod range_countable_index_e2e_tests { .expect("apply contract"); let document_type = contract.document_type_for_name("car").expect("car doctype"); - // Build a where-clause `Value::Array` of one range clause: - // [["lot", ">", "b"]]. Mirrors the wire shape the abci - // handler hands to drive after CBOR-decoding. - let where_clause_value = Value::Array(vec![Value::Array(vec![ - Value::Text("lot".to_string()), - Value::Text(">".to_string()), - Value::Text("b".to_string()), - ])]); + // Single range clause `lot > "b"` as a typed `WhereClause`. + // The dispatcher runs the same validate-and-canonicalize + // step the CBOR-shaped path runs. + use crate::query::{WhereClause, WhereOperator}; + let where_clauses = vec![WhereClause { + field: "lot".to_string(), + operator: WhereOperator::GreaterThan, + value: Value::Text("b".to_string()), + }]; let drive_config = crate::config::DriveConfig::default(); let too_large = drive_config.max_query_limit as u32 + 1; @@ -3953,8 +3954,8 @@ mod range_countable_index_e2e_tests { let request = DocumentCountRequest { contract: &contract, document_type, - raw_where_value: where_clause_value, - raw_order_by_value: dpp::platform_value::Value::Null, + where_clauses, + order_clauses: Vec::new(), mode: crate::query::CountMode::GroupByRange, limit: Some(too_large), prove: true, diff --git a/packages/rs-drive/src/query/drive_document_count_query/drive_dispatcher.rs b/packages/rs-drive/src/query/drive_document_count_query/drive_dispatcher.rs index aecfc68a460..a43f5b8f8a7 100644 --- a/packages/rs-drive/src/query/drive_document_count_query/drive_dispatcher.rs +++ b/packages/rs-drive/src/query/drive_document_count_query/drive_dispatcher.rs @@ -36,45 +36,41 @@ use grovedb::TransactionArg; /// All inputs required for the unified document-count entry point /// [`Drive::execute_document_count_request`]. Built by the gRPC -/// handler from a `GetDocumentsCountRequestV0` after CBOR-decoding + +/// handler from a `GetDocumentsRequestV1` after wire-decoding + /// contract lookup; drive owns everything past this point including -/// mode detection, index picking, and per-mode dispatch. +/// mode-detection-from-clauses, index picking, and per-mode dispatch. /// -/// `raw_where_value` and `raw_order_by_value` arrive as CBOR-decoded -/// `Value`s and the dispatcher parses them once into structured -/// `Vec` / `Vec` for mode detection + -/// per-mode executors. None of the count executors consume the raw -/// `Value` form — the structured parse is the single source of -/// truth past the dispatcher entry point. +/// `where_clauses` and `order_clauses` arrive already structured — +/// the v1 ABCI handler converts proto `repeated WhereClause` / +/// `repeated OrderClause` upstream; benches and tests that want a +/// `Value`-shape fixture call [`where_clauses_from_value`] / +/// [`order_clauses_from_value`] to parse before constructing the +/// request. The dispatcher entry point runs +/// [`validate_and_canonicalize_where_clauses`] on the input so +/// shape-validation rejection (duplicate equal, multiple In, …) +/// and the `> AND <` → `between*` canonicalization happen +/// regardless of upstream path. pub struct DocumentCountRequest<'a> { /// Live contract (already loaded by the handler). pub contract: &'a dpp::data_contract::DataContract, /// Resolved document type within `contract`. pub document_type: DocumentTypeRef<'a>, - /// Decoded `where` value as it came off the wire (after CBOR - /// decode). The dispatcher parses this into `Vec` - /// once (`where_clauses_from_value`) for every downstream - /// consumer — mode detection, index picking, and the per-mode - /// executors all operate on the structured form. - /// - /// Mirrors how the regular `query_documents_v0` handler - /// delegates where-clause decomposition to drive: the abci - /// layer just CBOR-decodes and hands the raw value down. - pub raw_where_value: dpp::platform_value::Value, - /// Decoded `order_by` value as it came off the wire. Parsed - /// once via `order_clauses_from_value` into - /// `Vec`. The first clause's direction governs - /// split-mode entry ordering (per-`In`-value / per-distinct- - /// value-in-range) and, on the `RangeDistinctProof` prove - /// path, is part of the path-query bytes the SDK reconstructs - /// to verify the proof. `PointLookupProof` and the no-proof - /// `Total` / `PerInValue` paths don't read order_by. - /// - /// `Value::Null` (empty `order_by` field on the wire) → no - /// clauses. The dispatcher synthesizes a default direction of - /// "ascending" for split-mode response ordering when no clauses - /// are present. - pub raw_order_by_value: dpp::platform_value::Value, + /// Structured `where` clauses. The dispatcher runs the same + /// [`WhereClause::group_clauses`] validator + same-field + /// range-pair merge the regular document-query path runs (see + /// [`validate_and_canonicalize_where_clauses`]'s docstring for + /// the catalog of rejections this enables and the In/range + + /// `between*` canonicalization rules) before mode detection. + pub where_clauses: Vec, + /// Structured `order_by` clauses. The first clause's direction + /// governs split-mode entry ordering (per-`In`-value / + /// per-distinct-value-in-range) and, on the + /// `RangeDistinctProof` prove path, is part of the path-query + /// bytes the SDK reconstructs to verify the proof. + /// `PointLookupProof` and the no-proof `Total` / `PerInValue` + /// paths don't read order_by. Empty list → ascending default + /// for split-mode response ordering. + pub order_clauses: Vec, /// SQL-shaped output mode — the caller's `(select, group_by)` /// contract resolved into one of four shapes (Aggregate, /// GroupByIn, GroupByRange, GroupByCompound). The dispatcher @@ -171,7 +167,9 @@ pub enum DocumentCountResponse { /// triple that `group_clauses` returns. (The regular query path's /// `InternalClauses::extract_from_clauses` uses the triple; the /// count path doesn't.) -fn where_clauses_from_value(value: &dpp::platform_value::Value) -> Result, Error> { +pub fn where_clauses_from_value( + value: &dpp::platform_value::Value, +) -> Result, Error> { let clauses: Vec = match value { dpp::platform_value::Value::Null => Vec::new(), dpp::platform_value::Value::Array(clauses) => clauses @@ -192,22 +190,56 @@ fn where_clauses_from_value(value: &dpp::platform_value::Value) -> Result`. Single source of truth for the count-endpoint +/// shape contract; called both from the legacy CBOR-decoded entry +/// [`where_clauses_from_value`] and from the dispatcher's typed +/// entry, [`Drive::execute_document_count_request`]. +/// +/// Despite the name, this function is **validation-only** in the +/// worktree's base — it does not re-shape the clauses (no +/// `> AND <` → `between*` merge). The "canonicalize" suffix is +/// reserved for the eventual carrier-aggregate landing where a +/// same-field range-pair merge becomes load-bearing; on the +/// current code path `WhereClause::group_clauses` only classifies, +/// and the merged form is computed lazily inside the executors +/// when an executor needs it. +/// +/// The validator (`WhereClause::group_clauses`) rejects: +/// - Duplicate `Equal` clauses on the same field +/// (`DuplicateNonGroupableClauseSameField`). +/// - Multiple `In` clauses (`MultipleInClauses`). +/// - Multiple non-groupable range clauses (`MultipleRangeClauses`). +/// - Equality + `In` on the same field, range + equality/In on the +/// same field (`DuplicateNonGroupableClauseSameField` / +/// `InvalidWhereClauseComponents`). +/// +/// Without this validation, downstream +/// [`DriveDocumentCountQuery::find_countable_index_for_where_clauses`] +/// collapses repeated fields into a `BTreeSet` and +/// [`DriveDocumentCountQuery::point_lookup_count_path_query`] +/// resolves each index property with a single `.find(...)` — both +/// of which silently pick the first clause on a duplicated field +/// and return a count for an arbitrarily reduced query rather than +/// rejecting the malformed request. +/// +/// **Exception**: `MultipleRangeClauses` is intentionally tolerated +/// here. The regular-query parser rejects two ranges on different +/// fields wholesale (its callers expect +/// `(equal_clauses, in_clause, range_clause)` triples), but the +/// count-query path accepts the carrier-aggregate shape +/// (`outer_range + inner_ACOR_range` on different fields, e.g. +/// G8). Structural validation for that shape lives in +/// [`DriveDocumentCountQuery::detect_mode`] (which knows about +/// `CountMode::GroupByRange`-with-two-ranges and routes to +/// `DocumentCountMode::RangeAggregateCarrierProof`); replicating +/// it here would be redundant. +pub fn validate_and_canonicalize_where_clauses( + clauses: Vec, +) -> Result, Error> { match WhereClause::group_clauses(&clauses) { Ok(_) => {} Err(Error::Query(QuerySyntaxError::MultipleRangeClauses(_))) => {} @@ -223,7 +255,9 @@ fn where_clauses_from_value(value: &dpp::platform_value::Value) -> Result Result, Error> { +pub fn order_clauses_from_value( + value: &dpp::platform_value::Value, +) -> Result, Error> { match value { dpp::platform_value::Value::Null => Ok(Vec::new()), dpp::platform_value::Value::Array(clauses) => clauses @@ -282,13 +316,15 @@ impl Drive { ) -> Result { use dpp::data_contract::accessors::v0::DataContractV0Getters; - // Parse where clauses out of the raw decoded `Value` once, - // then thread them through the per-mode executors. Mirrors - // how the regular `query_documents_v0` handler delegates this - // to `DriveDocumentQuery::from_decomposed_values` — - // where-clause decomposition is a drive concern, not abci's. - let where_clauses = where_clauses_from_value(&request.raw_where_value)?; - let order_clauses = order_clauses_from_value(&request.raw_order_by_value)?; + // Validate + canonicalize the structured `where_clauses` — + // same rejections the regular document-query path runs, + // applied here so the count endpoint's shape contract is + // independent of whether the caller arrived via the CBOR- + // shaped legacy path or the v1 typed-proto path. See + // [`validate_and_canonicalize_where_clauses`]'s docstring + // for the catalog of rejections. + let where_clauses = validate_and_canonicalize_where_clauses(request.where_clauses)?; + let order_clauses = request.order_clauses; // Split-mode entry direction is whatever the first orderBy // clause specifies. Empty orderBy → ascending default. Used diff --git a/packages/rs-drive/src/query/drive_document_count_query/mod.rs b/packages/rs-drive/src/query/drive_document_count_query/mod.rs index a30ed37ed02..8ad2a644327 100644 --- a/packages/rs-drive/src/query/drive_document_count_query/mod.rs +++ b/packages/rs-drive/src/query/drive_document_count_query/mod.rs @@ -213,10 +213,18 @@ pub struct SplitCountEntry { /// prove)` by [`DriveDocumentCountQuery::detect_mode`] just before /// dispatch. /// -/// The invariants below are enforced upstream (in drive-abci's -/// `validate_and_route`) before a `DocumentCountRequest` is built. -/// They're documented here so any new caller knows the -/// shape-validity contract attached to each variant. +/// **Result shape vs. executor strategy.** Each variant names a +/// result shape — the per-variant docstring lists the +/// where-clause shapes that route to that result shape and +/// notes which executor strategy +/// [`DriveDocumentCountQuery::detect_mode`] picks for each. +/// `(in_field, range_field)` combinations on the same request +/// are accepted on multiple `CountMode` variants — the executor +/// strategy distinguishes them. Upstream routing +/// (drive-abci's `validate_and_route`) picks the `CountMode` +/// from the caller's `group_by`; downstream `detect_mode` +/// converts the `(CountMode, where_clauses, prove)` triple into +/// the resolved [`DocumentCountMode`]. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum CountMode { /// `select=COUNT, group_by=[]`. Single u64 result. @@ -236,8 +244,17 @@ pub enum CountMode { /// `select=COUNT, group_by=[in_field]`. One entry per `In` value. /// - /// Where-clause invariants: exactly one `In` clause whose field - /// matches `group_by[0]`; no range clause. + /// Where-clause shapes accepted: + /// - one `In` clause on `group_by[0]` (no range clause): the + /// canonical shape — routes to `PointLookupProof` on the + /// prove path, `PerInValue` on the no-proof path. + /// - one `In` on `group_by[0]` AND a range clause on a + /// different field: routes to + /// `RangeAggregateCarrierProof` on the prove path + /// (grovedb #663 carrier-ACOR — one verified `u64` per + /// In branch, range collapsed) and `RangeNoProof` on the + /// no-prove path (per-In-branch range walk). Both produce + /// entries that line up with the caller's GROUP BY shape. /// /// `limit` is rejected upstream when set. The In array is /// already capped at 100 entries by `WhereClause::in_values()`, @@ -252,8 +269,21 @@ pub enum CountMode { /// `select=COUNT, group_by=[range_field]`. One entry per distinct /// value within the range. /// - /// Where-clause invariants: exactly one range clause whose field - /// matches `group_by[0]`; no `In` clause. + /// Where-clause shapes accepted: + /// - one range clause on `group_by[0]` (no `In` clause): + /// canonical RangeDistinctProof / RangeNoProof distinct. + /// - one range on `group_by[0]` AND an `In` clause on a + /// different field: prove path keeps `RangeDistinctProof` + /// with In-fanout via grovedb subquery; no-prove path uses + /// `RangeNoProof` distinct on the merged result. Per- + /// distinct-value entries cover both branches of the In. + /// - two range clauses on different fields, the second + /// being `group_by[0]`: routes to + /// `RangeAggregateCarrierProof` (outer range + inner-ACOR + /// carrier per grovedb #664 outer-range cap). See + /// `outer_range_plus_inner_range_with_prove_and_group_by_range_routes_to_carrier_proof` + /// for the regression test pinning this shape. + /// /// `limit` caps the number of distinct values; on the prove /// path it's validated-not-clamped (oversized values rejected /// with `InvalidLimit`). @@ -262,8 +292,10 @@ pub enum CountMode { /// `select=COUNT, group_by=[in_field, range_field]`. One entry /// per `(in_key, range_key)` pair. /// - /// Where-clause invariants: exactly one `In` clause on `group_by[0]` - /// AND exactly one range clause on `group_by[1]`. + /// Where-clause invariants: an `In` clause on `group_by[0]` + /// AND a range clause on `group_by[1]` (match-any over + /// the where-clauses list — clause ordering on the wire + /// doesn't affect routing). /// `limit` is a **global cap on the emitted `(in_key, key)` lex /// stream**, not per-In-branch. The executor pushes a single /// `SizedQuery::limit` over the compound walk, so a request diff --git a/packages/rs-drive/src/query/drive_document_count_query/tests.rs b/packages/rs-drive/src/query/drive_document_count_query/tests.rs index 7c322f5902c..60a5f50280c 100644 --- a/packages/rs-drive/src/query/drive_document_count_query/tests.rs +++ b/packages/rs-drive/src/query/drive_document_count_query/tests.rs @@ -501,12 +501,14 @@ fn test_aggregate_count_in_fan_out_ignores_default_query_limit() { ..Default::default() }; - // Wire-shape `where` value the dispatcher CBOR-decodes: a single - // `In` clause on `age` with all 8 values. - let raw_where_value = Value::Array(vec![Value::Array(vec![ - Value::Text("age".to_string()), - Value::Text("in".to_string()), - Value::Array(vec![ + // Typed `In` clause on `age` with all 8 values. The dispatcher + // runs the same validate-and-canonicalize step the CBOR-shaped + // path runs (see [`validate_and_canonicalize_where_clauses`]), + // so structurally identical to the legacy fixture. + let where_clauses = vec![WhereClause { + field: "age".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![ Value::U64(30), Value::U64(40), Value::U64(50), @@ -516,13 +518,13 @@ fn test_aggregate_count_in_fan_out_ignores_default_query_limit() { Value::U64(90), Value::U64(100), ]), - ])]); + }]; let request = DocumentCountRequest { contract: &data_contract, document_type, - raw_where_value, - raw_order_by_value: Value::Null, + where_clauses, + order_clauses: Vec::new(), mode: CountMode::Aggregate, // Aggregate rejects explicit `limit` upstream; the // dispatcher must not substitute `default_query_limit` for @@ -1303,26 +1305,26 @@ fn test_compound_range_in_summed_no_proof_uses_per_in_aggregate_fanout() { // which loops over the In values and issues // `query_aggregate_count` per branch. let drive_config = DriveConfig::default(); - let raw_where_value = Value::Array(vec![ - Value::Array(vec![ - Value::Text("brand".to_string()), - Value::Text("in".to_string()), - Value::Array(vec![ + let where_clauses = vec![ + WhereClause { + field: "brand".to_string(), + operator: WhereOperator::In, + value: Value::Array(vec![ Value::Text("acme".to_string()), Value::Text("contoso".to_string()), ]), - ]), - Value::Array(vec![ - Value::Text("color".to_string()), - Value::Text(">".to_string()), - Value::Text("blue".to_string()), - ]), - ]); + }, + WhereClause { + field: "color".to_string(), + operator: WhereOperator::GreaterThan, + value: Value::Text("blue".to_string()), + }, + ]; let request = DocumentCountRequest { contract: &data_contract, document_type, - raw_where_value, - raw_order_by_value: Value::Null, + where_clauses, + order_clauses: Vec::new(), mode: CountMode::Aggregate, limit: None, prove: false, @@ -1379,24 +1381,24 @@ fn test_count_request_with_duplicate_equality_clauses_is_rejected() { // so the answer should be 0, but a regression would return // count("firstName = Alice") or count("firstName = Bob") // depending on iteration order. - let raw_where_value = Value::Array(vec![ - Value::Array(vec![ - Value::Text("firstName".to_string()), - Value::Text("==".to_string()), - Value::Text("Alice".to_string()), - ]), - Value::Array(vec![ - Value::Text("firstName".to_string()), - Value::Text("==".to_string()), - Value::Text("Bob".to_string()), - ]), - ]); + let where_clauses = vec![ + WhereClause { + field: "firstName".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("Alice".to_string()), + }, + WhereClause { + field: "firstName".to_string(), + operator: WhereOperator::Equal, + value: Value::Text("Bob".to_string()), + }, + ]; let drive_config = DriveConfig::default(); let request = DocumentCountRequest { contract: &data_contract, document_type, - raw_where_value, - raw_order_by_value: Value::Null, + where_clauses, + order_clauses: Vec::new(), mode: CountMode::Aggregate, limit: None, prove: false, @@ -1579,19 +1581,19 @@ fn test_range_distinct_proof_uses_compile_time_default_query_limit_not_operator_ ..Default::default() }; - // Range clause `color > "blue"` as wire-shape (Value::Array of - // [field, op, value] tuples) — the dispatcher CBOR-decodes - // this internally into structured WhereClauses. - let raw_where_value = Value::Array(vec![Value::Array(vec![ - Value::Text("color".to_string()), - Value::Text(">".to_string()), - Value::Text("blue".to_string()), - ])]); + // Range clause `color > "blue"` as a typed WhereClause — + // the dispatcher runs validate-and-canonicalize internally and + // dispatches to the RangeDistinctProof path on `prove=true`. + let where_clauses = vec![WhereClause { + field: "color".to_string(), + operator: WhereOperator::GreaterThan, + value: Value::Text("blue".to_string()), + }]; let request = DocumentCountRequest { contract: &data_contract, document_type, - raw_where_value, - raw_order_by_value: Value::Null, + where_clauses, + order_clauses: Vec::new(), mode: CountMode::GroupByRange, limit: None, prove: true, diff --git a/packages/rs-drive/src/query/having.rs b/packages/rs-drive/src/query/having.rs new file mode 100644 index 00000000000..7a1d6f11c06 --- /dev/null +++ b/packages/rs-drive/src/query/having.rs @@ -0,0 +1,199 @@ +//! `HAVING` clause types for the v1 `getDocuments` count surface. +//! +//! HAVING differs from WHERE in two structural ways the type +//! system needs to reflect: +//! - The **left** operand is a per-group aggregate (`COUNT(*)`, +//! `SUM(field)`, `AVG(field)`) rather than a raw row field. +//! - The **right** operand is either a concrete value (`> 5`, +//! `BETWEEN 5 AND 10`, `IN (5, 10, 15)`) **or** a cross-group +//! ranking (`EQ MAX`, `IN TOP(5)`, `> MIN`). The ranking +//! right-operands (`MIN` / `MAX` / `TOP(N)` / `BOTTOM(N)`) are +//! meta-aggregates computed over the set of group results, so +//! `HAVING COUNT(*) IN TOP(5)` reads as "this group's count is +//! among the five largest group counts" — a concise way to +//! express top-N/bottom-N selection without window functions or +//! `ORDER BY` + `LIMIT`. +//! +//! The operator set matches [`crate::query::WhereOperator`] minus +//! `STARTS_WITH` (prefix matching has no meaning on a scalar +//! aggregate result, even one that's a string): scalar comparison, +//! `IN`, and all four `BETWEEN*` variants all carry through. +//! +//! Multi-clause HAVING (`HAVING COUNT(*) > 5 AND SUM(amount) > 100`) +//! is expressed by repeating [`HavingClause`] at the request +//! level — implicit AND, same shape as multiple `where_clauses` +//! entries. +//! +//! These types are shared between the wire-decoding layer +//! (`rs-drive-abci/src/query/document_query/v1/conversions.rs`) +//! and the SDK's request builder +//! (`rs-sdk/src/platform/documents/document_query.rs`) so the +//! drive-side struct is the single source of truth for the shape. +//! The server currently rejects any non-empty `having` with +//! `QuerySyntaxError::Unsupported("HAVING clause is not yet +//! implemented")` — the types exist so the wire surface is stable +//! when execution lands. + +use dpp::platform_value::Value; +#[cfg(feature = "serde")] +use serde::{Deserialize, Serialize}; + +/// Aggregate function applied to a group on the left side of a +/// [`HavingClause`]. These are the per-group aggregates whose +/// result is the scalar / numeric value the right-side operand +/// compares against. +/// +/// `MIN` / `MAX` / `TOP` / `BOTTOM` deliberately don't appear +/// here — they're cross-group ranking primitives that live on +/// the right side via [`HavingRanking`] (e.g. +/// `HAVING COUNT(*) EQ MAX`). +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum HavingAggregateFunction { + /// `COUNT(*)` when [`HavingAggregate::field`] is empty, + /// otherwise `COUNT(field)`. + Count, + /// `SUM(field)`. Numeric field required. + Sum, + /// `AVG(field)`. Numeric field required; result is `f64`. + Avg, +} + +/// Aggregate operand for the left side of a [`HavingClause`]. See +/// [`HavingAggregateFunction`] for the per-function `field` +/// requirements (empty only for `COUNT(*)`). +#[derive(Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub struct HavingAggregate { + /// The aggregate function applied to the group. + pub function: HavingAggregateFunction, + /// The field the aggregate is applied to. Empty only when + /// `function == Count` (to express `COUNT(*)`). + pub field: String, +} + +/// Cross-group ranking primitive on the right side of a +/// [`HavingClause`]. The ranking is computed over the **set of +/// group results** (one per row produced by `GROUP BY`), not over +/// the raw rows — so `HAVING COUNT(*) EQ MAX` selects groups +/// whose count equals the maximum count across all groups. +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum HavingRankingKind { + /// Smallest group-aggregate value across the result set + /// (single scalar). + Min, + /// Largest group-aggregate value across the result set + /// (single scalar). + Max, + /// Set of the `N` largest group-aggregate values. Pair with + /// `IN` for membership (`COUNT(*) IN TOP(5)`); single-value + /// operators (`EQ`, `>`, `<`, …) treat `TOP(1)` as the + /// maximum. + Top, + /// Set of the `N` smallest group-aggregate values. Symmetric + /// counterpart to [`Self::Top`]. + Bottom, +} + +/// Cross-group ranking operand: `kind` plus an optional `n` (only +/// meaningful for [`HavingRankingKind::Top`] / +/// [`HavingRankingKind::Bottom`]). +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub struct HavingRanking { + /// Which ranking primitive. + pub kind: HavingRankingKind, + /// Required for `Top` / `Bottom` (1-indexed: `n=1` is the + /// single largest / smallest); must be `None` for `Min` / + /// `Max`. The wire allows it on `Min` / `Max` for forward + /// compatibility, but evaluation rejects it as a malformed + /// ranking. + pub n: Option, +} + +/// Right-side operand of a [`HavingClause`]. Either a concrete +/// value (literal scalar or list-shaped operand for +/// `BETWEEN*`/`IN`) or a cross-group ranking reference +/// ([`HavingRanking`]). +/// +/// The split lives at the type level so the wire decoder rejects +/// half-built clauses ("operator says `IN`, right side is `MIN` +/// ranking with `n` set") at conversion time rather than letting +/// them reach the evaluator as ambiguous state. +#[derive(Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum HavingRightOperand { + /// Concrete value: scalar for `=` / `!=` / `<` / `<=` / `>` / + /// `>=`; 2-element list `[lower, upper]` for `Between*`; + /// list of candidates for `In`. + Value(Value), + /// Cross-group ranking reference. Operator compatibility: + /// scalar comparison operators work with `Min` / `Max` / + /// `Top(1)` / `Bottom(1)`; `In` works with `Top(N)` / + /// `Bottom(N)` (membership in the top-N / bottom-N set). + Ranking(HavingRanking), +} + +/// Comparison operator for a [`HavingClause`]. Mirrors +/// [`crate::query::WhereOperator`] minus `STARTS_WITH` (prefix +/// matching has no natural meaning against a scalar aggregate +/// result, even a string-typed one). `BETWEEN*` operand semantics +/// match `WhereOperator`: a 2-element list `[lower, upper]`; `IN` +/// expects a list of candidate values (or a cross-group ranking +/// set via [`HavingRightOperand::Ranking`]). +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum HavingOperator { + /// `aggregate = value`. + Equal, + /// `aggregate != value`. + NotEqual, + /// `aggregate > value`. + GreaterThan, + /// `aggregate >= value`. + GreaterThanOrEquals, + /// `aggregate < value`. + LessThan, + /// `aggregate <= value`. + LessThanOrEquals, + /// `aggregate BETWEEN lower AND upper` (inclusive on both + /// ends). `value` must be a 2-element list `[lower, upper]`. + Between, + /// `aggregate > lower AND aggregate < upper` (exclusive on + /// both ends). `value` shape same as `Between`. + BetweenExcludeBounds, + /// `aggregate > lower AND aggregate <= upper` (exclusive on + /// the left bound only). `value` shape same as `Between`. + BetweenExcludeLeft, + /// `aggregate >= lower AND aggregate < upper` (exclusive on + /// the right bound only). `value` shape same as `Between`. + BetweenExcludeRight, + /// `aggregate IN (v1, v2, …)`. `value` must be a list of + /// candidate values matching the aggregate's result type. + In, +} + +/// Single `HAVING ` clause. +/// +/// Multiple [`HavingClause`] entries in the request-level +/// `repeated HavingClause having` field are combined with implicit +/// `AND` — same semantics as multiple `where_clauses` entries. +/// `HAVING COUNT(*) > 5 AND SUM(amount) > 100` is two clauses, not +/// a tree; the wire has no dedicated `AND` node because the +/// repeated field already expresses it. Future `OR` capability +/// would land as an additional wire shape (e.g. a `HavingGroup` +/// message with a logical-op tag) rather than overloading this +/// type. +#[derive(Clone, Debug, PartialEq)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub struct HavingClause { + /// Left-side per-group aggregate operand. + pub aggregate: HavingAggregate, + /// Comparison operator. + pub operator: HavingOperator, + /// Right-side operand — either a concrete value or a + /// cross-group ranking. See [`HavingRightOperand`] for the + /// shape contract. + pub right: HavingRightOperand, +} diff --git a/packages/rs-drive/src/query/mod.rs b/packages/rs-drive/src/query/mod.rs index 3111cfe6f03..5a3e04aa3f6 100644 --- a/packages/rs-drive/src/query/mod.rs +++ b/packages/rs-drive/src/query/mod.rs @@ -3,19 +3,33 @@ use std::sync::Arc; #[cfg(any(feature = "server", feature = "verify"))] pub use { conditions::{ValueClause, WhereClause, WhereOperator}, - drive_document_count_query::{DocumentCountMode, DriveDocumentCountQuery, SplitCountEntry}, + // `CountMode` is the SQL-shape contract (Aggregate / + // GroupByIn / GroupByRange / GroupByCompound) the prover + // dispatches on; the verifier needs the same enum to route + // proof verification to the matching primitive + // (`DocumentCountMode`). Available under either `server` + // (executor input) or `verify` (proof-decode input). + drive_document_count_query::{ + CountMode, DocumentCountMode, DriveDocumentCountQuery, SplitCountEntry, + }, grovedb::{PathQuery, Query, QueryItem, SizedQuery}, + having::{ + HavingAggregate, HavingAggregateFunction, HavingClause, HavingOperator, HavingRanking, + HavingRankingKind, HavingRightOperand, + }, ordering::OrderClause, + projection::{SelectFunction, SelectProjection}, single_document_drive_query::SingleDocumentDriveQuery, single_document_drive_query::SingleDocumentDriveQueryContestedStatus, vote_polls_by_end_date_query::VotePollsByEndDateDriveQuery, vote_query::IdentityBasedVoteDriveQuery, }; +// `DocumentCountRequest` / `RangeCountOptions` are the +// server-side executor inputs and stay `server`-only. #[cfg(feature = "server")] pub use drive_document_count_query::{ - CountMode, DocumentCountRequest, DocumentCountResponse, RangeCountOptions, - MAX_LIMIT_AS_FAILSAFE, + DocumentCountRequest, DocumentCountResponse, RangeCountOptions, MAX_LIMIT_AS_FAILSAFE, }; // Imports available when either "server" or "verify" features are enabled #[cfg(any(feature = "server", feature = "verify"))] @@ -77,8 +91,12 @@ pub mod conditions; #[cfg(any(feature = "server", feature = "verify"))] mod defaults; #[cfg(any(feature = "server", feature = "verify"))] +pub mod having; +#[cfg(any(feature = "server", feature = "verify"))] pub mod ordering; #[cfg(any(feature = "server", feature = "verify"))] +pub mod projection; +#[cfg(any(feature = "server", feature = "verify"))] mod single_document_drive_query; // Module declarations exclusively for "server" feature @@ -762,19 +780,6 @@ impl<'a> DriveDocumentQuery<'a> { document_type: DocumentTypeRef<'a>, config: &DriveConfig, ) -> Result { - let limit = maybe_limit - .map_or(Some(config.default_query_limit), |limit_value| { - if limit_value == 0 || limit_value > config.default_query_limit { - None - } else { - Some(limit_value) - } - }) - .ok_or(Error::Query(QuerySyntaxError::InvalidLimit(format!( - "limit greater than max limit {}", - config.max_query_limit - ))))?; - let all_where_clauses: Vec = match where_clause { Value::Null => Ok(vec![]), Value::Array(clauses) => clauses @@ -794,28 +799,101 @@ impl<'a> DriveDocumentQuery<'a> { ))), }?; - let internal_clauses = InternalClauses::extract_from_clauses(all_where_clauses)?; - - let order_by: IndexMap = order_by - .map_or(vec![], |id_cbor| { - if let Value::Array(clauses) = id_cbor { - clauses - .iter() - .filter_map(|order_clause| { - if let Value::Array(clauses_components) = order_clause { - OrderClause::from_components(clauses_components).ok() - } else { - None - } + // Malformed `order_by` payloads reject the request — the + // pre-existing `filter_map(... .ok())` here silently dropped + // bad clauses (or the whole field for non-array shapes), + // which could mutate result ordering and (on the prove + // path) proof bytes without telling the caller. Tighten the + // contract: every clause must parse, and the top-level + // shape must be `Value::Null` or `Value::Array`. + let order_by_clauses: Vec = match order_by { + None | Some(Value::Null) => Vec::new(), + Some(Value::Array(clauses)) => clauses + .iter() + .map(|order_clause| match order_clause { + Value::Array(components) => { + OrderClause::from_components(components).map_err(|_| { + Error::Query(QuerySyntaxError::InvalidOrderByProperties( + "invalid order_by clause components", + )) }) - .collect() + } + _ => Err(Error::Query(QuerySyntaxError::InvalidOrderByProperties( + "order_by clause must be an array", + ))), + }) + .collect::, _>>()?, + Some(_) => { + return Err(Error::Query(QuerySyntaxError::InvalidOrderByProperties( + "order_by must be an array", + ))); + } + }; + + Self::from_typed_clauses( + all_where_clauses, + order_by_clauses, + maybe_limit, + start_at, + start_at_included, + block_time_ms, + contract, + document_type, + config, + ) + } + + /// Build a `DriveDocumentQuery` from already-structured where / + /// order_by clauses. This is the typed-input twin of + /// [`Self::from_decomposed_values`] — same downstream shape, just + /// without the `Value::Array(...)` parse step. + /// + /// Used by the v1 `getDocuments` ABCI handler whose wire format + /// carries `repeated WhereClause` / `repeated OrderClause` + /// natively (no CBOR envelope). The v0 path keeps using + /// `from_decomposed_values` so its CBOR-decoded inputs flow + /// through the existing `WhereClause::from_components` parser + /// for shape validation; the typed path expects that validation + /// (or the equivalent proto→drive conversion) to have run + /// upstream. + /// + /// Limit semantics mirror `from_decomposed_values`: + /// `maybe_limit = None` or `Some(0)` falls back to + /// `config.default_query_limit`; `Some(N)` with `N > + /// config.default_query_limit` is rejected as + /// `QuerySyntaxError::InvalidLimit`. + #[cfg(any(feature = "server", feature = "verify"))] + #[allow(clippy::too_many_arguments)] + pub fn from_typed_clauses( + where_clauses: Vec, + order_by_clauses: Vec, + maybe_limit: Option, + start_at: Option<[u8; 32]>, + start_at_included: bool, + block_time_ms: Option, + contract: &'a DataContract, + document_type: DocumentTypeRef<'a>, + config: &DriveConfig, + ) -> Result { + let limit = maybe_limit + .map_or(Some(config.default_query_limit), |limit_value| { + if limit_value == 0 || limit_value > config.default_query_limit { + None } else { - vec![] + Some(limit_value) } }) - .iter() - .map(|order_clause| Ok((order_clause.field.clone(), order_clause.to_owned()))) - .collect::, Error>>()?; + .ok_or(Error::Query(QuerySyntaxError::InvalidLimit(format!( + "limit greater than max limit {}", + config.max_query_limit + ))))?; + + let internal_clauses = InternalClauses::extract_from_clauses(where_clauses)?; + + let order_by: IndexMap = order_by_clauses + .into_iter() + .map(|c| (c.field.clone(), c)) + .collect(); Ok(DriveDocumentQuery { contract, diff --git a/packages/rs-drive/src/query/projection.rs b/packages/rs-drive/src/query/projection.rs new file mode 100644 index 00000000000..baa89594211 --- /dev/null +++ b/packages/rs-drive/src/query/projection.rs @@ -0,0 +1,140 @@ +//! `SELECT` projection types for the v1 `getDocuments` surface. +//! +//! The projection determines what the response carries: +//! - [`SelectFunction::Documents`]: matched rows (`ResultData.documents`). +//! - [`SelectFunction::Count`]: row counts — single aggregate when +//! `group_by` is empty, per-group entries otherwise. +//! - [`SelectFunction::Sum`] / [`SelectFunction::Avg`]: numeric +//! aggregate(s) of a named field — same single/per-group shape +//! contract as `Count`. +//! +//! Per-function `field` requirements live in +//! [`SelectProjection::field`]; the type itself just carries the +//! `(function, field)` pair. +//! +//! Shared between the wire-decoding layer +//! (`rs-drive-abci/src/query/document_query/v1/conversions.rs`) +//! and the SDK's request builder +//! (`rs-sdk/src/platform/documents/document_query.rs`). Today the +//! server only evaluates [`SelectFunction::Documents`] and the +//! `field`-less form of [`SelectFunction::Count`]; the other +//! shapes are wire-stable but rejected with +//! `QuerySyntaxError::Unsupported("… is not yet implemented")`. + +#[cfg(feature = "serde")] +use serde::{Deserialize, Serialize}; + +/// Projection function applied by `SELECT`. Distinct from +/// [`crate::query::HavingAggregateFunction`] because this enum +/// carries the document-fetch branch too — `SELECT` may return +/// rows, not just aggregates — so the two can't share a type. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Default)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub enum SelectFunction { + /// Return matched rows. The default so old fixtures / + /// builders that don't opt in get plain document-fetch + /// semantics. + #[default] + Documents, + /// `COUNT(*)` when [`SelectProjection::field`] is empty, + /// `COUNT(field)` (count of non-null `field` values) + /// otherwise. Empty-`field` form is currently the only + /// supported COUNT shape — the `field`-bearing form is + /// reserved for future server capability. + Count, + /// `SUM(field)`. Required field; numeric typed. Currently + /// always rejected with "not yet implemented". + Sum, + /// `AVG(field)`. Required field; numeric typed. Result is + /// `f64`. Currently always rejected with "not yet + /// implemented". + Avg, + /// `MIN(field)` — smallest value of `field` in each group + /// (or across all matching rows when `group_by` is empty). + /// Required field. Currently always rejected with "not yet + /// implemented"; **semantically distinct** from + /// [`crate::query::HavingRankingKind::Min`] which is a + /// cross-group ranking primitive on the HAVING right side. + Min, + /// `MAX(field)` — symmetric to [`Self::Min`] for the largest + /// value. Same not-yet-implemented contract; same caveat + /// versus [`crate::query::HavingRankingKind::Max`]. + Max, +} + +/// `(function, field)` projection. The `field` semantics depend +/// on `function`: +/// - [`SelectFunction::Documents`]: `field` must be empty. +/// - [`SelectFunction::Count`]: empty `field` means `COUNT(*)`; +/// non-empty means `COUNT(field)` (count of non-null values). +/// - [`SelectFunction::Sum`] / [`SelectFunction::Avg`]: `field` +/// is required and must be numeric-typed. +#[derive(Clone, Debug, PartialEq, Eq, Default)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +pub struct SelectProjection { + /// Projection function. + pub function: SelectFunction, + /// Field the function is applied to. See + /// [`SelectFunction`]'s per-variant docstring for the + /// per-function requirement. + pub field: String, +} + +impl SelectProjection { + /// Plain document fetch — the default projection. `field` is + /// empty. + pub fn documents() -> Self { + Self { + function: SelectFunction::Documents, + field: String::new(), + } + } + + /// `COUNT(*)` — empty `field`. + pub fn count_star() -> Self { + Self { + function: SelectFunction::Count, + field: String::new(), + } + } + + /// `COUNT(field)` — count of non-null values of `field`. + pub fn count_field(field: impl Into) -> Self { + Self { + function: SelectFunction::Count, + field: field.into(), + } + } + + /// `SUM(field)`. + pub fn sum(field: impl Into) -> Self { + Self { + function: SelectFunction::Sum, + field: field.into(), + } + } + + /// `AVG(field)`. + pub fn avg(field: impl Into) -> Self { + Self { + function: SelectFunction::Avg, + field: field.into(), + } + } + + /// `MIN(field)` — per-group / global minimum. + pub fn min(field: impl Into) -> Self { + Self { + function: SelectFunction::Min, + field: field.into(), + } + } + + /// `MAX(field)` — per-group / global maximum. + pub fn max(field: impl Into) -> Self { + Self { + function: SelectFunction::Max, + field: field.into(), + } + } +} diff --git a/packages/rs-platform-wallet/src/wallet/identity/network/profile.rs b/packages/rs-platform-wallet/src/wallet/identity/network/profile.rs index f1298284c2c..f805aa7dd01 100644 --- a/packages/rs-platform-wallet/src/wallet/identity/network/profile.rs +++ b/packages/rs-platform-wallet/src/wallet/identity/network/profile.rs @@ -155,7 +155,7 @@ impl IdentityWallet { // Build query: profile documents WHERE $ownerId = identity_id. let query = dash_sdk::platform::DocumentQuery { - select: dash_sdk::dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: dash_sdk::drive::query::SelectProjection::documents(), data_contract: Arc::clone(dashpay_contract), document_type_name: "profile".to_string(), where_clauses: vec![WhereClause { @@ -428,7 +428,7 @@ impl IdentityWallet { use dpp::platform_value::platform_value; let query = dash_sdk::platform::DocumentQuery { - select: dash_sdk::dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: dash_sdk::drive::query::SelectProjection::documents(), data_contract: Arc::clone(&dashpay_contract), document_type_name: "profile".to_string(), where_clauses: vec![WhereClause { diff --git a/packages/rs-sdk-ffi/src/document/queries/count.rs b/packages/rs-sdk-ffi/src/document/queries/count.rs index 358c51bc7e0..366eb41449f 100644 --- a/packages/rs-sdk-ffi/src/document/queries/count.rs +++ b/packages/rs-sdk-ffi/src/document/queries/count.rs @@ -18,10 +18,9 @@ use std::collections::BTreeMap; use std::ffi::{CStr, CString}; use std::os::raw::c_char; -use dash_sdk::dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select; use dash_sdk::dpp::platform_value::Value; use dash_sdk::dpp::prelude::DataContract; -use dash_sdk::drive::query::{OrderClause, WhereClause, WhereOperator}; +use dash_sdk::drive::query::{OrderClause, SelectProjection, WhereClause, WhereOperator}; use dash_sdk::platform::documents::document_query::DocumentQuery; use dash_sdk::platform::Fetch; use drive_proof_verifier::DocumentSplitCounts; @@ -381,7 +380,7 @@ pub unsafe extern "C" fn dash_sdk_document_count( // combinations (see proto docs). let group_by = parse_group_by_json(group_by_json)?; let count_query = base_query - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by_fields(group_by) .with_limit(limit_u32); diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index dd7e8774e54..5c97dca8952 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -28,7 +28,6 @@ thiserror = "2.0.17" tokio = { version = "1.40", features = ["macros", "time"] } tokio-util = { version = "0.7.12" } async-trait = { version = "0.1.83" } -ciborium = { version = "0.2.2" } serde = { version = "1.0.219", default-features = false, features = [ "rc", ], optional = true } diff --git a/packages/rs-sdk/src/platform/dashpay/contact_request_queries.rs b/packages/rs-sdk/src/platform/dashpay/contact_request_queries.rs index 802d7537ec8..2670ac96772 100644 --- a/packages/rs-sdk/src/platform/dashpay/contact_request_queries.rs +++ b/packages/rs-sdk/src/platform/dashpay/contact_request_queries.rs @@ -41,7 +41,7 @@ impl Sdk { // Query for sent contact requests (where this identity is the owner) // Note: We need to filter by $ownerId to get only this identity's sent requests let query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dashpay_contract, document_type_name: "contactRequest".to_string(), where_clauses: vec![WhereClause { @@ -83,7 +83,7 @@ impl Sdk { // Query for received contact requests (where this identity is toUserId) let query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dashpay_contract, document_type_name: "contactRequest".to_string(), where_clauses: vec![WhereClause { diff --git a/packages/rs-sdk/src/platform/documents/count_proof_helpers.rs b/packages/rs-sdk/src/platform/documents/count_proof_helpers.rs index d9d7df12382..b70e92b407e 100644 --- a/packages/rs-sdk/src/platform/documents/count_proof_helpers.rs +++ b/packages/rs-sdk/src/platform/documents/count_proof_helpers.rs @@ -14,7 +14,6 @@ //! [`DocumentSplitCounts`]: drive_proof_verifier::DocumentSplitCounts use crate::platform::documents::document_query::DocumentQuery; -use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select; use dapi_grpc::platform::v0::{GetDocumentsResponse, Proof, ResponseMetadata}; use dapi_grpc::platform::VersionedGrpcResponse; use dash_context_provider::ContextProvider; @@ -23,27 +22,39 @@ use dpp::{ data_contract::accessors::v0::DataContractV0Getters, data_contract::document_type::accessors::{DocumentTypeV0Getters, DocumentTypeV2Getters}, }; -use drive::query::DriveDocumentCountQuery; +use drive::query::{ + CountMode, DocumentCountMode, DriveDocumentCountQuery, SelectFunction, WhereOperator, +}; use drive_proof_verifier::{ - verify_aggregate_count_proof, verify_distinct_count_proof, verify_point_lookup_count_proof, + verify_aggregate_count_proof, verify_carrier_aggregate_count_proof, + verify_distinct_count_proof, verify_point_lookup_count_proof, verify_primary_key_count_tree_proof, SplitCountEntry, }; /// Validate that the caller-built [`DocumentQuery`] actually -/// targets the count surface. Without this check a caller who -/// forgets `.with_select(Select::Count)` would silently send a -/// `Documents` request and fail later inside the proof verifier -/// with an inscrutable "wrong wire shape" error; this surfaces -/// the misuse at the SDK boundary with a clear pointer to the -/// fix. +/// targets the count surface AND uses the `COUNT(*)` shape — the +/// only shape today's verifier can reproduce. The verifier in +/// `verify_count_query()` rebuilds a `DriveDocumentCountQuery` +/// without threading the selected `field`, so an accepted +/// `COUNT(field)` request would verify as `COUNT(*)` (different +/// result for nullable fields). Reject `COUNT(field)` upstream +/// until the verifier carries the counted field; the +/// not-yet-implemented gate already rejects it server-side, so +/// this check is the SDK-side mirror. pub(super) fn assert_select_is_count( request: &DocumentQuery, ) -> Result<(), drive_proof_verifier::Error> { - if request.select != Select::Count { + if request.select.function != SelectFunction::Count || !request.select.field.is_empty() { return Err(drive_proof_verifier::Error::RequestError { error: format!( - "DocumentCount / DocumentSplitCounts require `select = Count`, got {:?}. \ - Call `.with_select(Select::Count)` on the DocumentQuery before fetching.", + "DocumentCount / DocumentSplitCounts currently require \ + `SelectProjection::count_star()` (i.e. `COUNT(*)`); got {:?}. \ + `COUNT(field)` is not verifiable today because the proof \ + query doesn't carry the counted field — `COUNT(field)` \ + against a nullable field would verify as `COUNT(*)` and \ + return a different total. Call \ + `.with_select(SelectProjection::count_star())` on the \ + DocumentQuery before fetching.", request.select ), }); @@ -82,32 +93,44 @@ fn limit_to_u16_or_default(limit: u32) -> Result` shape. -/// 3. **no range + empty `where` + `documents_countable`** → -/// primary-key CountTree fast path. `verify_primary_key_count_tree_proof` -/// returns a `u64`; wrapped here as a single empty-key entry. -/// 4. **no range + covering `countable: true` index** → -/// `PointLookupProof`. `verify_point_lookup_count_proof` -/// emits one entry per **present** queried branch. Absent -/// In values are omitted from the returned list (the current -/// path query doesn't request absence proofs); callers that -/// need to surface "queried but absent" diff their request's -/// In array against the returned entries by key. See -/// `verify_point_lookup_count_proof_v0`'s docstring for the -/// forward-compat path to per-branch `count: None`. +/// - [`DocumentCountMode::PointLookupProof`] (no range, with or +/// without `In`) → `verify_point_lookup_count_proof`. +/// Special-case: `documents_countable: true` doctype + empty +/// where → `verify_primary_key_count_tree_proof`. +/// - [`DocumentCountMode::RangeProof`] (range, no In, no +/// distinct) → `verify_aggregate_count_proof` → single +/// empty-key entry. +/// - [`DocumentCountMode::RangeDistinctProof`] (range + distinct +/// walk via `GroupByRange` / `GroupByCompound`) → +/// `verify_distinct_count_proof`. +/// - [`DocumentCountMode::RangeAggregateCarrierProof`] (`In + +/// range + group_by=[in_field]` on the prove path; grovedb #663 +/// carrier primitive) → `verify_carrier_aggregate_count_proof`. +/// - `Total` / `PerInValue` / `RangeNoProof` are no-proof modes +/// and would be unreachable here (`prove=true`); reject as +/// `Internal` if they ever bubble through. /// -/// Wrapping (2) and (3) as single empty-key entries is the only -/// shape massage this helper does — the underlying primitives +/// Wrapping aggregate primitives (`RangeProof`, primary-key +/// CountTree) as single empty-key entries is the only shape +/// massage this helper does — the underlying primitives /// genuinely emit `u64`s, and consumers ([`DocumentCount`] sums, /// [`DocumentSplitCounts`] passes through) want a uniform /// per-entry vec regardless. @@ -136,15 +159,66 @@ pub(super) fn verify_count_query( .metadata() .or(Err(drive_proof_verifier::Error::EmptyResponseMetadata))?; - let has_range = request - .where_clauses - .iter() - .any(|wc| DriveDocumentCountQuery::is_range_operator(wc.operator)); + // Resolve the SQL-shape `CountMode` the request implies. Same + // decision tree as `validate_and_route` in the abci handler — + // single source of truth would be nicer but the SDK can't + // depend on rs-drive-abci, and drive doesn't expose this + // helper because `validate_and_route` also folds in the + // unrelated `select` projection check. + let count_mode = resolve_count_mode(&request.group_by, &request.where_clauses)?; + + // Translate the SQL-shape mode + where-clause shape into the + // resolved `DocumentCountMode` the prover would dispatch on. + // Driver-side detect_mode is the single source of truth — the + // SDK calling it directly is what keeps the verifier in sync + // with whatever new prove-mode lands next. + let resolved_mode = + DriveDocumentCountQuery::detect_mode(&request.where_clauses, count_mode, true).map_err( + |e| drive_proof_verifier::Error::RequestError { + error: format!("count-mode detection failed: {e}"), + }, + )?; + + // Special-case: empty where-clauses on a `documents_countable` + // doctype proves the primary-key CountTree element directly, + // skipping the per-index covering walk. This lives outside + // `detect_mode`'s output because the contract-level + // `documents_countable` flag isn't part of mode detection; + // pre-empt it here before falling through to PointLookupProof. + if matches!(resolved_mode, DocumentCountMode::PointLookupProof) + && request.where_clauses.is_empty() + && document_type.documents_countable() + { + let contract_id = request.data_contract.id().to_buffer(); + let count = verify_primary_key_count_tree_proof( + contract_id, + &request.document_type_name, + proof, + mtd, + platform_version, + provider, + )?; + return Ok(( + Some(single_empty_key_entry(count)), + mtd.clone(), + proof.clone(), + )); + } - if has_range { - // Range path: either RangeDistinctProof (entries) or - // AggregateCountOnRange (single u64 wrapped as one entry). - let index = DriveDocumentCountQuery::find_range_countable_index_for_where_clauses( + // Pick the index the prover would have picked. Range modes + // need a `range_countable: true` index; everything else uses + // the regular `countable: true` resolver. Mismatch here would + // produce a path-query different from the prover's, so the + // index lookup matches drive's `range_count_path_query` / + // `point_lookup_count_path_query` dispatch. + let needs_range_index = matches!( + resolved_mode, + DocumentCountMode::RangeProof + | DocumentCountMode::RangeDistinctProof + | DocumentCountMode::RangeAggregateCarrierProof + ); + let index = if needs_range_index { + DriveDocumentCountQuery::find_range_countable_index_for_where_clauses( document_type.indexes(), &request.where_clauses, ) @@ -152,16 +226,48 @@ pub(super) fn verify_count_query( error: "range count requires a `range_countable: true` index whose last \ property matches the range field" .to_string(), - })?; - let count_query = DriveDocumentCountQuery { - document_type, - contract_id: request.data_contract.id().to_buffer(), - document_type_name: request.document_type_name.clone(), - index, - where_clauses: request.where_clauses.clone(), - }; + })? + } else { + DriveDocumentCountQuery::find_countable_index_for_where_clauses( + document_type.indexes(), + &request.where_clauses, + ) + .ok_or_else(|| drive_proof_verifier::Error::RequestError { + error: "prove count requires a `countable: true` index whose properties \ + exactly match the where clause fields, or `documentsCountable: \ + true` on the document type for unfiltered total counts" + .to_string(), + })? + }; + let count_query = DriveDocumentCountQuery { + document_type, + contract_id: request.data_contract.id().to_buffer(), + document_type_name: request.document_type_name.clone(), + index, + where_clauses: request.where_clauses.clone(), + }; - if !request.group_by.is_empty() { + match resolved_mode { + DocumentCountMode::PointLookupProof => { + let entries = verify_point_lookup_count_proof( + &count_query, + proof, + mtd, + platform_version, + provider, + )?; + Ok((Some(entries), mtd.clone(), proof.clone())) + } + DocumentCountMode::RangeProof => { + let count = + verify_aggregate_count_proof(&count_query, proof, mtd, platform_version, provider)?; + Ok(( + Some(single_empty_key_entry(count)), + mtd.clone(), + proof.clone(), + )) + } + DocumentCountMode::RangeDistinctProof => { let limit_u16 = limit_to_u16_or_default(request.limit)?; let left_to_right = request .order_by_clauses @@ -177,57 +283,106 @@ pub(super) fn verify_count_query( platform_version, provider, )?; - return Ok((Some(entries), mtd.clone(), proof.clone())); + Ok((Some(entries), mtd.clone(), proof.clone())) } - - let count = - verify_aggregate_count_proof(&count_query, proof, mtd, platform_version, provider)?; - return Ok(( - Some(single_empty_key_entry(count)), - mtd.clone(), - proof.clone(), - )); - } - - // No range: documents_countable fast path or covering - // countable index. - if request.where_clauses.is_empty() && document_type.documents_countable() { - let contract_id = request.data_contract.id().to_buffer(); - let count = verify_primary_key_count_tree_proof( - contract_id, - &request.document_type_name, - proof, - mtd, - platform_version, - provider, - )?; - return Ok(( - Some(single_empty_key_entry(count)), - mtd.clone(), - proof.clone(), - )); + DocumentCountMode::RangeAggregateCarrierProof => { + // Carrier-ACOR (grovedb #663) — one verified `u64` per + // present In branch. `limit` cap on the per-branch + // walk follows the same `validate-don't-clamp` + // contract the distinct path uses; pass through what + // the caller asked for (with the `0` → default + // sentinel) so the path-query bytes match the + // server's exactly. + let limit_u16 = if request.limit == 0 { + None + } else { + Some(limit_to_u16_or_default(request.limit)?) + }; + let entries = verify_carrier_aggregate_count_proof( + &count_query, + proof, + mtd, + limit_u16, + platform_version, + provider, + )?; + Ok((Some(entries), mtd.clone(), proof.clone())) + } + // The three no-proof modes are unreachable under `prove = + // true`. `detect_mode` would only return them when called + // with `prove = false`. If we ever see one here it means + // drive's detect_mode contract changed unexpectedly; + // surface a clear internal error rather than crash. + DocumentCountMode::Total + | DocumentCountMode::PerInValue + | DocumentCountMode::RangeNoProof => Err(drive_proof_verifier::Error::RequestError { + error: format!( + "unexpected no-proof DocumentCountMode {resolved_mode:?} returned for a \ + prove=true request — drive's detect_mode contract may have changed" + ), + }), } +} - let index = DriveDocumentCountQuery::find_countable_index_for_where_clauses( - document_type.indexes(), - &request.where_clauses, - ) - .ok_or_else(|| drive_proof_verifier::Error::RequestError { - error: "prove count requires a `countable: true` index whose properties \ - exactly match the where clause fields, or `documentsCountable: \ - true` on the document type for unfiltered total counts" - .to_string(), - })?; - let count_query = DriveDocumentCountQuery { - document_type, - contract_id: request.data_contract.id().to_buffer(), - document_type_name: request.document_type_name.clone(), - index, - where_clauses: request.where_clauses.clone(), +/// Build the SQL-shape [`CountMode`] from `(group_by, +/// where_clauses)`. Mirrors the abci handler's +/// `validate_and_route` logic so the SDK side picks the same +/// mode the server would have routed to, which keeps +/// [`DriveDocumentCountQuery::detect_mode`]'s output (and the +/// proof-verification primitive) in sync end-to-end. +/// +/// Match-any semantics on the field lookups (`is_in_field` / +/// `is_range_field`) — clause ordering on the wire must not +/// affect routing, same fix as the abci handler's round-3 +/// regression. +fn resolve_count_mode( + group_by: &[String], + where_clauses: &[drive::query::WhereClause], +) -> Result { + let is_in_field = |field: &str| { + where_clauses + .iter() + .any(|wc| wc.operator == WhereOperator::In && wc.field == field) }; - let entries = - verify_point_lookup_count_proof(&count_query, proof, mtd, platform_version, provider)?; - Ok((Some(entries), mtd.clone(), proof.clone())) + let is_range_field = |field: &str| { + where_clauses + .iter() + .any(|wc| DriveDocumentCountQuery::is_range_operator(wc.operator) && wc.field == field) + }; + let unsupported = |feature: String| drive_proof_verifier::Error::RequestError { + error: format!("{feature} (see issue #3655 for the v1 wire surface follow-ups)"), + }; + match group_by { + [] => Ok(CountMode::Aggregate), + [field] => { + if is_in_field(field) { + Ok(CountMode::GroupByIn) + } else if is_range_field(field) { + Ok(CountMode::GroupByRange) + } else { + Err(drive_proof_verifier::Error::RequestError { + error: format!( + "GROUP BY on field '{field}' which is not constrained by an `In` \ + or range where clause is not yet implemented (see issue #3655)" + ), + }) + } + } + [first, second] => { + if is_in_field(first) && is_range_field(second) { + Ok(CountMode::GroupByCompound) + } else { + Err(unsupported( + "two-field GROUP BY outside the `(In, range)` compound shape \ + is not yet implemented" + .to_string(), + )) + } + } + _ => Err(unsupported( + "GROUP BY with more than two fields is not yet implemented".to_string(), + )), + } } /// Wrap a single `u64` from an aggregate proof primitive diff --git a/packages/rs-sdk/src/platform/documents/document_query.rs b/packages/rs-sdk/src/platform/documents/document_query.rs index 39f2b5d24b7..fa9ee87ed2c 100644 --- a/packages/rs-sdk/src/platform/documents/document_query.rs +++ b/packages/rs-sdk/src/platform/documents/document_query.rs @@ -3,14 +3,18 @@ use std::sync::Arc; use crate::{error::Error, sdk::Sdk}; -use ciborium::Value as CborValue; use dapi_grpc::platform::v0::get_documents_request::Version::V1; use dapi_grpc::platform::v0::{ self as platform_proto, get_documents_request::{ + document_field_value, get_documents_request_v0::Start, - get_documents_request_v1::{Select, Start as V1Start}, - GetDocumentsRequestV1, + get_documents_request_v1::{select, Select as ProtoSelect, Start as V1Start}, + having_aggregate, having_clause, having_ranking, order_clause, + DocumentFieldValue as ProtoDocumentFieldValue, GetDocumentsRequestV1, + HavingAggregate as ProtoHavingAggregate, HavingClause as ProtoHavingClause, + HavingRanking as ProtoHavingRanking, OrderClause as ProtoOrderClause, + WhereClause as ProtoWhereClause, WhereOperator as ProtoWhereOperator, }, GetDocumentsRequest, Proof, ResponseMetadata, }; @@ -26,7 +30,11 @@ use dpp::{ prelude::{DataContract, Identifier}, InvalidVectorSizeError, ProtocolError, }; -use drive::query::{DriveDocumentQuery, InternalClauses, OrderClause, WhereClause, WhereOperator}; +use drive::query::{ + DriveDocumentQuery, HavingAggregate, HavingAggregateFunction, HavingClause, HavingOperator, + HavingRanking, HavingRankingKind, HavingRightOperand, InternalClauses, OrderClause, + SelectFunction, SelectProjection, WhereClause, WhereOperator, +}; use drive_proof_verifier::{types::Documents, FromProof}; use rs_dapi_client::transport::{ AppliedRequestSettings, BoxFuture, TransportError, TransportRequest, @@ -45,23 +53,24 @@ use crate::platform::Fetch; #[derive(Debug, Clone, PartialEq, dash_platform_macros::Mockable)] #[cfg_attr(feature = "mocks", derive(serde::Serialize, serde::Deserialize))] pub struct DocumentQuery { - /// SQL-shaped `SELECT` projection. `Documents` returns matched - /// rows; `Count` returns either a single aggregate (empty - /// `group_by`) or per-group entries (non-empty `group_by`). - /// Defaults to `Documents` so callers that don't opt into the - /// count surface get plain document fetch semantics. + /// SQL-shaped `SELECT` projection — `(function, field)` pair. + /// `Documents` returns matched rows; `Count` / `Sum` / `Avg` + /// return either a single aggregate (empty `group_by`) or + /// per-group entries (non-empty `group_by`). Defaults to + /// `SelectProjection::documents()` so callers that don't opt + /// into the SQL-shaped surface get plain document-fetch + /// semantics. /// /// `#[serde(default)]` here (and on `group_by` / `having` /// below) is wire-format-compat for mock vectors captured - /// before the SQL-shaped surface was added: `Select::default() - /// == Select::Documents` (the proto-generated enum's 0-value - /// variant), `Vec` and `Vec` default to empty — together - /// those mean an old fixture without these fields - /// deserializes to the documents-fetch shape it was originally - /// captured under. New fixtures should serialize the fields - /// explicitly. + /// before the SQL-shaped surface was added: default + /// `SelectProjection` is `documents()`, `Vec` defaults to + /// empty — together those mean an old fixture without these + /// fields deserializes to the documents-fetch shape it was + /// originally captured under. New fixtures should serialize + /// the fields explicitly. #[cfg_attr(feature = "mocks", serde(default))] - pub select: Select, + pub select: SelectProjection, /// Data contract pub data_contract: Arc, /// Document type for the data contract @@ -74,15 +83,23 @@ pub struct DocumentQuery { /// `select=Documents` is rejected by the server as unsupported. #[cfg_attr(feature = "mocks", serde(default))] pub group_by: Vec, - /// SQL `HAVING` clauses, CBOR-encoded the same way as - /// `where_clauses`. Non-empty values are rejected by the - /// server with + /// SQL `HAVING` clauses — aggregate filters that apply to the + /// grouped rows produced by `select = Count`, `group_by = + /// […]`. Unlike `where_clauses`, the left side is an aggregate + /// (`COUNT(*)`, `SUM(field)`, `AVG(field)`, `MIN`/`MAX`, + /// `TOP`/`BOTTOM` for N-th-element selection) rather than a + /// raw row field. See [`HavingClause`] / + /// [`drive::query::HavingAggregate`] / + /// [`drive::query::HavingOperator`] for the catalogs. Multiple + /// entries combine with implicit `AND`. + /// + /// Non-empty values are rejected by the server today with /// `QuerySyntaxError::Unsupported("HAVING clause is not yet - /// implemented")`. The wire field is reserved so the SDK - /// can encode `HAVING` once the server gains support, without - /// another version bump. + /// implemented")` — the typed builder exists so callers can + /// encode the full aggregate-filter surface ahead of server + /// support landing without a wire-format change. #[cfg_attr(feature = "mocks", serde(default))] - pub having: Vec, + pub having: Vec, /// `order_by` clauses for the query pub order_by_clauses: Vec, /// queryset limit. `0` is the sentinel for "unset / default" and @@ -105,7 +122,7 @@ impl DocumentQuery { .map_err(ProtocolError::DataContractError)?; Ok(Self { - select: Select::Documents, + select: SelectProjection::documents(), data_contract: Arc::clone(&contract), document_type_name: document_type_name.to_string(), where_clauses: vec![], @@ -172,14 +189,22 @@ impl DocumentQuery { /// Set the SQL-shaped `SELECT` projection. /// - /// - [`Select::Documents`] (the default) returns matched - /// rows via `Document::fetch_many` and friends. - /// - [`Select::Count`] switches to the count surface: - /// pair it with [`DocumentCount::fetch`] for a single - /// aggregate (empty `group_by`) or - /// [`DocumentSplitCounts::fetch`] for per-group entries - /// (non-empty `group_by`). - pub fn with_select(mut self, select: Select) -> Self { + /// Construct the [`SelectProjection`] via its helpers: + /// [`SelectProjection::documents`] (the default — matched + /// rows), [`SelectProjection::count_star`] for `COUNT(*)`, + /// [`SelectProjection::count_field`] for `COUNT(field)`, + /// [`SelectProjection::sum`] for `SUM(field)`, + /// [`SelectProjection::avg`] for `AVG(field)`. Pair the + /// count/sum/avg projections with [`DocumentCount::fetch`] + /// (single aggregate, empty `group_by`) or + /// [`DocumentSplitCounts::fetch`] (per-group entries, + /// non-empty `group_by`). + /// + /// `SUM` / `AVG` and `COUNT(field)` are accepted by the SDK + /// but the server rejects them today with `Unsupported("… + /// is not yet implemented")` — the surface is shipped first + /// and execution lands later. + pub fn with_select(mut self, select: SelectProjection) -> Self { self.select = select; self } @@ -188,8 +213,9 @@ impl DocumentQuery { /// /// Convenience wrapper around [`Self::with_group_by_fields`]. /// Replaces any previously set `group_by`. Pair with - /// [`Self::with_select`]`(Select::Count)` for the per-group - /// entries shape. + /// [`Self::with_select`] (e.g. + /// `with_select(SelectProjection::count_star())`) for the + /// per-group entries shape. pub fn with_group_by>(mut self, field: S) -> Self { self.group_by = vec![field.into()]; self @@ -211,15 +237,14 @@ impl DocumentQuery { self } - /// Set the `HAVING` clause CBOR bytes (replaces any prior - /// value). + /// Set the `HAVING` clauses (replaces any prior value). /// /// Non-empty values are rejected by the server with /// `QuerySyntaxError::Unsupported("HAVING clause is not yet /// implemented")`. The builder exists so SDK callers can /// encode `HAVING` ahead of server support landing without /// another version bump. - pub fn with_having(mut self, having: Vec) -> Self { + pub fn with_having(mut self, having: Vec) -> Self { self.having = having; self } @@ -260,9 +285,24 @@ impl TransportRequest for DocumentQuery { client: &'c mut Self::Client, settings: &AppliedRequestSettings, ) -> BoxFuture<'c, Result> { - let request: GetDocumentsRequest = self - .try_into() - .expect("DocumentQuery should always be valid"); + // `TryFrom for GetDocumentsRequest` became + // fallible once `where_clause_to_proto` / `having_clause_to_proto` + // / `value_to_proto` started rejecting `Value` variants + // that have no wire-format counterpart (`Map`, future + // `Value` additions, …). Propagate the conversion failure + // as a `TransportError::Grpc(Status::invalid_argument(...))` + // so the SDK surfaces a normal request error instead of + // panicking the process. + let request: GetDocumentsRequest = match self.try_into() { + Ok(r) => r, + Err(e) => { + let status = dapi_grpc::tonic::Status::invalid_argument(format!( + "DocumentQuery contains values that can't be encoded on the v1 \ + wire: {e}" + )); + return Box::pin(async move { Err(TransportError::Grpc(status)) }); + } + }; request.execute_transport(client, settings) } } @@ -341,22 +381,41 @@ impl FromProof for drive_proof_verifier::types::Documents { impl TryFrom for platform_proto::GetDocumentsRequest { type Error = Error; fn try_from(dapi_request: DocumentQuery) -> Result { - let where_clauses = serialize_vec_to_cbor(dapi_request.where_clauses.clone()) - .expect("where clauses serialization should never fail"); - let order_by = serialize_vec_to_cbor(dapi_request.order_by_clauses.clone())?; + // `try_from` owns `dapi_request` — destructure once and + // consume the owned vectors below (no `.clone()` per field). + let DocumentQuery { + select, + data_contract, + document_type_name, + where_clauses, + group_by, + having, + order_by_clauses, + limit, + start, + } = dapi_request; + + let where_clauses = where_clauses + .into_iter() + .map(where_clause_to_proto) + .collect::, _>>()?; + let order_by = order_by_clauses + .into_iter() + .map(order_clause_to_proto) + .collect(); + let having = having + .into_iter() + .map(having_clause_to_proto) + .collect::, _>>()?; // `limit: u32` with `0` sentinel → `optional uint32` on the // V1 wire. `None` lets the server apply its own default; // explicit `0` would be a strange "return zero rows" request. - let limit = if dapi_request.limit == 0 { - None - } else { - Some(dapi_request.limit) - }; + let limit = if limit == 0 { None } else { Some(limit) }; // V0 and V1 ship separate `Start` enums even though the // shape is identical. Translate at the wire boundary so the // `DocumentQuery.start` field stays stable for callers // already using the V0 type. - let start_v1 = dapi_request.start.clone().map(|s| match s { + let start_v1 = start.map(|s| match s { Start::StartAfter(b) => V1Start::StartAfter(b), Start::StartAt(b) => V1Start::StartAt(b), }); @@ -364,9 +423,9 @@ impl TryFrom for platform_proto::GetDocumentsRequest { //todo: transform this into PlatformVersionedTryFrom Ok(GetDocumentsRequest { version: Some(V1(GetDocumentsRequestV1 { - data_contract_id: dapi_request.data_contract.id().to_vec(), - document_type: dapi_request.document_type_name.clone(), - r#where: where_clauses, + data_contract_id: data_contract.id().to_vec(), + document_type: document_type_name, + where_clauses, order_by, limit, // Document fetch always proves via this conversion. @@ -380,9 +439,18 @@ impl TryFrom for platform_proto::GetDocumentsRequest { // are disabled. prove: true, start: start_v1, - select: dapi_request.select as i32, - group_by: dapi_request.group_by.clone(), - having: dapi_request.having.clone(), + // `repeated Select selects` on the wire — single + // projection wraps in a one-element vec; the SDK's + // `DocumentQuery` carries a single + // `SelectProjection` because multi-projection is + // wire-only today. + selects: vec![select_to_proto(select)], + group_by, + having, + // `offset` is wire-reserved for future row-based + // pagination; the SDK doesn't surface it yet, so + // we always emit `None` here. + offset: None, })), }) } @@ -409,7 +477,7 @@ impl<'a> From<&'a DriveDocumentQuery<'a>> for DocumentQuery { // `DriveDocumentQuery` has no SELECT/GROUP BY/HAVING // concept — it's a documents-only query. Default to the // v1 documents shape. - select: Select::Documents, + select: SelectProjection::documents(), data_contract: Arc::new(data_contract), document_type_name: document_type_name.to_string(), where_clauses, @@ -443,7 +511,7 @@ impl<'a> From> for DocumentQuery { // `DriveDocumentQuery` has no SELECT/GROUP BY/HAVING // concept — it's a documents-only query. Default to the // v1 documents shape. - select: Select::Documents, + select: SelectProjection::documents(), data_contract: Arc::new(data_contract), document_type_name: document_type_name.to_string(), where_clauses, @@ -515,20 +583,243 @@ impl<'a> TryFrom<&'a DocumentQuery> for DriveDocumentQuery<'a> { } } -fn serialize_vec_to_cbor>(input: Vec) -> Result, Error> { - let values = Value::Array( - input - .into_iter() - .map(|v| v.into() as Value) - .collect::>(), - ); +/// Convert a drive [`WhereClause`] into its wire-format proto +/// counterpart. The proto value variant is picked from the +/// `dpp::platform_value::Value` variant by primitive type — schema- +/// agnostic, matching the inverse direction the rs-drive-abci v1 +/// handler runs via its `conversions::value_from_proto`. +/// +/// Errors only on `Value` variants that have no wire-format +/// counterpart (`Map`, `EnumU8`, `EnumString`) — these aren't +/// produced by the SDK's typical WhereClause builders, so a +/// rejection here flags an unsupported caller construction at the +/// wire boundary rather than silently dropping the value. +fn where_clause_to_proto(clause: WhereClause) -> Result { + Ok(ProtoWhereClause { + field: clause.field, + operator: where_operator_to_proto(clause.operator) as i32, + value: Some(value_to_proto(clause.value)?), + }) +} - let cbor_values: CborValue = TryInto::::try_into(values) - .map_err(|e| Error::Protocol(dpp::ProtocolError::EncodingError(e.to_string())))?; +fn order_clause_to_proto(clause: OrderClause) -> ProtoOrderClause { + // Drive's `OrderClause` carries a plain `field: String` — + // emit the field-target variant of the wire's `target` oneof. + // The aggregate-target variant (`ORDER BY COUNT(*)`) is + // wire-only today; when drive's `OrderClause` gains an + // aggregate target the SDK gets a parallel builder. + ProtoOrderClause { + target: Some(order_clause::Target::Field(clause.field)), + ascending: clause.ascending, + } +} + +/// Convert a drive [`HavingClause`] into its wire-format proto +/// counterpart. The inverse of `rs-drive-abci`'s +/// `having_clause_from_proto`. Errors only on `Value` variants +/// the underlying `value_to_proto` can't represent — every +/// `HavingOperator` / `HavingAggregateFunction` / +/// `HavingRankingKind` discriminant has a 1:1 wire counterpart +/// and is always convertible. +fn having_clause_to_proto(clause: HavingClause) -> Result { + let right = match clause.right { + HavingRightOperand::Value(v) => having_clause::Right::Value(value_to_proto(v)?), + HavingRightOperand::Ranking(r) => having_clause::Right::Ranking(having_ranking_to_proto(r)), + }; + Ok(ProtoHavingClause { + aggregate: Some(having_aggregate_to_proto(clause.aggregate)), + operator: having_operator_to_proto(clause.operator) as i32, + right: Some(right), + }) +} - let mut serialized = Vec::new(); - ciborium::ser::into_writer(&cbor_values, &mut serialized) - .map_err(|e| Error::Protocol(dpp::ProtocolError::EncodingError(e.to_string())))?; +fn having_aggregate_to_proto(aggregate: HavingAggregate) -> ProtoHavingAggregate { + ProtoHavingAggregate { + function: having_function_to_proto(aggregate.function) as i32, + field: aggregate.field, + } +} - Ok(serialized) +fn having_function_to_proto(function: HavingAggregateFunction) -> having_aggregate::Function { + match function { + HavingAggregateFunction::Count => having_aggregate::Function::Count, + HavingAggregateFunction::Sum => having_aggregate::Function::Sum, + HavingAggregateFunction::Avg => having_aggregate::Function::Avg, + } +} + +fn having_ranking_to_proto(ranking: HavingRanking) -> ProtoHavingRanking { + ProtoHavingRanking { + kind: having_ranking_kind_to_proto(ranking.kind) as i32, + n: ranking.n, + } +} + +fn having_ranking_kind_to_proto(kind: HavingRankingKind) -> having_ranking::Kind { + match kind { + HavingRankingKind::Min => having_ranking::Kind::Min, + HavingRankingKind::Max => having_ranking::Kind::Max, + HavingRankingKind::Top => having_ranking::Kind::Top, + HavingRankingKind::Bottom => having_ranking::Kind::Bottom, + } +} + +/// Convert a drive [`SelectProjection`] into its wire-format +/// proto counterpart. Inverse of `rs-drive-abci`'s +/// `select_from_proto`. Always succeeds — every +/// `SelectFunction` discriminant has a 1:1 wire counterpart. +fn select_to_proto(select: SelectProjection) -> ProtoSelect { + ProtoSelect { + function: select_function_to_proto(select.function) as i32, + field: select.field, + } +} + +fn select_function_to_proto(function: SelectFunction) -> select::Function { + match function { + SelectFunction::Documents => select::Function::Documents, + SelectFunction::Count => select::Function::Count, + SelectFunction::Sum => select::Function::Sum, + SelectFunction::Avg => select::Function::Avg, + SelectFunction::Min => select::Function::Min, + SelectFunction::Max => select::Function::Max, + } +} + +fn having_operator_to_proto(op: HavingOperator) -> having_clause::Operator { + match op { + HavingOperator::Equal => having_clause::Operator::Equal, + HavingOperator::NotEqual => having_clause::Operator::NotEqual, + HavingOperator::GreaterThan => having_clause::Operator::GreaterThan, + HavingOperator::GreaterThanOrEquals => having_clause::Operator::GreaterThanOrEquals, + HavingOperator::LessThan => having_clause::Operator::LessThan, + HavingOperator::LessThanOrEquals => having_clause::Operator::LessThanOrEquals, + HavingOperator::Between => having_clause::Operator::Between, + HavingOperator::BetweenExcludeBounds => having_clause::Operator::BetweenExcludeBounds, + HavingOperator::BetweenExcludeLeft => having_clause::Operator::BetweenExcludeLeft, + HavingOperator::BetweenExcludeRight => having_clause::Operator::BetweenExcludeRight, + HavingOperator::In => having_clause::Operator::In, + } +} + +fn where_operator_to_proto(op: WhereOperator) -> ProtoWhereOperator { + match op { + WhereOperator::Equal => ProtoWhereOperator::Equal, + WhereOperator::GreaterThan => ProtoWhereOperator::GreaterThan, + WhereOperator::GreaterThanOrEquals => ProtoWhereOperator::GreaterThanOrEquals, + WhereOperator::LessThan => ProtoWhereOperator::LessThan, + WhereOperator::LessThanOrEquals => ProtoWhereOperator::LessThanOrEquals, + WhereOperator::Between => ProtoWhereOperator::Between, + WhereOperator::BetweenExcludeBounds => ProtoWhereOperator::BetweenExcludeBounds, + WhereOperator::BetweenExcludeLeft => ProtoWhereOperator::BetweenExcludeLeft, + WhereOperator::BetweenExcludeRight => ProtoWhereOperator::BetweenExcludeRight, + WhereOperator::In => ProtoWhereOperator::In, + WhereOperator::StartsWith => ProtoWhereOperator::StartsWith, + } +} + +/// Map `dpp::platform_value::Value` onto the wire-shape +/// [`ProtoDocumentFieldValue`]. The schema-driven decode on the +/// server side resolves the actual indexed type — this layer just +/// names the primitive. +/// +/// Mapping rules: +/// - `Bool` → `BoolValue` +/// - `I8`/`I16`/`I32`/`I64` → `Int64Value` (widened) +/// - `U8`/`U16`/`U32`/`U64` → `Uint64Value` (widened) +/// - `Float` → `DoubleValue` +/// - `Text` → `Text` +/// - `Bytes`/`Bytes20`/`Bytes32`/`Bytes36`/`Identifier` → `BytesValue` +/// - `U128`/`I128` → `Text` (decimal string). **Not yet +/// round-trippable against `U128`/`I128`-typed indexed fields**: +/// the v1 typed-decode path (`v1/conversions.rs::value_from_proto`) +/// passes the text through as `Value::Text`, and the +/// downstream executor's strict `Value::to_integer()` then +/// rejects it. Schema-aware coercion (the +/// `DocumentPropertyType::value_from_string` path the v0 SQL +/// parser uses) hasn't been threaded through to the typed +/// path yet. The encoding is shipped because the proto needs a +/// home for 128-bit values; no production system contract +/// indexes `U128`/`I128` today. Tracked in the v1 follow-up +/// issue. +/// - `Array` → `List` (recursive, but only one level deep — +/// `value_to_proto` rejects nested arrays with +/// `EncodingError("nested DocumentFieldValue.list …")` to +/// match the server-side depth cap in +/// `v1/conversions.rs::value_from_proto_at_depth`, so wire- +/// malformed shapes fail at request-construction time with a +/// deterministic local error rather than after a transport +/// round-trip. +/// - `Null` → `NullValue(true)` (the `bool` payload is a +/// placeholder per the proto-side comment; only the variant +/// discriminant carries meaning) +/// - `Map`/`EnumU8`/`EnumString` → `Error` (no wire-format +/// counterpart for these shapes in a WhereClause operand) +fn value_to_proto(value: Value) -> Result { + value_to_proto_at_depth(value, 0) +} + +/// Recursion-bounded form of [`value_to_proto`]. Mirrors the +/// server-side `value_from_proto_at_depth` contract so encoder +/// and decoder agree on the supported `Value` subset: `depth = 0` +/// is the clause-level operand; `Array` is legal once (the flat +/// list of scalars for `IN` / `BETWEEN*`); any deeper nesting +/// rejects locally instead of producing a request the server +/// would round-trip just to reject. +fn value_to_proto_at_depth(value: Value, depth: u8) -> Result { + let variant = match value { + Value::Null => document_field_value::Variant::NullValue(true), + Value::Bool(b) => document_field_value::Variant::BoolValue(b), + Value::I8(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I16(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I32(i) => document_field_value::Variant::Int64Value(i as i64), + Value::I64(i) => document_field_value::Variant::Int64Value(i), + Value::U8(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U16(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U32(u) => document_field_value::Variant::Uint64Value(u as u64), + Value::U64(u) => document_field_value::Variant::Uint64Value(u), + Value::Float(f) => document_field_value::Variant::DoubleValue(f), + Value::Text(s) => document_field_value::Variant::Text(s), + Value::Bytes(b) => document_field_value::Variant::BytesValue(b), + Value::Bytes20(b) => document_field_value::Variant::BytesValue(b.to_vec()), + Value::Bytes32(b) => document_field_value::Variant::BytesValue(b.to_vec()), + Value::Bytes36(b) => document_field_value::Variant::BytesValue(b.to_vec()), + Value::Identifier(b) => document_field_value::Variant::BytesValue(b.to_vec()), + // u128 / i128 don't fit in `int64_value`/`uint64_value`; + // encode as a decimal string. See the function-level + // docstring for the U128/I128 round-trip caveat. + Value::U128(u) => document_field_value::Variant::Text(u.to_string()), + Value::I128(i) => document_field_value::Variant::Text(i.to_string()), + Value::Array(items) => { + if depth >= 1 { + return Err(Error::Protocol(dpp::ProtocolError::EncodingError( + "nested DocumentFieldValue.list is not supported on the v1 \ + query surface; `IN` / `BETWEEN*` candidate lists are flat \ + scalars only" + .to_string(), + ))); + } + document_field_value::Variant::List(document_field_value::ValueList { + values: items + .into_iter() + .map(|v| value_to_proto_at_depth(v, depth + 1)) + .collect::, _>>()?, + }) + } + // Catches both `Value::Map(_)` / `Value::EnumU8(_)` / + // `Value::EnumString(_)` (no wire-format counterpart for + // these shapes in a WhereClause operand) and any + // future-added variant — `dpp::platform_value::Value` is + // `#[non_exhaustive]`, so the SDK fails loudly rather + // than silently dropping data the moment upstream adds a + // variant we don't yet know how to encode. + _ => { + return Err(Error::Protocol(dpp::ProtocolError::EncodingError(format!( + "Value variant has no `DocumentFieldValue` wire-format counterpart: {value:?}" + )))); + } + }; + Ok(ProtoDocumentFieldValue { + variant: Some(variant), + }) } diff --git a/packages/rs-sdk/src/platform/dpns_usernames/mod.rs b/packages/rs-sdk/src/platform/dpns_usernames/mod.rs index 4df2ff27f77..cfb47694cef 100644 --- a/packages/rs-sdk/src/platform/dpns_usernames/mod.rs +++ b/packages/rs-sdk/src/platform/dpns_usernames/mod.rs @@ -381,7 +381,7 @@ impl Sdk { // Query for existing domain with this label let query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dpns_contract, document_type_name: "domain".to_string(), where_clauses: vec![ @@ -450,7 +450,7 @@ impl Sdk { // Query for domain with this label let query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dpns_contract, document_type_name: "domain".to_string(), where_clauses: vec![ diff --git a/packages/rs-sdk/src/platform/dpns_usernames/queries.rs b/packages/rs-sdk/src/platform/dpns_usernames/queries.rs index e0675f62fd7..9e17c8fa413 100644 --- a/packages/rs-sdk/src/platform/dpns_usernames/queries.rs +++ b/packages/rs-sdk/src/platform/dpns_usernames/queries.rs @@ -47,7 +47,7 @@ impl Sdk { // Query for domains with this identity in records.identity (the only indexed identity field) let records_identity_query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dpns_contract, document_type_name: "domain".to_string(), where_clauses: vec![WhereClause { @@ -126,7 +126,7 @@ impl Sdk { let normalized_prefix = convert_to_homograph_safe_chars(prefix); let query = DocumentQuery { - select: dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: drive::query::SelectProjection::documents(), data_contract: dpns_contract, document_type_name: "domain".to_string(), where_clauses: vec![ diff --git a/packages/rs-sdk/tests/fetch/document_count.rs b/packages/rs-sdk/tests/fetch/document_count.rs index 41a98908c31..68d3c238d56 100644 --- a/packages/rs-sdk/tests/fetch/document_count.rs +++ b/packages/rs-sdk/tests/fetch/document_count.rs @@ -4,7 +4,7 @@ //! `DocumentSplitCounts::fetch(sdk, query)` both consume a //! [`DocumentQuery`] (the same type used by //! `Document::fetch_many`), with the count-specific shape -//! signalled via `.with_select(Select::Count)` + optional +//! signalled via `.with_select(SelectProjection::count_star())` + optional //! `.with_group_by(…)`. This file exercises the SDK ↔ mock-DAPI //! seam: //! @@ -32,7 +32,6 @@ use std::sync::Arc; use super::common::{mock_data_contract, mock_document_type}; -use dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select; use dash_sdk::{ platform::{documents::document_query::DocumentQuery, Fetch}, Sdk, @@ -41,6 +40,7 @@ use dpp::data_contract::document_type::accessors::DocumentTypeV0Getters; use dpp::platform_value::Value; use drive::query::conditions::{WhereClause, WhereOperator}; use drive::query::ordering::OrderClause; +use drive::query::SelectProjection; use drive_proof_verifier::{DocumentCount, DocumentSplitCounts, SplitCountEntry}; #[tokio::test] @@ -51,7 +51,7 @@ async fn test_mock_fetch_document_count_returns_expected() { let data_contract = mock_data_contract(Some(&document_type)); let query = DocumentQuery::new(Arc::new(data_contract), document_type.name()) .expect("build DocumentQuery") - .with_select(Select::Count); + .with_select(SelectProjection::count_star()); let expected = DocumentCount(7); @@ -77,7 +77,7 @@ async fn test_mock_fetch_document_count_zero() { let data_contract = mock_data_contract(Some(&document_type)); let query = DocumentQuery::new(Arc::new(data_contract), document_type.name()) .expect("build DocumentQuery") - .with_select(Select::Count); + .with_select(SelectProjection::count_star()); let expected = DocumentCount(0); @@ -102,7 +102,7 @@ async fn test_mock_fetch_document_count_not_found() { let data_contract = mock_data_contract(Some(&document_type)); let query = DocumentQuery::new(Arc::new(data_contract), document_type.name()) .expect("build DocumentQuery") - .with_select(Select::Count); + .with_select(SelectProjection::count_star()); sdk.mock() .expect_fetch::(query.clone(), None as Option) @@ -140,7 +140,7 @@ async fn test_mock_fetch_document_split_counts_with_in_clause() { Value::Text("beta".to_string()), ]), }) - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by("a"); let expected = DocumentSplitCounts::from_verified(vec![ @@ -193,7 +193,7 @@ async fn test_mock_fetch_document_split_counts_with_distinct_range() { field: "a".to_string(), ascending: false, }) - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by("a") .with_limit(50); @@ -247,7 +247,7 @@ async fn test_mock_fetch_document_count_with_distinct_range_sums_entries() { operator: WhereOperator::GreaterThan, value: Value::Text("blue".to_string()), }) - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by("a"); let expected = DocumentCount(20); @@ -293,7 +293,7 @@ async fn test_mock_fetch_document_split_counts_preserves_none_for_absent_in_valu Value::Text("gamma".to_string()), ]), }) - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by("a"); // Mixed-shape fixture: `alpha` has a verified count, `beta` is diff --git a/packages/wasm-sdk/src/dpns.rs b/packages/wasm-sdk/src/dpns.rs index a594f94d450..1911990c8ac 100644 --- a/packages/wasm-sdk/src/dpns.rs +++ b/packages/wasm-sdk/src/dpns.rs @@ -269,7 +269,7 @@ impl WasmSdk { let dpns_contract = self.get_dpns_contract().await?; let query = DocumentQuery { - select: dash_sdk::dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select::Documents, + select: dash_sdk::drive::query::SelectProjection::documents(), data_contract: dpns_contract, document_type_name: DPNS_DOCUMENT_TYPE.to_string(), where_clauses: vec![WhereClause { diff --git a/packages/wasm-sdk/src/queries/document.rs b/packages/wasm-sdk/src/queries/document.rs index 27432c94f40..91c9142def2 100644 --- a/packages/wasm-sdk/src/queries/document.rs +++ b/packages/wasm-sdk/src/queries/document.rs @@ -2,11 +2,11 @@ use crate::queries::utils::deserialize_required_query; use crate::queries::ProofMetadataResponseWasm; use crate::sdk::WasmSdk; use crate::WasmSdkError; -use dash_sdk::dapi_grpc::platform::v0::get_documents_request::get_documents_request_v1::Select; use dash_sdk::dpp::data_contract::accessors::v0::DataContractV0Getters; use dash_sdk::dpp::document::Document; use dash_sdk::dpp::platform_value::Value; use dash_sdk::dpp::prelude::Identifier; +use dash_sdk::drive::query::SelectProjection; use dash_sdk::platform::documents::document_query::DocumentQuery; use dash_sdk::platform::Fetch; use dash_sdk::platform::FetchMany; @@ -256,7 +256,7 @@ async fn parse_documents_count_query( let base_query = build_documents_query(sdk, input).await?; Ok(base_query - .with_select(Select::Count) + .with_select(SelectProjection::count_star()) .with_group_by_fields(group_by) .with_limit(limit)) }