neroxbailx
Version:
baileys whatsapp-api
1,344 lines • 3.86 MB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";
var $protobuf = require("protobufjs/minimal");
// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
$root.MdStorageMsgRowOpaqueData = (function() {
/**
* Namespace MdStorageMsgRowOpaqueData.
* @exports MdStorageMsgRowOpaqueData
* @namespace
*/
var MdStorageMsgRowOpaqueData = {};
MdStorageMsgRowOpaqueData.MsgOpaqueData = (function() {
/**
* Properties of a MsgOpaqueData.
* @memberof MdStorageMsgRowOpaqueData
* @interface IMsgOpaqueData
* @property {string|null} [body] MsgOpaqueData body
* @property {string|null} [caption] MsgOpaqueData caption
* @property {number|null} [lng] MsgOpaqueData lng
* @property {boolean|null} [isLive] MsgOpaqueData isLive
* @property {number|null} [lat] MsgOpaqueData lat
* @property {number|null} [paymentAmount1000] MsgOpaqueData paymentAmount1000
* @property {string|null} [paymentNoteMsgBody] MsgOpaqueData paymentNoteMsgBody
* @property {string|null} [matchedText] MsgOpaqueData matchedText
* @property {string|null} [title] MsgOpaqueData title
* @property {string|null} [description] MsgOpaqueData description
* @property {Uint8Array|null} [futureproofBuffer] MsgOpaqueData futureproofBuffer
* @property {string|null} [clientUrl] MsgOpaqueData clientUrl
* @property {string|null} [loc] MsgOpaqueData loc
* @property {string|null} [pollName] MsgOpaqueData pollName
* @property {Array.<MdStorageMsgRowOpaqueData.MsgOpaqueData.IPollOption>|null} [pollOptions] MsgOpaqueData pollOptions
* @property {number|null} [pollSelectableOptionsCount] MsgOpaqueData pollSelectableOptionsCount
* @property {Uint8Array|null} [messageSecret] MsgOpaqueData messageSecret
* @property {string|null} [originalSelfAuthor] MsgOpaqueData originalSelfAuthor
* @property {number|Long|null} [senderTimestampMs] MsgOpaqueData senderTimestampMs
* @property {string|null} [pollUpdateParentKey] MsgOpaqueData pollUpdateParentKey
* @property {E2E.Message.IPollEncValue|null} [encPollVote] MsgOpaqueData encPollVote
* @property {boolean|null} [isSentCagPollCreation] MsgOpaqueData isSentCagPollCreation
* @property {MdStorageMsgRowOpaqueData.MsgOpaqueData.PollContentType|null} [pollContentType] MsgOpaqueData pollContentType
* @property {MdStorageMsgRowOpaqueData.MsgOpaqueData.IPollVotesSnapshot|null} [pollVotesSnapshot] MsgOpaqueData pollVotesSnapshot
* @property {string|null} [encReactionTargetMessageKey] MsgOpaqueData encReactionTargetMessageKey
* @property {Uint8Array|null} [encReactionEncPayload] MsgOpaqueData encReactionEncPayload
* @property {Uint8Array|null} [encReactionEncIv] MsgOpaqueData encReactionEncIv
* @property {Uint8Array|null} [botMessageSecret] MsgOpaqueData botMessageSecret
* @property {string|null} [targetMessageKey] MsgOpaqueData targetMessageKey
* @property {Uint8Array|null} [encPayload] MsgOpaqueData encPayload
* @property {Uint8Array|null} [encIv] MsgOpaqueData encIv
* @property {string|null} [eventName] MsgOpaqueData eventName
* @property {boolean|null} [isEventCanceled] MsgOpaqueData isEventCanceled
* @property {string|null} [eventDescription] MsgOpaqueData eventDescription
* @property {string|null} [eventJoinLink] MsgOpaqueData eventJoinLink
* @property {number|Long|null} [eventStartTime] MsgOpaqueData eventStartTime
* @property {MdStorageMsgRowOpaqueData.MsgOpaqueData.IEventLocation|null} [eventLocation] MsgOpaqueData eventLocation
* @property {number|Long|null} [eventEndTime] MsgOpaqueData eventEndTime
* @property {Uint8Array|null} [plainProtobufBytes] MsgOpaqueData plainProtobufBytes
*/
/**
* Constructs a new MsgOpaqueData.
* @memberof MdStorageMsgRowOpaqueData
* @classdesc Represents a MsgOpaqueData.
* @implements IMsgOpaqueData
* @constructor
* @param {MdStorageMsgRowOpaqueData.IMsgOpaqueData=} [properties] Properties to set
*/
function MsgOpaqueData(properties) {
this.pollOptions = [];
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]];
}
/**
* MsgOpaqueData body.
* @member {string|null|undefined} body
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.body = null;
/**
* MsgOpaqueData caption.
* @member {string|null|undefined} caption
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.caption = null;
/**
* MsgOpaqueData lng.
* @member {number|null|undefined} lng
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.lng = null;
/**
* MsgOpaqueData isLive.
* @member {boolean|null|undefined} isLive
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.isLive = null;
/**
* MsgOpaqueData lat.
* @member {number|null|undefined} lat
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.lat = null;
/**
* MsgOpaqueData paymentAmount1000.
* @member {number|null|undefined} paymentAmount1000
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.paymentAmount1000 = null;
/**
* MsgOpaqueData paymentNoteMsgBody.
* @member {string|null|undefined} paymentNoteMsgBody
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.paymentNoteMsgBody = null;
/**
* MsgOpaqueData matchedText.
* @member {string|null|undefined} matchedText
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.matchedText = null;
/**
* MsgOpaqueData title.
* @member {string|null|undefined} title
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.title = null;
/**
* MsgOpaqueData description.
* @member {string|null|undefined} description
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.description = null;
/**
* MsgOpaqueData futureproofBuffer.
* @member {Uint8Array|null|undefined} futureproofBuffer
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.futureproofBuffer = null;
/**
* MsgOpaqueData clientUrl.
* @member {string|null|undefined} clientUrl
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.clientUrl = null;
/**
* MsgOpaqueData loc.
* @member {string|null|undefined} loc
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.loc = null;
/**
* MsgOpaqueData pollName.
* @member {string|null|undefined} pollName
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollName = null;
/**
* MsgOpaqueData pollOptions.
* @member {Array.<MdStorageMsgRowOpaqueData.MsgOpaqueData.IPollOption>} pollOptions
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollOptions = $util.emptyArray;
/**
* MsgOpaqueData pollSelectableOptionsCount.
* @member {number|null|undefined} pollSelectableOptionsCount
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollSelectableOptionsCount = null;
/**
* MsgOpaqueData messageSecret.
* @member {Uint8Array|null|undefined} messageSecret
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.messageSecret = null;
/**
* MsgOpaqueData originalSelfAuthor.
* @member {string|null|undefined} originalSelfAuthor
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.originalSelfAuthor = null;
/**
* MsgOpaqueData senderTimestampMs.
* @member {number|Long|null|undefined} senderTimestampMs
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.senderTimestampMs = null;
/**
* MsgOpaqueData pollUpdateParentKey.
* @member {string|null|undefined} pollUpdateParentKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollUpdateParentKey = null;
/**
* MsgOpaqueData encPollVote.
* @member {E2E.Message.IPollEncValue|null|undefined} encPollVote
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encPollVote = null;
/**
* MsgOpaqueData isSentCagPollCreation.
* @member {boolean|null|undefined} isSentCagPollCreation
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.isSentCagPollCreation = null;
/**
* MsgOpaqueData pollContentType.
* @member {MdStorageMsgRowOpaqueData.MsgOpaqueData.PollContentType|null|undefined} pollContentType
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollContentType = null;
/**
* MsgOpaqueData pollVotesSnapshot.
* @member {MdStorageMsgRowOpaqueData.MsgOpaqueData.IPollVotesSnapshot|null|undefined} pollVotesSnapshot
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.pollVotesSnapshot = null;
/**
* MsgOpaqueData encReactionTargetMessageKey.
* @member {string|null|undefined} encReactionTargetMessageKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encReactionTargetMessageKey = null;
/**
* MsgOpaqueData encReactionEncPayload.
* @member {Uint8Array|null|undefined} encReactionEncPayload
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encReactionEncPayload = null;
/**
* MsgOpaqueData encReactionEncIv.
* @member {Uint8Array|null|undefined} encReactionEncIv
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encReactionEncIv = null;
/**
* MsgOpaqueData botMessageSecret.
* @member {Uint8Array|null|undefined} botMessageSecret
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.botMessageSecret = null;
/**
* MsgOpaqueData targetMessageKey.
* @member {string|null|undefined} targetMessageKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.targetMessageKey = null;
/**
* MsgOpaqueData encPayload.
* @member {Uint8Array|null|undefined} encPayload
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encPayload = null;
/**
* MsgOpaqueData encIv.
* @member {Uint8Array|null|undefined} encIv
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.encIv = null;
/**
* MsgOpaqueData eventName.
* @member {string|null|undefined} eventName
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventName = null;
/**
* MsgOpaqueData isEventCanceled.
* @member {boolean|null|undefined} isEventCanceled
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.isEventCanceled = null;
/**
* MsgOpaqueData eventDescription.
* @member {string|null|undefined} eventDescription
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventDescription = null;
/**
* MsgOpaqueData eventJoinLink.
* @member {string|null|undefined} eventJoinLink
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventJoinLink = null;
/**
* MsgOpaqueData eventStartTime.
* @member {number|Long|null|undefined} eventStartTime
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventStartTime = null;
/**
* MsgOpaqueData eventLocation.
* @member {MdStorageMsgRowOpaqueData.MsgOpaqueData.IEventLocation|null|undefined} eventLocation
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventLocation = null;
/**
* MsgOpaqueData eventEndTime.
* @member {number|Long|null|undefined} eventEndTime
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.eventEndTime = null;
/**
* MsgOpaqueData plainProtobufBytes.
* @member {Uint8Array|null|undefined} plainProtobufBytes
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
MsgOpaqueData.prototype.plainProtobufBytes = null;
// OneOf field names bound to virtual getters and setters
var $oneOfFields;
/**
* MsgOpaqueData _body.
* @member {"body"|undefined} _body
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_body", {
get: $util.oneOfGetter($oneOfFields = ["body"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _caption.
* @member {"caption"|undefined} _caption
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_caption", {
get: $util.oneOfGetter($oneOfFields = ["caption"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _lng.
* @member {"lng"|undefined} _lng
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_lng", {
get: $util.oneOfGetter($oneOfFields = ["lng"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _isLive.
* @member {"isLive"|undefined} _isLive
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_isLive", {
get: $util.oneOfGetter($oneOfFields = ["isLive"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _lat.
* @member {"lat"|undefined} _lat
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_lat", {
get: $util.oneOfGetter($oneOfFields = ["lat"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _paymentAmount1000.
* @member {"paymentAmount1000"|undefined} _paymentAmount1000
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_paymentAmount1000", {
get: $util.oneOfGetter($oneOfFields = ["paymentAmount1000"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _paymentNoteMsgBody.
* @member {"paymentNoteMsgBody"|undefined} _paymentNoteMsgBody
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_paymentNoteMsgBody", {
get: $util.oneOfGetter($oneOfFields = ["paymentNoteMsgBody"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _matchedText.
* @member {"matchedText"|undefined} _matchedText
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_matchedText", {
get: $util.oneOfGetter($oneOfFields = ["matchedText"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _title.
* @member {"title"|undefined} _title
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_title", {
get: $util.oneOfGetter($oneOfFields = ["title"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _description.
* @member {"description"|undefined} _description
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_description", {
get: $util.oneOfGetter($oneOfFields = ["description"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _futureproofBuffer.
* @member {"futureproofBuffer"|undefined} _futureproofBuffer
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_futureproofBuffer", {
get: $util.oneOfGetter($oneOfFields = ["futureproofBuffer"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _clientUrl.
* @member {"clientUrl"|undefined} _clientUrl
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_clientUrl", {
get: $util.oneOfGetter($oneOfFields = ["clientUrl"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _loc.
* @member {"loc"|undefined} _loc
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_loc", {
get: $util.oneOfGetter($oneOfFields = ["loc"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _pollName.
* @member {"pollName"|undefined} _pollName
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_pollName", {
get: $util.oneOfGetter($oneOfFields = ["pollName"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _pollSelectableOptionsCount.
* @member {"pollSelectableOptionsCount"|undefined} _pollSelectableOptionsCount
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_pollSelectableOptionsCount", {
get: $util.oneOfGetter($oneOfFields = ["pollSelectableOptionsCount"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _messageSecret.
* @member {"messageSecret"|undefined} _messageSecret
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_messageSecret", {
get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _originalSelfAuthor.
* @member {"originalSelfAuthor"|undefined} _originalSelfAuthor
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_originalSelfAuthor", {
get: $util.oneOfGetter($oneOfFields = ["originalSelfAuthor"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _senderTimestampMs.
* @member {"senderTimestampMs"|undefined} _senderTimestampMs
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_senderTimestampMs", {
get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _pollUpdateParentKey.
* @member {"pollUpdateParentKey"|undefined} _pollUpdateParentKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_pollUpdateParentKey", {
get: $util.oneOfGetter($oneOfFields = ["pollUpdateParentKey"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encPollVote.
* @member {"encPollVote"|undefined} _encPollVote
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encPollVote", {
get: $util.oneOfGetter($oneOfFields = ["encPollVote"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _isSentCagPollCreation.
* @member {"isSentCagPollCreation"|undefined} _isSentCagPollCreation
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_isSentCagPollCreation", {
get: $util.oneOfGetter($oneOfFields = ["isSentCagPollCreation"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _pollContentType.
* @member {"pollContentType"|undefined} _pollContentType
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_pollContentType", {
get: $util.oneOfGetter($oneOfFields = ["pollContentType"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _pollVotesSnapshot.
* @member {"pollVotesSnapshot"|undefined} _pollVotesSnapshot
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_pollVotesSnapshot", {
get: $util.oneOfGetter($oneOfFields = ["pollVotesSnapshot"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encReactionTargetMessageKey.
* @member {"encReactionTargetMessageKey"|undefined} _encReactionTargetMessageKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encReactionTargetMessageKey", {
get: $util.oneOfGetter($oneOfFields = ["encReactionTargetMessageKey"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encReactionEncPayload.
* @member {"encReactionEncPayload"|undefined} _encReactionEncPayload
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncPayload", {
get: $util.oneOfGetter($oneOfFields = ["encReactionEncPayload"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encReactionEncIv.
* @member {"encReactionEncIv"|undefined} _encReactionEncIv
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encReactionEncIv", {
get: $util.oneOfGetter($oneOfFields = ["encReactionEncIv"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _botMessageSecret.
* @member {"botMessageSecret"|undefined} _botMessageSecret
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_botMessageSecret", {
get: $util.oneOfGetter($oneOfFields = ["botMessageSecret"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _targetMessageKey.
* @member {"targetMessageKey"|undefined} _targetMessageKey
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_targetMessageKey", {
get: $util.oneOfGetter($oneOfFields = ["targetMessageKey"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encPayload.
* @member {"encPayload"|undefined} _encPayload
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encPayload", {
get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _encIv.
* @member {"encIv"|undefined} _encIv
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_encIv", {
get: $util.oneOfGetter($oneOfFields = ["encIv"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventName.
* @member {"eventName"|undefined} _eventName
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventName", {
get: $util.oneOfGetter($oneOfFields = ["eventName"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _isEventCanceled.
* @member {"isEventCanceled"|undefined} _isEventCanceled
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_isEventCanceled", {
get: $util.oneOfGetter($oneOfFields = ["isEventCanceled"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventDescription.
* @member {"eventDescription"|undefined} _eventDescription
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventDescription", {
get: $util.oneOfGetter($oneOfFields = ["eventDescription"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventJoinLink.
* @member {"eventJoinLink"|undefined} _eventJoinLink
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventJoinLink", {
get: $util.oneOfGetter($oneOfFields = ["eventJoinLink"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventStartTime.
* @member {"eventStartTime"|undefined} _eventStartTime
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventStartTime", {
get: $util.oneOfGetter($oneOfFields = ["eventStartTime"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventLocation.
* @member {"eventLocation"|undefined} _eventLocation
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventLocation", {
get: $util.oneOfGetter($oneOfFields = ["eventLocation"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _eventEndTime.
* @member {"eventEndTime"|undefined} _eventEndTime
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_eventEndTime", {
get: $util.oneOfGetter($oneOfFields = ["eventEndTime"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* MsgOpaqueData _plainProtobufBytes.
* @member {"plainProtobufBytes"|undefined} _plainProtobufBytes
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @instance
*/
Object.defineProperty(MsgOpaqueData.prototype, "_plainProtobufBytes", {
get: $util.oneOfGetter($oneOfFields = ["plainProtobufBytes"]),
set: $util.oneOfSetter($oneOfFields)
});
/**
* Creates a new MsgOpaqueData instance using the specified properties.
* @function create
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {MdStorageMsgRowOpaqueData.IMsgOpaqueData=} [properties] Properties to set
* @returns {MdStorageMsgRowOpaqueData.MsgOpaqueData} MsgOpaqueData instance
*/
MsgOpaqueData.create = function create(properties) {
return new MsgOpaqueData(properties);
};
/**
* Encodes the specified MsgOpaqueData message. Does not implicitly {@link MdStorageMsgRowOpaqueData.MsgOpaqueData.verify|verify} messages.
* @function encode
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {MdStorageMsgRowOpaqueData.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
MsgOpaqueData.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.body != null && Object.hasOwnProperty.call(message, "body"))
writer.uint32(/* id 1, wireType 2 =*/10).string(message.body);
if (message.caption != null && Object.hasOwnProperty.call(message, "caption"))
writer.uint32(/* id 3, wireType 2 =*/26).string(message.caption);
if (message.lng != null && Object.hasOwnProperty.call(message, "lng"))
writer.uint32(/* id 5, wireType 1 =*/41).double(message.lng);
if (message.isLive != null && Object.hasOwnProperty.call(message, "isLive"))
writer.uint32(/* id 6, wireType 0 =*/48).bool(message.isLive);
if (message.lat != null && Object.hasOwnProperty.call(message, "lat"))
writer.uint32(/* id 7, wireType 1 =*/57).double(message.lat);
if (message.paymentAmount1000 != null && Object.hasOwnProperty.call(message, "paymentAmount1000"))
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.paymentAmount1000);
if (message.paymentNoteMsgBody != null && Object.hasOwnProperty.call(message, "paymentNoteMsgBody"))
writer.uint32(/* id 9, wireType 2 =*/74).string(message.paymentNoteMsgBody);
if (message.matchedText != null && Object.hasOwnProperty.call(message, "matchedText"))
writer.uint32(/* id 11, wireType 2 =*/90).string(message.matchedText);
if (message.title != null && Object.hasOwnProperty.call(message, "title"))
writer.uint32(/* id 12, wireType 2 =*/98).string(message.title);
if (message.description != null && Object.hasOwnProperty.call(message, "description"))
writer.uint32(/* id 13, wireType 2 =*/106).string(message.description);
if (message.futureproofBuffer != null && Object.hasOwnProperty.call(message, "futureproofBuffer"))
writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.futureproofBuffer);
if (message.clientUrl != null && Object.hasOwnProperty.call(message, "clientUrl"))
writer.uint32(/* id 15, wireType 2 =*/122).string(message.clientUrl);
if (message.loc != null && Object.hasOwnProperty.call(message, "loc"))
writer.uint32(/* id 16, wireType 2 =*/130).string(message.loc);
if (message.pollName != null && Object.hasOwnProperty.call(message, "pollName"))
writer.uint32(/* id 17, wireType 2 =*/138).string(message.pollName);
if (message.pollOptions != null && message.pollOptions.length)
for (var i = 0; i < message.pollOptions.length; ++i)
$root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollOption.encode(message.pollOptions[i], writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim();
if (message.pollSelectableOptionsCount != null && Object.hasOwnProperty.call(message, "pollSelectableOptionsCount"))
writer.uint32(/* id 20, wireType 0 =*/160).uint32(message.pollSelectableOptionsCount);
if (message.messageSecret != null && Object.hasOwnProperty.call(message, "messageSecret"))
writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.messageSecret);
if (message.senderTimestampMs != null && Object.hasOwnProperty.call(message, "senderTimestampMs"))
writer.uint32(/* id 22, wireType 0 =*/176).int64(message.senderTimestampMs);
if (message.pollUpdateParentKey != null && Object.hasOwnProperty.call(message, "pollUpdateParentKey"))
writer.uint32(/* id 23, wireType 2 =*/186).string(message.pollUpdateParentKey);
if (message.encPollVote != null && Object.hasOwnProperty.call(message, "encPollVote"))
$root.E2E.Message.PollEncValue.encode(message.encPollVote, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
if (message.encReactionTargetMessageKey != null && Object.hasOwnProperty.call(message, "encReactionTargetMessageKey"))
writer.uint32(/* id 25, wireType 2 =*/202).string(message.encReactionTargetMessageKey);
if (message.encReactionEncPayload != null && Object.hasOwnProperty.call(message, "encReactionEncPayload"))
writer.uint32(/* id 26, wireType 2 =*/210).bytes(message.encReactionEncPayload);
if (message.encReactionEncIv != null && Object.hasOwnProperty.call(message, "encReactionEncIv"))
writer.uint32(/* id 27, wireType 2 =*/218).bytes(message.encReactionEncIv);
if (message.isSentCagPollCreation != null && Object.hasOwnProperty.call(message, "isSentCagPollCreation"))
writer.uint32(/* id 28, wireType 0 =*/224).bool(message.isSentCagPollCreation);
if (message.botMessageSecret != null && Object.hasOwnProperty.call(message, "botMessageSecret"))
writer.uint32(/* id 29, wireType 2 =*/234).bytes(message.botMessageSecret);
if (message.targetMessageKey != null && Object.hasOwnProperty.call(message, "targetMessageKey"))
writer.uint32(/* id 30, wireType 2 =*/242).string(message.targetMessageKey);
if (message.encPayload != null && Object.hasOwnProperty.call(message, "encPayload"))
writer.uint32(/* id 31, wireType 2 =*/250).bytes(message.encPayload);
if (message.encIv != null && Object.hasOwnProperty.call(message, "encIv"))
writer.uint32(/* id 32, wireType 2 =*/258).bytes(message.encIv);
if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName"))
writer.uint32(/* id 33, wireType 2 =*/266).string(message.eventName);
if (message.isEventCanceled != null && Object.hasOwnProperty.call(message, "isEventCanceled"))
writer.uint32(/* id 34, wireType 0 =*/272).bool(message.isEventCanceled);
if (message.eventDescription != null && Object.hasOwnProperty.call(message, "eventDescription"))
writer.uint32(/* id 35, wireType 2 =*/282).string(message.eventDescription);
if (message.eventJoinLink != null && Object.hasOwnProperty.call(message, "eventJoinLink"))
writer.uint32(/* id 36, wireType 2 =*/290).string(message.eventJoinLink);
if (message.eventStartTime != null && Object.hasOwnProperty.call(message, "eventStartTime"))
writer.uint32(/* id 37, wireType 0 =*/296).int64(message.eventStartTime);
if (message.eventLocation != null && Object.hasOwnProperty.call(message, "eventLocation"))
$root.MdStorageMsgRowOpaqueData.MsgOpaqueData.EventLocation.encode(message.eventLocation, writer.uint32(/* id 38, wireType 2 =*/306).fork()).ldelim();
if (message.eventEndTime != null && Object.hasOwnProperty.call(message, "eventEndTime"))
writer.uint32(/* id 40, wireType 0 =*/320).int64(message.eventEndTime);
if (message.pollVotesSnapshot != null && Object.hasOwnProperty.call(message, "pollVotesSnapshot"))
$root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollVotesSnapshot.encode(message.pollVotesSnapshot, writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim();
if (message.pollContentType != null && Object.hasOwnProperty.call(message, "pollContentType"))
writer.uint32(/* id 42, wireType 0 =*/336).int32(message.pollContentType);
if (message.plainProtobufBytes != null && Object.hasOwnProperty.call(message, "plainProtobufBytes"))
writer.uint32(/* id 43, wireType 2 =*/346).bytes(message.plainProtobufBytes);
if (message.originalSelfAuthor != null && Object.hasOwnProperty.call(message, "originalSelfAuthor"))
writer.uint32(/* id 51, wireType 2 =*/410).string(message.originalSelfAuthor);
return writer;
};
/**
* Encodes the specified MsgOpaqueData message, length delimited. Does not implicitly {@link MdStorageMsgRowOpaqueData.MsgOpaqueData.verify|verify} messages.
* @function encodeDelimited
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {MdStorageMsgRowOpaqueData.IMsgOpaqueData} message MsgOpaqueData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
MsgOpaqueData.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a MsgOpaqueData message from the specified reader or buffer.
* @function decode
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {MdStorageMsgRowOpaqueData.MsgOpaqueData} MsgOpaqueData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
MsgOpaqueData.decode = function decode(reader, length, error) {
if (!(reader instanceof $Reader))
reader = $Reader.create(reader);
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MdStorageMsgRowOpaqueData.MsgOpaqueData();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
message.body = reader.string();
break;
}
case 3: {
message.caption = reader.string();
break;
}
case 5: {
message.lng = reader.double();
break;
}
case 6: {
message.isLive = reader.bool();
break;
}
case 7: {
message.lat = reader.double();
break;
}
case 8: {
message.paymentAmount1000 = reader.int32();
break;
}
case 9: {
message.paymentNoteMsgBody = reader.string();
break;
}
case 11: {
message.matchedText = reader.string();
break;
}
case 12: {
message.title = reader.string();
break;
}
case 13: {
message.description = reader.string();
break;
}
case 14: {
message.futureproofBuffer = reader.bytes();
break;
}
case 15: {
message.clientUrl = reader.string();
break;
}
case 16: {
message.loc = reader.string();
break;
}
case 17: {
message.pollName = reader.string();
break;
}
case 18: {
if (!(message.pollOptions && message.pollOptions.length))
message.pollOptions = [];
message.pollOptions.push($root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollOption.decode(reader, reader.uint32()));
break;
}
case 20: {
message.pollSelectableOptionsCount = reader.uint32();
break;
}
case 21: {
message.messageSecret = reader.bytes();
break;
}
case 51: {
message.originalSelfAuthor = reader.string();
break;
}
case 22: {
message.senderTimestampMs = reader.int64();
break;
}
case 23: {
message.pollUpdateParentKey = reader.string();
break;
}
case 24: {
message.encPollVote = $root.E2E.Message.PollEncValue.decode(reader, reader.uint32());
break;
}
case 28: {
message.isSentCagPollCreation = reader.bool();
break;
}
case 42: {
message.pollContentType = reader.int32();
break;
}
case 41: {
message.pollVotesSnapshot = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollVotesSnapshot.decode(reader, reader.uint32());
break;
}
case 25: {
message.encReactionTargetMessageKey = reader.string();
break;
}
case 26: {
message.encReactionEncPayload = reader.bytes();
break;
}
case 27: {
message.encReactionEncIv = reader.bytes();
break;
}
case 29: {
message.botMessageSecret = reader.bytes();
break;
}
case 30: {
message.targetMessageKey = reader.string();
break;
}
case 31: {
message.encPayload = reader.bytes();
break;
}
case 32: {
message.encIv = reader.bytes();
break;
}
case 33: {
message.eventName = reader.string();
break;
}
case 34: {
message.isEventCanceled = reader.bool();
break;
}
case 35: {
message.eventDescription = reader.string();
break;
}
case 36: {
message.eventJoinLink = reader.string();
break;
}
case 37: {
message.eventStartTime = reader.int64();
break;
}
case 38: {
message.eventLocation = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.EventLocation.decode(reader, reader.uint32());
break;
}
case 40: {
message.eventEndTime = reader.int64();
break;
}
case 43: {
message.plainProtobufBytes = reader.bytes();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a MsgOpaqueData message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {MdStorageMsgRowOpaqueData.MsgOpaqueData} MsgOpaqueData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
MsgOpaqueData.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a MsgOpaqueData message.
* @function verify
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
MsgOpaqueData.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
var properties = {};
if (message.body != null && message.hasOwnProperty("body")) {
properties._body = 1;
if (!$util.isString(message.body))
return "body: string expected";
}
if (message.caption != null && message.hasOwnProperty("caption")) {
properties._caption = 1;
if (!$util.isString(message.caption))
return "caption: string expected";
}
if (message.lng != null && message.hasOwnProperty("lng")) {
properties._lng = 1;
if (typeof message.lng !== "number")
return "lng: number expected";
}
if (message.isLive != null && message.hasOwnProperty("isLive")) {
properties._isLive = 1;
if (typeof message.isLive !== "boolean")
return "isLive: boolean expected";
}
if (message.lat != null && message.hasOwnProperty("lat")) {
properties._lat = 1;
if (typeof message.lat !== "number")
return "lat: number expected";
}
if (message.paymentAmount1000 != null && message.hasOwnProperty("paymentAmount1000")) {
properties._paymentAmount1000 = 1;
if (!$util.isInteger(message.paymentAmount1000))
return "paymentAmount1000: integer expected";
}
if (message.paymentNoteMsgBody != null && message.hasOwnProperty("paymentNoteMsgBody")) {
properties._paymentNoteMsgBody = 1;
if (!$util.isString(message.paymentNoteMsgBody))
return "paymentNoteMsgBody: string expected";
}
if (message.matchedText != null && message.hasOwnProperty("matchedText")) {
properties._matchedText = 1;
if (!$util.isString(message.matchedText))
return "matchedText: string expected";
}
if (message.title != null && message.hasOwnProperty("title")) {
properties._title = 1;
if (!$util.isString(message.title))
return "title: string expected";
}
if (message.description != null && message.hasOwnProperty("description")) {
properties._description = 1;
if (!$util.isString(message.description))
return "description: string expected";
}
if (message.futureproofBuffer != null && message.hasOwnProperty("futureproofBuffer")) {
properties._futureproofBuffer = 1;
if (!(message.futureproofBuffer && typeof message.futureproofBuffer.length === "number" || $util.isString(message.futureproofBuffer)))
return "futureproofBuffer: buffer expected";
}
if (message.clientUrl != null && message.hasOwnProperty("clientUrl")) {
properties._clientUrl = 1;
if (!$util.isString(message.clientUrl))
return "clientUrl: string expected";
}
if (message.loc != null && message.hasOwnProperty("loc")) {
properties._loc = 1;
if (!$util.isString(message.loc))
return "loc: string expected";
}
if (message.pollName != null && message.hasOwnProperty("pollName")) {
properties._pollName = 1;
if (!$util.isString(message.pollName))
return "pollName: string expected";
}
if (message.pollOptions != null && message.hasOwnProperty("pollOptions")) {
if (!Array.isArray(message.pollOptions))
return "pollOptions: array expected";
for (var i = 0; i < message.pollOptions.length; ++i) {
var error = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollOption.verify(message.pollOptions[i]);
if (error)
return "pollOptions." + error;
}
}
if (message.pollSelectableOptionsCount != null && message.hasOwnProperty("pollSelectableOptionsCount")) {
properties._pollSelectableOptionsCount = 1;
if (!$util.isInteger(message.pollSelectableOptionsCount))
return "pollSelectableOptionsCount: integer expected";
}
if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
properties._messageSecret = 1;
if (!(message.messageSecret && typeof message.messageSecret.length === "number" || $util.isString(message.messageSecret)))
return "messageSecret: buffer expected";
}
if (message.originalSelfAuthor != null && message.hasOwnProperty("originalSelfAuthor")) {
properties._originalSelfAuthor = 1;
if (!$util.isString(message.originalSelfAuthor))
return "originalSelfAuthor: string expected";
}
if (message.senderTimestampMs != null && message.hasOwnProperty("senderTimestampMs")) {
properties._senderTimestampMs = 1;
if (!$util.isInteger(message.senderTimestampMs) && !(message.senderTimestampMs && $util.isInteger(message.senderTimestampMs.low) && $util.isInteger(message.senderTimestampMs.high)))
return "senderTimestampMs: integer|Long expected";
}
if (message.pollUpdateParentKey != null && message.hasOwnProperty("pollUpdateParentKey")) {
properties._pollUpdateParentKey = 1;
if (!$util.isString(message.pollUpdateParentKey))
return "pollUpdateParentKey: string expected";
}
if (message.encPollVote != null && message.hasOwnProperty("encPollVote")) {
properties._encPollVote = 1;
{
var error = $root.E2E.Message.PollEncValue.verify(message.encPollVote);
if (error)
return "encPollVote." + error;
}
}
if (message.isSentCagPollCreation != null && message.hasOwnProperty("isSentCagPollCreation")) {
properties._isSentCagPollCreation = 1;
if (typeof message.isSentCagPollCreation !== "boolean")
return "isSentCagPollCreation: boolean expected";
}
if (message.pollContentType != null && message.hasOwnProperty("pollContentType")) {
properties._pollContentType = 1;
switch (message.pollContentType) {
default:
return "pollContentType: enum value expected";
case 0:
case 1:
case 2:
break;
}
}
if (message.pollVotesSnapshot != null && message.hasOwnProperty("pollVotesSnapshot")) {
properties._pollVotesSnapshot = 1;
{
var error = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollVotesSnapshot.verify(message.pollVotesSnapshot);
if (error)
return "pollVotesSnapshot." + error;
}
}
if (message.encReactionTargetMessageKey != null && message.hasOwnProperty("encReactionTargetMessageKey")) {
properties._encReactionTargetMessageKey = 1;
if (!$util.isString(message.encReactionTargetMessageKey))
return "encReactionTargetMessageKey: string expected";
}
if (message.encReactionEncPayload != null && message.hasOwnProperty("encReactionEncPayload")) {
properties._encReactionEncPayload = 1;
if (!(message.encReactionEncPayload && typeof message.encReactionEncPayload.length === "number" || $util.isString(message.encReactionEncPayload)))
return "encReactionEncPayload: buffer expected";
}
if (message.encReactionEncIv != null && message.hasOwnProperty("encReactionEncIv")) {
properties._encReactionEncIv = 1;
if (!(message.encReactionEncIv && typeof message.encReactionEncIv.length === "number" || $util.isString(message.encReactionEncIv)))
return "encReactionEncIv: buffer expected";
}
if (message.botMessageSecret != null && message.hasOwnProperty("botMessageSecret")) {
properties._botMessageSecret = 1;
if (!(message.botMessageSecret && typeof message.botMessageSecret.length === "number" || $util.isString(message.botMessageSecret)))
return "botMessageSecret: buffer expected";
}
if (message.targetMessageKey != null && message.hasOwnProperty("targetMessageKey")) {
properties._targetMessageKey = 1;
if (!$util.isString(message.targetMessageKey))
return "targetMessageKey: string expected";
}
if (message.encPayload != null && message.hasOwnProperty("encPayload")) {
properties._encPayload = 1;
if (!(message.encPayload && typeof message.encPayload.length === "number" || $util.isString(message.encPayload)))
return "encPayload: buffer expected";
}
if (message.encIv != null && message.hasOwnProperty("encIv")) {
properties._encIv = 1;
if (!(message.encIv && typeof message.encIv.length === "number" || $util.isString(message.encIv)))
return "encIv: buffer expected";
}
if (message.eventName != null && message.hasOwnProperty("eventName")) {
properties._eventName = 1;
if (!$util.isString(message.eventName))
return "eventName: string expected";
}
if (message.isEventCanceled != null && message.hasOwnProperty("isEventCanceled")) {
properties._isEventCanceled = 1;
if (typeof message.isEventCanceled !== "boolean")
return "isEventCanceled: boolean expected";
}
if (message.eventDescription != null && message.hasOwnProperty("eventDescription")) {
properties._eventDescription = 1;
if (!$util.isString(message.eventDescription))
return "eventDescription: string expected";
}
if (message.eventJoinLink != null && message.hasOwnProperty("eventJoinLink")) {
properties._eventJoinLink = 1;
if (!$util.isString(message.eventJoinLink))
return "eventJoinLink: string expected";
}
if (message.eventStartTime != null && message.hasOwnProperty("eventStartTime")) {
properties._eventStartTime = 1;
if (!$util.isInteger(message.eventStartTime) && !(message.eventStartTime && $util.isInteger(message.eventStartTime.low) && $util.isInteger(message.eventStartTime.high)))
return "eventStartTime: integer|Long expected";
}
if (message.eventLocation != null && message.hasOwnProperty("eventLocation")) {
properties._eventLocation = 1;
{
var error = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.EventLocation.verify(message.eventLocation);
if (error)
return "eventLocation." + error;
}
}
if (message.eventEndTime != null && message.hasOwnProperty("eventEndTime")) {
properties._eventEndTime = 1;
if (!$util.isInteger(message.eventEndTime) && !(message.eventEndTime && $util.isInteger(message.eventEndTime.low) && $util.isInteger(message.eventEndTime.high)))
return "eventEndTime: integer|Long expected";
}
if (message.plainProtobufBytes != null && message.hasOwnProperty("plainProtobufBytes")) {
properties._plainProtobufBytes = 1;
if (!(message.plainProtobufBytes && typeof message.plainProtobufBytes.length === "number" || $util.isString(message.plainProtobufBytes)))
return "plainProtobufBytes: buffer expected";
}
return null;
};
/**
* Creates a MsgOpaqueData message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof MdStorageMsgRowOpaqueData.MsgOpaqueData
* @static
* @param {Object.<string,*>} object Plain object
* @returns {MdStorageMsgRowOpaqueData.MsgOpaqueData} MsgOpaqueData
*/
MsgOpaqueData.fromObject = function fromObject(object) {
if (object instanceof $root.MdStorageMsgRowOpaqueData.MsgOpaqueData)
return object;
var message = new $root.MdStorageMsgRowOpaqueData.MsgOpaqueData();
if (object.body != null)
message.body = String(object.body);
if (object.caption != null)
message.caption = String(object.caption);
if (object.lng != null)
message.lng = Number(object.lng);
if (object.isLive != null)
message.isLive = Boolean(object.isLive);
if (object.lat != null)
message.lat = Number(object.lat);
if (object.paymentAmount1000 != null)
message.paymentAmount1000 = object.paymentAmount1000 | 0;
if (object.paymentNoteMsgBody != null)
message.paymentNoteMsgBody = String(object.paymentNoteMsgBody);
if (object.matchedText != null)
message.matchedText = String(object.matchedText);
if (object.title != null)
message.title = String(object.title);
if (object.description != null)
message.description = String(object.description);
if (object.futureproofBuffer != null)
if (typeof object.futureproofBuffer === "string")
$util.base64.decode(object.futureproofBuffer, message.futureproofBuffer = $util.newBuffer($util.base64.length(object.futureproofBuffer)), 0);
else if (object.futureproofBuffer.length >= 0)
message.futureproofBuffer = object.futureproofBuffer;
if (object.clientUrl != null)
message.clientUrl = String(object.clientUrl);
if (object.loc != null)
message.loc = String(object.loc);
if (object.pollName != null)
message.pollName = String(object.pollName);
if (object.pollOptions) {
if (!Array.isArray(object.pollOptions))
throw TypeError(".MdStorageMsgRowOpaqueData.MsgOpaqueData.pollOptions: array expected");
message.pollOptions = [];
for (var i = 0; i < object.pollOptions.length; ++i) {
if (typeof object.pollOptions[i] !== "object")
throw TypeError(".MdStorageMsgRowOpaqueData.MsgOpaqueData.pollOptions: object expected");
message.pollOptions[i] = $root.MdStorageMsgRowOpaqueData.MsgOpaqueData.PollOption.fromObject(object.pollOptions[i]);
}
}
if (object.pollSelectableOptionsCount != null)
message.pollSelectableOptionsCount = object.pollSelectableOptionsCount >>> 0;
if (object.messageSecret != null)
if (typeof object.messageSecret === "string")
$util.base64.decode(object.messageSecret, message.messageSecret = $util.newBuffer($util.base64.length(object.messageSecret)), 0);
else if (object.messageSecret.length >= 0)
message.messageSecret = object.messageSecret;
if (object.originalSelfAuthor != null)
message.originalSelfAuthor = String(object.originalSelfAuthor);
if (object.senderTimestampMs != null)
if ($util.Long)
(message.senderTimestampMs = $util.Long.fromValue(object.senderTimestampMs)).unsigned = false;
else if (typeof object.senderTimestampMs === "string")
message.senderTimestampMs = parseInt(object.senderTimestampMs, 10);
else if (typeof object.senderTimestampMs === "number")
message.senderTimestampMs = object.senderTimestampMs;
else if (typeof object.senderTimestampMs === "object")
message.senderTimestampMs = new $util.LongBits(objec